-
Notifications
You must be signed in to change notification settings - Fork 9.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
r/aws_appautoscaling_target: Skip ListTags
/UpdateTags
for existing resources with no assigned ARN
#31214
Conversation
Community NoteVoting for Prioritization
For Submitters
|
ListTags
for existing resources with no assigned ARNListTags
/UpdateTags
for existing resources with no assigned ARN
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
v4.65.0
➜ make import
aws_appautoscaling_target.test: Importing from ID "ecs/service/cluster-8xupcpmfyu/foobar/ecs:service:DesiredCount"...
aws_appautoscaling_target.test: Import prepared!
Prepared aws_appautoscaling_target for import
aws_appautoscaling_target.test: Refreshing state... [id=service/cluster-8xupcpmfyu/foobar]
Import successful!
The resources that were imported are shown above. These resources are now in
your Terraform state and will henceforth be managed by Terraform.
➜ make plan
aws_appautoscaling_target.test: Refreshing state... [id=service/cluster-8xupcpmfyu/foobar]
No changes. Your infrastructure matches the configuration.
v4.66.0
➜ make plan
aws_appautoscaling_target.test: Refreshing state... [id=service/cluster-8xupcpmfyu/foobar]
Planning failed. Terraform encountered an error while generating this plan.
╷
│ Error: listing tags for Application Auto Scaling Target (): InvalidParameter: 1 validation error(s) found.
│ - minimum field size of 1, ListTagsForResourceInput.ResourceARN.
│
│
│ with aws_appautoscaling_target.test,
│ on main.tf line 13, in resource "aws_appautoscaling_target" "test":
│ 13: resource "aws_appautoscaling_target" "test" {
│
patch branch:
➜ make plan
aws_appautoscaling_target.test: Refreshing state... [id=service/cluster-8xupcpmfyu/foobar]
No changes. Your infrastructure matches the configuration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
Add link to related feature GA
We got around this bug in the end by forcing our provider back to 4.65.0. Hopefully 4.67.0 will prove to be stable and we can revert to using the latest minor/patch version below 5.0 🤞 |
The fix is available in v4.66.1 of the Terraform AWS Provider: https://registry.terraform.io/providers/hashicorp/aws/4.66.1. |
This functionality has been released in v4.66.1 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. Thank you! |
We switched back to 4.66.1 and everything is fixed now. Thanks @ewbankkit 🙇 |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Description
Older
aws_appautoscaling_target
s have no ARN assigned by AWS. This causes errors when making theListTags
call to get any resource tags.Skip the call if no ARN (or more generally, no identifier value) is present.
The same logic applies to
UpdateTags
(e.g. when usingdefault_tags
).Maintainer Instructions
In the main test account, with this configuration:
If we then add some default tags:
The "permadiff" can be suppressed via a
lifecycle.ignore_changes
meta-argument.Relations
Closes #31180.
Relates #30172.
Relates #28391.
Output from Acceptance Testing