-
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/autoscaling_group Add support for service linked roles #3812
Conversation
Thank you for the PR, this option is an option that I need as well. |
"service_linked_role_arn": { | ||
Type: schema.TypeString, | ||
Optional: true, | ||
}, |
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.
I believe you'll need to add Computed: true,
for this new attribute as well since I'm getting all test failures with:
=== RUN TestAccAWSAutoScalingGroup_ALB_TargetGroups
--- FAIL: TestAccAWSAutoScalingGroup_ALB_TargetGroups (78.41s)
testing.go:518: Step 0 error: After applying this step, the plan was not empty:
DIFF:
UPDATE: aws_autoscaling_group.bar
service_linked_role_arn: "arn:aws:iam::*******:role/aws-service-role/autoscaling.amazonaws.com/AWSServiceRoleForAutoScaling" => ""
=== RUN TestAccAWSAutoScalingGroup_ALB_TargetGroups_ELBCapacity
--- FAIL: TestAccAWSAutoScalingGroup_ALB_TargetGroups_ELBCapacity (336.79s)
testing.go:518: Step 0 error: After applying this step, the plan was not empty:
DIFF:
UPDATE: aws_autoscaling_group.bar
service_linked_role_arn: "arn:aws:iam::*******:role/aws-service-role/autoscaling.amazonaws.com/AWSServiceRoleForAutoScaling" => ""
...
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.
Hmm, interesting the tests pass for me both with and without Computed: true
... I'll make the amendment in the moment.
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.
It might be related to if an AWS account has already had the service linked role automatically created by AWS. Running the acceptance tests again!
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.
Ah ha, here it is:
For existing EC2 Auto Scaling customers, EC2 Auto Scaling will add a default EC2 Auto Scaling service-linked role in your account and your existing Auto Scaling groups will be updated to use this role over the next few weeks.
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.
Thanks for this contribution! 😄 Let's get this into the release.
Test failure unrelated:
Tests failed: 1, passed: 17
=== RUN TestAccAWSAutoScalingGroup_autoGeneratedName
--- PASS: TestAccAWSAutoScalingGroup_autoGeneratedName (54.98s)
=== RUN TestAccAWSAutoScalingGroup_serviceLinkedRoleARN
--- PASS: TestAccAWSAutoScalingGroup_serviceLinkedRoleARN (56.05s)
=== RUN TestAccAWSAutoScalingGroup_emptyAvailabilityZones
--- PASS: TestAccAWSAutoScalingGroup_emptyAvailabilityZones (60.97s)
=== RUN TestAccAWSAutoScalingGroup_classicVpcZoneIdentifier
--- PASS: TestAccAWSAutoScalingGroup_classicVpcZoneIdentifier (90.47s)
=== RUN TestAccAWSAutoScalingGroup_VpcUpdates
--- PASS: TestAccAWSAutoScalingGroup_VpcUpdates (98.07s)
=== RUN TestAccAWSAutoScalingGroup_namePrefix
--- PASS: TestAccAWSAutoScalingGroup_namePrefix (108.25s)
=== RUN TestAccAWSAutoScalingGroup_withMetrics
--- PASS: TestAccAWSAutoScalingGroup_withMetrics (114.73s)
=== RUN TestAccAWSAutoScalingGroup_terminationPolicies
--- PASS: TestAccAWSAutoScalingGroup_terminationPolicies (147.11s)
=== RUN TestAccAWSAutoScalingGroup_withPlacementGroup
--- PASS: TestAccAWSAutoScalingGroup_withPlacementGroup (151.24s)
=== RUN TestAccAWSAutoScalingGroup_ALB_TargetGroups
--- PASS: TestAccAWSAutoScalingGroup_ALB_TargetGroups (166.40s)
=== RUN TestAccAWSAutoScalingGroup_enablingMetrics
--- PASS: TestAccAWSAutoScalingGroup_enablingMetrics (181.19s)
=== RUN TestAccAWSAutoScalingGroup_importBasic
--- PASS: TestAccAWSAutoScalingGroup_importBasic (211.20s)
=== RUN TestAccAWSAutoScalingGroup_suspendingProcesses
--- PASS: TestAccAWSAutoScalingGroup_suspendingProcesses (244.18s)
=== RUN TestAccAWSAutoScalingGroup_tags
--- PASS: TestAccAWSAutoScalingGroup_tags (264.98s)
=== RUN TestAccAWSAutoScalingGroup_basic
--- PASS: TestAccAWSAutoScalingGroup_basic (301.56s)
=== RUN TestAccAWSAutoScalingGroup_initialLifecycleHook
--- PASS: TestAccAWSAutoScalingGroup_initialLifecycleHook (317.43s)
=== RUN TestAccAWSAutoScalingGroup_WithLoadBalancer
--- PASS: TestAccAWSAutoScalingGroup_WithLoadBalancer (327.29s)
=== RUN TestAccAWSAutoScalingGroup_ALB_TargetGroups_ELBCapacity
--- FAIL: TestAccAWSAutoScalingGroup_ALB_TargetGroups_ELBCapacity (766.66s)
testing.go:518: Step 0 error: Error applying: 2 error(s) occurred:
* aws_autoscaling_group.bar: 1 error(s) occurred:
* aws_autoscaling_group.bar: "tf-asg-20180323151034815600000003": Waiting up to 10m0s: Need at least 2 healthy instances in ELB, have 0. Most recent activity: {
ActivityId: "e715894d-a5d1-ff7b-03fa-fa93241189c2",
AutoScalingGroupName: "tf-asg-20180323151034815600000003",
Cause: "At 2018-03-23T15:10:35Z a user request created an AutoScalingGroup changing the desired capacity from 0 to 2. At 2018-03-23T15:10:40Z an instance was started in response to a difference between desired and actual capacity, increasing the capacity from 0 to 2.",
Description: "Launching a new EC2 instance: i-0af1abc35a652a85c",
Details: "{\"Subnet ID\":\"subnet-04cd014f\",\"Availability Zone\":\"us-west-2a\"}",
EndTime: 2018-03-23 15:11:16 +0000 UTC,
Progress: 100,
StartTime: 2018-03-23 15:10:42.815 +0000 UTC,
StatusCode: "Successful"
}
* aws_lb.test_lb: 1 error(s) occurred:
* aws_lb.test_lb: Error creating Application Load Balancer: InvalidSubnet: VPC vpc-acb5ced5 has no internet gateway
status code: 400, request id: 5531ce18-2eac-11e8-a765-295bf89d1c77
This has been released in version 1.12.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
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! |
Closes #3587