Merge pull request #195 from navi-infra/revert-194-revert-193-INFRA-3115

INFRA-3115 | Ankit Bhardwaj | add snapshot_identifier rds tf
This commit is contained in:
Ankit Bhardwaj Bhardwaj
2024-05-10 11:46:57 +05:30
committed by GitHub
7 changed files with 264 additions and 368 deletions

File diff suppressed because one or more lines are too long

View File

@@ -38,7 +38,7 @@ for provider in $providers; do
terraform state replace-provider -auto-approve "$provider" "$correct_provider"
done
printf '\n'
terraform state list | grep 'module.rds.module.postgres_db.postgresql_database.this' && terraform state rm 'module.rds.module.postgres_db.postgresql_database.this'
{{- if .Actions.Plan }}
terraform_action=plan
terraform $terraform_action -target=module.rds.module.rds_instance -target=module.rds.module.rds_instance_replica -target=module.rds.data.aws_subnet_ids.command_private_subnets -target=module.rds.data.aws_subnets.command_private_subnets $additional_terraform_options

View File

@@ -270,6 +270,9 @@ module "rds" {
{{- else }}
storage_encrypted = false
{{- end }}
{{- if .ExtraResources.Database.SnapshotIdentifier }}
snapshot_identifier = {{ .ExtraResources.Database.SnapshotIdentifier | quote }}
{{- end}}
}

View File

@@ -33,6 +33,7 @@ for provider in $providers; do
terraform state replace-provider -auto-approve "$provider" "$correct_provider"
done
printf '\n'
terraform state list | grep 'module.rds.module.postgres_db.postgresql_database.this' && terraform state rm 'module.rds.module.postgres_db.postgresql_database.this'
state_migration
terraform_action=apply
terraform $terraform_action -target=module.rds.data.aws_subnet_ids.command_private_subnets -target=module.rds.data.aws_subnets.command_private_subnets $additional_terraform_options

View File

@@ -33,6 +33,7 @@ for provider in $providers; do
terraform state replace-provider -auto-approve "$provider" "$correct_provider"
done
printf '\n'
terraform state list | grep 'module.rds.module.postgres_db.postgresql_database.this' && terraform state rm 'module.rds.module.postgres_db.postgresql_database.this'
state_migration
terraform_action=apply
terraform $terraform_action -target=module.rds.data.aws_subnet_ids.command_private_subnets -target=module.rds.data.aws_subnets.command_private_subnets $additional_terraform_options

View File

@@ -33,6 +33,7 @@ for provider in $providers; do
terraform state replace-provider -auto-approve "$provider" "$correct_provider"
done
printf '\n'
terraform state list | grep 'module.rds.module.postgres_db.postgresql_database.this' && terraform state rm 'module.rds.module.postgres_db.postgresql_database.this'
state_migration
terraform_action=apply
terraform $terraform_action -target=module.rds.data.aws_subnet_ids.command_private_subnets -target=module.rds.data.aws_subnets.command_private_subnets $additional_terraform_options

View File

@@ -165,6 +165,7 @@ type Database struct {
KmsKeyId string `json:"kmsKeyId"`
StatementTimeout int `json:"statementTimeout"`
TeleportUserStatementTimeout int `json:"teleportUserStatementTimeout"`
SnapshotIdentifier string `json:"snapshotIdentifier"`
}
type ElasticCache struct {