Closed brendan-sherrin closed 3 years ago
Thanks for reporting this, @brendan-sherrin. The AWS documentation doesn't specify it, but the AWS Console says "A name consists of up to 21 lowercase letters, numbers, hyphens or underscores with no spaces." We will update the error message and the Terraform documentation.
This has been released in version 3.38.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.
For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!
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.
Community Note
Terraform CLI and Terraform AWS Provider Version
Terraform v0.12.30
Affected Resource(s)
aws_cloudwatch_metric_alarm
Terraform Configuration Files
Debug Output
Error: invalid value for name (must contain only alphanumeric, hyphen, underscore.)
on synthetics_canary\cloudwatch_canary.tf line 41, in resource "aws_synthetics_canary" "canary_api": 41: name = lookup(each.value, "friendly_name")
Panic Output
Expected Behavior
Either of:
Actual Behavior
I recieved an error message that didn't tell me what the actual problem was.
Steps to Reproduce
Important Factoids
References
The doco here just mentions the name needs to be unique, nothing about a requirment to be lower case only: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm