Loading...
Loading...
### Terraform Version ```shell 1.10.1 ``` ### Terraform Configuration Files ``` resource "aws_ssm_association" "disable_alarms" { count = length(var.cloudwatch_alarms) > 0 ? 1 : 0 association_name = "${module.label.name}-disable-rds-alarms-ssm-association" name = local.cw_alarm_ssm_document_name schedule_expression = var.stop_schedule apply_only_at_cron_interval = true parameters = { AutomationAssumeRole = aws_iam_role.ssm_cloudwatch_alarm[0].arn CloudWatchAlarms = join(", ", var.cloudwatch_alarms) Action = "Disable" } depends_on = [ aws_iam_role.ssm_cloudwatch_alarm ] } ``` ### Debug Output module.jd_rds_scheduler[0].aws_ssm_association.disable_alarms[0] - *terraform.NodeApplyableResourceInstance module.jd_rds_scheduler (expand) - *terraform.nodeExpandModule module.jd_rds_scheduler.aws_iam_role.ssm_cloudwatch_alarm (expand) - *terraform.nodeExpandApplyableResource module.jd_rds_scheduler.aws_ssm_association.disable_alarms (expand) - *terraform.nodeExpandApplyableResource module.jd_rds_scheduler.local.cw_alarm_ssm_document_name (expand) - *terraform.nodeExpandLocal module.jd_rds_scheduler.module.label.output.name (expand) - *terraform.nodeExpandOutput module.jd_rds_scheduler.var.cloudwatch_alarms (expand) - *terraform.nodeExpandModuleVariable module.jd_rds_scheduler.var.stop_schedule (expand) - *terraform.nodeExpandModuleVariable module.jd_rds_scheduler[0].aws_iam_role.ssm_cloudwatch_alarm[0] - *terraform.NodeApplyableResourceInstance provider["registry.terraform.io/hashicorp/aws"] - *terraform.NodeApplyableProvider ### Expected Behavior The terraform is applying the list for the parameter "CloudWatchAlarms", which in the AWS console when you enter the edit option for the ssm association, looks like alarm_1, alarm_2 This is correct and expected and it is the same way you would save the list if doing it manually via the console  ### Actual Behavior After applying via terraform, when you are in the AWS console and navigate to the ssm association, under the parameters tab, the "CloudWatchAlarms" parameter looks like alarm_1, alarm_2. Executing this association does not work. (see screenshot below)  Although, when creating the association manually in the AWS console, when the alarms are saved as expected saved like alarm_1, alarm_2. When saved and navigate to the parameters tab, the "CloudWatchAlarms" parameter looks like alarm_1alarm_2. This association does work. (See screenshots below)  Essentially Terraform is saving the final list as alarm_1, alarm_2 when AWS saves it like alarm_1alarm_2. ### Steps to Reproduce 1. Terraform init 2. Terraform plan 3. Terraform apply 4. In the console, click the edit tab of the ssm association (list of alarms is supplied) 5. In the console, click the parameters tab of the ssm association (AWS and terraform save the final list differently) ### Additional Context _No response_ ### References _No response_
Click on a version to see all relevant bugs
Terraform Integration
Learn more about where this data comes from
Bug Scrub Advisor
Streamline upgrades with automated vendor bug scrubs
BugZero Enterprise
Wish you caught this bug sooner? Get proactive today.