Skip to content

Commit

Permalink
Merge pull request #34084 from carcher5432/fix-canary-schedule-condition
Browse files Browse the repository at this point in the history
Fixed diff suppress function on canary schedule expression
  • Loading branch information
jar-b committed Nov 10, 2023
2 parents 8e6e118 + 2421f68 commit aeb7416
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .changelog/34084.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
resource/aws_synthetics_canary: Fix to properly suppress differences when `expression` is `rate(0 minutes)`
```
2 changes: 1 addition & 1 deletion internal/service/synthetics/canary.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
},
},
},
Expand Down
4 changes: 2 additions & 2 deletions internal/service/synthetics/canary_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit aeb7416

Please sign in to comment.