diff --git a/.changelog/34084.txt b/.changelog/34084.txt new file mode 100644 index 000000000000..2cb1d78d6167 --- /dev/null +++ b/.changelog/34084.txt @@ -0,0 +1,3 @@ +```release-note:bug +resource/aws_synthetics_canary: Fix to properly suppress differences when `expression` is `rate(0 minutes)` +``` diff --git a/internal/service/synthetics/canary.go b/internal/service/synthetics/canary.go index b674d9669b8c..e191f6819dbb 100644 --- a/internal/service/synthetics/canary.go +++ b/internal/service/synthetics/canary.go @@ -185,7 +185,7 @@ func ResourceCanary() *schema.Resource { Type: schema.TypeString, Required: true, DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - return new == "rate(0 minute)" && old == "rate(0 hour)" + return (new == "rate(0 minute)" || new == "rate(0 minutes)") && old == "rate(0 hour)" }, }, }, diff --git a/internal/service/synthetics/canary_test.go b/internal/service/synthetics/canary_test.go index 249efbcc1b65..4c35c2f1c3bc 100644 --- a/internal/service/synthetics/canary_test.go +++ b/internal/service/synthetics/canary_test.go @@ -895,7 +895,7 @@ resource "aws_synthetics_canary" "test" { execution_role_arn = aws_iam_role.test.arn handler = "exports.handler" zip_file = "test-fixtures/lambdatest.zip" - runtime_version = "syn-nodejs-puppeteer-3.3" + runtime_version = "syn-nodejs-puppeteer-3.9" delete_lambda = true artifact_config { @@ -926,7 +926,7 @@ resource "aws_synthetics_canary" "test" { execution_role_arn = aws_iam_role.test.arn handler = "exports.handler" zip_file = "test-fixtures/lambdatest.zip" - runtime_version = "syn-nodejs-puppeteer-3.3" + runtime_version = "syn-nodejs-puppeteer-3.9" delete_lambda = true artifact_config {