hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.81k stars 9.15k forks source link

AWS Cloudwatch Synthetic canary minimum timeout value incorrect #19289

Closed brendan-sherrin closed 3 years ago

brendan-sherrin commented 3 years ago

Community Note

Terraform CLI and Terraform AWS Provider Version

Terraform v0.12.30

Affected Resource(s)

aws_synthetics_canary

Terraform Configuration Files

resource "aws_synthetics_canary" "canary" {
  for_each = local.site_list
  depends_on = [ data.archive_file.canary-zip, aws_iam_role.canary-execution-role, aws_iam_role_policy_attachment.canary-role_attachment ]
  name                 = lookup(each.value, "friendly_name") #names have to be unique...
  artifact_s3_location = "s3://${aws_s3_bucket.<name>.bucket}/"   
  execution_role_arn   = aws_iam_role.canary-execution-role.arn
  handler              = "${lookup(each.value, "friendly_name")}.handler" 
  zip_file             = data.archive_file.canary-zip[each.key].output_path
  runtime_version      = "syn-python-selenium-1.0"  
  start_canary = true

  schedule {
    expression = "rate(1 minute)"
  }

  run_config {
    timeout_in_seconds = 5  
    memory_in_mb = 960  
  }
}

Expected Behavior

Canary should be created with a timeout of 5 seconds

Per AWS documentation, the minimum is 3 seconds: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-synthetics-canary-runconfig.html TimeoutInSeconds: Minimum: 3

Actual Behavior

The following error message was displayed: Error: expected run_config.0.timeout_in_seconds to be in the range (60 - 840), got 5

22: timeout_in_seconds = 5

Steps to Reproduce

  1. Create a aws_synthetics_canary resource with a run_config, timeout_in_seconds value of less than 60
  2. Terraform apply

Important Factoids

Nope

References

AWS documentation showing minimum value of 3 seconds. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-synthetics-canary-runconfig.html

ewbankkit commented 3 years ago

Relevant AWS API Reference.

github-actions[bot] commented 3 years ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.