作者:小叶2502854061 | 来源:互联网 | 2023-09-18 16:35
Terraform Version
0.11.0
Affected Resource(s)
- aws_appautoscaling_target
Terraform Configuration Files
1 2 3 4 5 6 7 8 9
| hcl
resource "aws_appautoscaling_target" "dynamodb_table_read_target" {
max_capacity = 100
min_capacity = 5
resource_id = "table/tableName"
role_arn = "${data.aws_iam_role.DynamoDBAutoscaleRole.arn}"
scalable_dimension = "dynamodb:table:ReadCapacityUnits"
service_namespace = "dynamodb"
} |
Expected Behavior
role_arn is set to appriopriate role for that autoscaling_target
Actual Behavior
role_arn is set to 'AWSServiceRoleForApplicationAutoScaling_DynamoDBTable' - this causes this future deployments to always try and update this autoscaling target
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
1. ensure us-east-1
1.
Important Factoids
I've been talking AWS service team about this issue as it also happened through the AWS Console. Turns out this is a new "feature" currently only active on "us-east-1". Basically it creates it own role regardless of what you specify. See http://docs.aws.amazon.com/ApplicationAutoScaling/latest/APIReference/application-autoscaling-service-linked-roles.html
I'm fine either way but RoleArn is 'required' by the terraform resource. I've worked around it by hardcoding the RoleArn to when deploying to 'us-east-1'. Probably should makes this property optional (it's optional in AWS CLI btw)
该提问来源于开源项目:hashicorp/terraform-provider-aws
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!