You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AWS only requires the policy name to be unique given a resource id, service namespace, and scalable dimension, but Terraform assumes the policy names are globally unique. This makes the behavior of aws_appautoscaling_policy non-deterministic when the same policy name is reused for different resources.
Terraform Version
v0.9.4
Affected Resource(s)
Please list the resources as a list, for example:
aws_appautoscaling_policy
Terraform Configuration Files
Our configuration leverages a module named ecs_autoscaling, and its contents are here:
Since Terraform assumes the names are globally unique, the behavior depends on the order of results from the call to applicationautoscaling.DescribeScalingPolicies.
Steps to Reproduce
Execute terraform apply multiple times and observe that changes are made continuously.
Important Factoids
The issue is getAwsAppautoscalingPolicy only passes the policy name and service namespace parameters to applicationautoscaling.DescribeScalingPolicies, and uses the first result which matches the policy name. It should also pass the resource id and scalable dimension parameters, and assert that it gets at most 1 result back.
The text was updated successfully, but these errors were encountered:
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.
ghost
locked and limited conversation to collaborators
Apr 9, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
AWS only requires the policy name to be unique given a resource id, service namespace, and scalable dimension, but Terraform assumes the policy names are globally unique. This makes the behavior of
aws_appautoscaling_policy
non-deterministic when the same policy name is reused for different resources.Terraform Version
v0.9.4
Affected Resource(s)
Please list the resources as a list, for example:
aws_appautoscaling_policy
Terraform Configuration Files
Our configuration leverages a module named
ecs_autoscaling
, and its contents are here:Then the main configuration file leverages it like this:
Actual Behavior
Since Terraform assumes the names are globally unique, the behavior depends on the order of results from the call to
applicationautoscaling.DescribeScalingPolicies
.Steps to Reproduce
Execute
terraform apply
multiple times and observe that changes are made continuously.Important Factoids
The issue is getAwsAppautoscalingPolicy only passes the policy name and service namespace parameters to
applicationautoscaling.DescribeScalingPolicies
, and uses the first result which matches the policy name. It should also pass the resource id and scalable dimension parameters, and assert that it gets at most 1 result back.The text was updated successfully, but these errors were encountered: