Skip to content

Commit

Permalink
rds fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
luisffc committed Oct 17, 2023
1 parent 715c714 commit 52c4b35
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions pipelines/ec2/modify_rds_db_instance.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,22 @@ pipeline "modify_rds_db_instance" {
default = var.secret_access_key
}

param "instance_identifier" {
param "db_instance_identifier" {
type = string
description = "The instance ID."
optional = true
description = "The identifier of DB instance to modify. This value is stored as a lowercase string."
}

param "publicly_accessible" {
type = bool
description = "Whether the DB instance is publicly accessible."
description = "Specifies whether the DB instance is publicly accessible."
optional = true
}

step "container" "modify_rds_db_instance" {
image = "amazon/aws-cli"

cmd = concat(
["rds", "modify-db-instance", "--apply-immediately", "--db-instance-identifier", param.instance_identifier],
["rds", "modify-db-instance", "--apply-immediately", "--db-instance-identifier", param.db_instance_identifier],
param.publicly_accessible != null ? param.publicly_accessible ? ["--publicly-accessible"] : ["--no-publicly-accessible"] : [],
)

Expand All @@ -50,6 +49,6 @@ pipeline "modify_rds_db_instance" {
}

output "stderr" {
value = jsondecode(step.container.modify_rds_db_instance.stderr)
value = step.container.modify_rds_db_instance.stderr
}
}

0 comments on commit 52c4b35

Please sign in to comment.