Merge branch 'v2' into INFRA-3107-redis

This commit is contained in:
Saurabh Bhagwan Sathe
2024-06-17 12:18:09 +05:30
committed by GitHub
11 changed files with 64 additions and 16 deletions

File diff suppressed because one or more lines are too long

View File

@@ -1,2 +1,2 @@
app_name: infra-provisioner-v2
version: v2.47.2
version: v2.48.3

View File

@@ -240,7 +240,8 @@ func templateResourceTf(templateName, resourceDir string, manifest *Manifest, de
err = t.Execute(tfOut, manifest)
if err != nil {
log.Fatalf("\nErr: %v", err)
log.Fatalf("\nError while Templating %s. \nPlease ensure %s is present in the manifest, if present please check if the configurations are correct.\n"+
"Err: %v", resourceDir, templateDirMap[resourceDir], err)
return err
}
tfOut.Close()

View File

@@ -35,11 +35,6 @@ module "s3-buckets" {
DataSensitivity = "PII_SPI"
{{- end }}
{{- with .Metadata.DisasterRecovery }}
DisasterRecovery = {{ . | quote }}
{{- else }}
DisasterRecovery = "True"
{{- end }}
{{- end }}
}

View File

@@ -212,6 +212,10 @@ module "rds" {
ebs_io_balance_alarm_threshold = {{ .ExtraResources.Database.RdsAlertThresholds.EBSIOBalance | quote }}
{{- end }}
{{- if .ExtraResources.Database.RdsAlertThresholds.TotalIOPS }}
total_iops_alarm_threshold = {{ .ExtraResources.Database.RdsAlertThresholds.TotalIOPS | quote }}
{{- end }}
{{- end }}
{{- if .ExtraResources.Database.RdsAlertDurations }}
@@ -260,6 +264,10 @@ module "rds" {
ebs_io_balance_alarm_evaluation_period = {{ .ExtraResources.Database.RdsAlertDurations.EBSIOBalance | quote }}
{{- end }}
{{- if .ExtraResources.Database.RdsAlertDurations.TotalIOPS }}
total_iops_alarm_evaluation_period = {{ .ExtraResources.Database.RdsAlertDurations.TotalIOPS | quote }}
{{- end }}
{{- end }}
{{- if .ExtraResources.Database.StorageEncrypted }}

View File

@@ -21,7 +21,6 @@ module "s3-buckets" {
Name = "foo"
Environment = "dev"
DataSensitivity = "PII_SPI"
DisasterRecovery = "True"
}
}

View File

@@ -66,6 +66,7 @@ module "rds" {
write_latency_alarm_threshold = "0.5"
ebs_byte_balance_alarm_threshold = "70"
ebs_io_balance_alarm_threshold = "70"
total_iops_alarm_threshold = "80"
cpu_utilization_alarm_evaluation_period = "15"
cpucredit_balance_alarm_evaluation_period = "5"
burst_balance_alarm_evaluation_period = "5"
@@ -77,6 +78,7 @@ module "rds" {
write_latency_alarm_evaluation_period = "5"
ebs_byte_balance_alarm_evaluation_period = "5"
ebs_io_balance_alarm_evaluation_period = "5"
total_iops_alarm_evaluation_period = "10"
storage_encrypted = false
}

View File

@@ -21,7 +21,6 @@ module "s3-buckets" {
Name = "foo"
Environment = "dev"
DataSensitivity = "PII_SPI"
DisasterRecovery = "True"
}
}

View File

@@ -21,7 +21,6 @@ module "s3-buckets" {
Name = "foo"
Environment = "dev"
DataSensitivity = "PII_SPI"
DisasterRecovery = "True"
}
}

View File

@@ -49,7 +49,8 @@
"readLatency": 0.5,
"writeLatency": 0.5,
"ebsByteBalance": 70,
"ebsIOBalance": 70
"ebsIOBalance": 70,
"totalIOPS": 80
},
"rdsAlertDurations": {
"cpuUtilization": 15,
@@ -62,7 +63,8 @@
"readLatency": 5,
"writeLatency": 5,
"ebsByteBalance": 5,
"ebsIOBalance": 5
"ebsIOBalance": 5,
"totalIOPS": 10
}
},
"docdb": {

View File

@@ -282,6 +282,7 @@ type RdsAlertThresholds struct {
WriteLatency float64 `json:"writeLatency"`
EBSByteBalance int `json:"ebsByteBalance"`
EBSIOBalance int `json:"ebsIOBalance"`
TotalIOPS int `json:"totalIOPS" `
}
type RdsAlertDurations struct {
@@ -296,6 +297,7 @@ type RdsAlertDurations struct {
WriteLatency int `json:"writeLatency"`
EBSByteBalance int `json:"ebsByteBalance"`
EBSIOBalance int `json:"ebsIOBalance"`
TotalIOPS int `json:"totalIOPS"`
}
type AuroraAlertThresholds struct {
@@ -378,6 +380,16 @@ var InfraVerticals = map[string]string{
"lending": "",
}
var templateDirMap = map[string]string{
DIR_RDS_TF: "DATABASE",
DIR_ELASTIC_CACHE_TF: "ELASTIC CACHE",
DIR_DOCDB_TF: "DOCUMENT DB",
DIR_AWS_ROLES_TF: "AWS ACCESS",
DIR_S3_BUCKETS_TF: "S3 BUCKETS",
DIR_DYNAMODB_TF: "DYNAMODB",
DIR_AURORADB_TF: "DATABASE",
}
type ExtraResourceData struct {
ResourceName string `json:"resourceName"`
IsDeployed bool `json:"isDeployed"`