-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
aws_appautoscaling_target update detaches any aws_appautoscaling_policy's #8484
Comments
I just experienced this as well, +1 |
I also encountered this issue with v0.7.13 |
Same issue with v0.8.1 |
We're seeing the same issue in v0.8.8. |
Any update on this issue? This is still happening in v0.9.6 and is really critical for us. |
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. |
Hi there,
Updating an
aws_appautoscaling_target
(which always forces a new resource) does not trigger dependentaws_appautoscaling_policy
s to be recreated. As a result, updatingmin_capacity
ormax_capacity
causes all dependentaws_appautoscaling_policy
s to be deleted/detached, requiring a subsequentterraform apply
to reattach them.Terraform Version
v0.7.0+
Affected Resource(s)
aws_appautoscaling_target
aws_appautoscaling_policy
Terraform Configuration Files
Expected Behavior
The
aws_appautoscaling_target
would be updated and theaws_appautoscaling_policy
would still be attached.Actual Behavior
The
aws_appautoscaling_target
was deleted and re-created, but theaws_appautoscaling_policy
was lost in the process. A subsequentterraform apply
will add it back, but it either should not have been removed or it should also have been recreated along with theaws_appautoscaling_target
.Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform apply
aws_appautoscaling_target.target.max_capacity
to3
terraform apply
(causes the policy detachment)terraform apply
(reattaches the policy)Important Factoids
According to the AWS docs, the
aws_appautoscaling_target
can be created as well as updated viaRegisterScalableTarget
. Perhaps this could be used instead of recreating theaws_appautoscaling_target
on update.The text was updated successfully, but these errors were encountered: