-
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_autoscaling_group: Add support for launch template #4305
Conversation
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.
@gordonbondon is this still work in progress? 😄 Looks in pretty good shape.
// need an AMI that listens on :80 at boot, this is: | ||
// bitnami-nginxstack-1.6.1-0-linux-ubuntu-14.04.1-x86_64-hvm-ebs-ami-99f5b1a9-3 | ||
image_id = "ami-b5b3fc85" | ||
image_id = "${data.aws_ami.test_ami.id}" |
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.
😍
@bflad almost done. I found a couple of edge cases and tried to resolve them. After my last changes acceptance test is failing like this:
But when I run the same steps manually I see My other concern is that I don't really like how
|
And maybe expandLaunchTemplateSpecification should return interface instead of |
I wouldn't try to get fancy merging types. We prefer (mostly) duplicated code over magic/indirection as it makes community maintenance easier. |
Why? Does the API return an error when both are specified or is this an issue during updates? If it does not error when both are specified, I would assume we're fine passing whichever is defined. If it does error on update because of ID/name mismatch, then we might need to introduce a |
On describe it returns:
But if you set both on Create/Update request it will return error:
Even if id matches the name. |
CustomizedDiff and SetnewComputed is great! I was looking for something like this but did not succeeded. I'll try to switch to this approach |
I've added
|
I've also tried to add plan time validation for attributes like this:
But it does not seem to work when attributes are passed from resources that does not exist yet. For example |
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.
Looks good! 🚀
20 tests passed (all tests)
=== RUN TestAccAWSAutoScalingGroup_autoGeneratedName
--- PASS: TestAccAWSAutoScalingGroup_autoGeneratedName (59.68s)
=== RUN TestAccAWSAutoScalingGroup_serviceLinkedRoleARN
--- PASS: TestAccAWSAutoScalingGroup_serviceLinkedRoleARN (80.59s)
=== RUN TestAccAWSAutoScalingGroup_classicVpcZoneIdentifier
--- PASS: TestAccAWSAutoScalingGroup_classicVpcZoneIdentifier (88.10s)
=== RUN TestAccAWSAutoScalingGroup_namePrefix
--- PASS: TestAccAWSAutoScalingGroup_namePrefix (88.62s)
=== RUN TestAccAWSAutoScalingGroup_launchTemplate
--- PASS: TestAccAWSAutoScalingGroup_launchTemplate (90.12s)
=== RUN TestAccAWSAutoScalingGroup_emptyAvailabilityZones
--- PASS: TestAccAWSAutoScalingGroup_emptyAvailabilityZones (96.52s)
=== RUN TestAccAWSAutoScalingGroup_withMetrics
--- PASS: TestAccAWSAutoScalingGroup_withMetrics (105.35s)
=== RUN TestAccAWSAutoScalingGroup_withPlacementGroup
--- PASS: TestAccAWSAutoScalingGroup_withPlacementGroup (153.29s)
=== RUN TestAccAWSAutoScalingGroup_VpcUpdates
--- PASS: TestAccAWSAutoScalingGroup_VpcUpdates (160.19s)
=== RUN TestAccAWSAutoScalingGroup_importBasic
--- PASS: TestAccAWSAutoScalingGroup_importBasic (166.02s)
=== RUN TestAccAWSAutoScalingGroup_launchTemplate_update
--- PASS: TestAccAWSAutoScalingGroup_launchTemplate_update (182.77s)
=== RUN TestAccAWSAutoScalingGroup_ALB_TargetGroups
--- PASS: TestAccAWSAutoScalingGroup_ALB_TargetGroups (185.33s)
=== RUN TestAccAWSAutoScalingGroup_enablingMetrics
--- PASS: TestAccAWSAutoScalingGroup_enablingMetrics (189.68s)
=== RUN TestAccAWSAutoScalingGroup_terminationPolicies
--- PASS: TestAccAWSAutoScalingGroup_terminationPolicies (195.38s)
=== RUN TestAccAWSAutoScalingGroup_tags
--- PASS: TestAccAWSAutoScalingGroup_tags (234.31s)
=== RUN TestAccAWSAutoScalingGroup_suspendingProcesses
--- PASS: TestAccAWSAutoScalingGroup_suspendingProcesses (262.35s)
=== RUN TestAccAWSAutoScalingGroup_initialLifecycleHook
--- PASS: TestAccAWSAutoScalingGroup_initialLifecycleHook (270.01s)
=== RUN TestAccAWSAutoScalingGroup_basic
--- PASS: TestAccAWSAutoScalingGroup_basic (345.06s)
=== RUN TestAccAWSAutoScalingGroup_ALB_TargetGroups_ELBCapacity
--- PASS: TestAccAWSAutoScalingGroup_ALB_TargetGroups_ELBCapacity (354.08s)
=== RUN TestAccAWSAutoScalingGroup_WithLoadBalancer
--- PASS: TestAccAWSAutoScalingGroup_WithLoadBalancer (697.77s)
This has been released in version 1.17.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! |
Adds support to launch ASG from template
I'll file separate PRs for #4267 and #4264 . They are using the same structure.
Tests: