terraform-provider-aws: [Bug]: Error upon plan/apply of `aws_appautoscaling_target` on v4.66.0
Terraform Core Version
0.12.31
AWS Provider Version
4.66.0
Affected Resource(s)
aws_appautoscaling_target
Expected Behavior
Resource provisioning with or without tags.
Actual Behavior
Results in an error snippet when tried with or without tags for aws_appautoscaling_target resource. Please note that the same code was working with v4.65.0 of the Terraform AWS provider and the mentioned Terraform version.
Change introduced in v4.66.0.
Relevant Error/Panic Output Snippet
Error: listing tags for Application Auto Scaling Target (): InvalidParameter: 1 validation error(s) found.
minimum field size of 1, ListTagsForResourceInput.ResourceARN.
Terraform Configuration Files
resource "aws_appautoscaling_target" "ecs_target" {
max_capacity = 4
min_capacity = 1
resource_id = "service/${aws_ecs_cluster.example.name}/${aws_ecs_service.example.name}"
scalable_dimension = "ecs:service:DesiredCount"
service_namespace = "ecs"
}
Steps to Reproduce
terrform plan
OR
terraform apply
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
No
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 90
- Comments: 18 (3 by maintainers)
It looks like the problem is that some (all?) targets created before 2023-03-20 (when the tagging feature was added to the AWS SDK) don’t have an ARN assigned. The ARN is used to make the
ListTagscall which is happening onterraform refresh.We’ll also have to do something equivalent for the
UpdateTagscase whendefault_tagsare configured (or eventagson the resource itself).We’ll fix this and get a patch release published.
Community Note
Voting for Prioritization
Volunteering to Work on This Issue
i’m also seeing this after 4.66 got picked up
The fix is available in v4.66.1 of the Terraform AWS Provider: https://registry.terraform.io/providers/hashicorp/aws/4.66.1.
I have temporarily restricted the version of the provider within my module. (temp fix)
Hello , I was facing the same problem, this is specifically related to version 4.66.0 meanwhile, I have fixed it by hardcoding the version to “4.65.0” If you have different version in the locked provider just use
“terraform init upgrade” (To match the version as your config)
@vadym-sedna the pipeline is running https://github.com/hashicorp/terraform-provider-aws
Also had this issue. Looks like is is an issue with the
4.66.0version of the AWS provider released today. Fixed it by setting the version to4.65.0or earlier.