-
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
autoscaling: set conflict between availability_zones and vpc_zone_identifier #12927
autoscaling: set conflict between availability_zones and vpc_zone_identifier #12927
Conversation
Hi @bendrucker 👋 Thank you for submitting this change. Please note I've marked this as a breaking change, since it currently causes some existing acceptance testing to fail that previously succeeded:
The test configurations with these are using empty lists with the arguments, e.g. resource "aws_autoscaling_group" "test" {
min_size = 0
max_size = 0
availability_zones = []
launch_configuration = "${aws_launch_configuration.test.name}"
vpc_zone_identifier = ["${aws_subnet.test.id}"]
} Which the resource code is designed to only pass elements when there is more than 0, e.g. The Terraform Plugin SDK |
This reverts commit 4cd65db.
Thank you! Rushed through this a bit and didn't have a chance to run the acceptance tests. Totally understand that this is breaking, I have a similar change or two (adding
I can set up and actually run the tests later today. It also seemed like |
Verified that the remaining acceptance test passes: make testacc TESTARGS='-run=TestAccAWSAutoScalingGroup_classicVpcZoneIdentifier' |
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.
After minor adjustments to fix another test configuration that snuck in with the conflicting arguments, LGTM, thanks @bendrucker 🚀
Output from acceptance testing:
--- PASS: TestAccAWSAutoScalingGroup_ALB_TargetGroups (149.76s)
--- PASS: TestAccAWSAutoScalingGroup_ALB_TargetGroups_ELBCapacity (305.03s)
--- PASS: TestAccAWSAutoScalingGroup_autoGeneratedName (48.42s)
--- PASS: TestAccAWSAutoScalingGroup_basic (263.71s)
--- PASS: TestAccAWSAutoScalingGroup_classicVpcZoneIdentifier (110.01s)
--- PASS: TestAccAWSAutoScalingGroup_enablingMetrics (201.08s)
--- PASS: TestAccAWSAutoScalingGroup_initialLifecycleHook (343.64s)
--- PASS: TestAccAWSAutoScalingGroup_launchTemplate (40.12s)
--- PASS: TestAccAWSAutoScalingGroup_LaunchTemplate_IAMInstanceProfile (61.25s)
--- PASS: TestAccAWSAutoScalingGroup_launchTemplate_update (139.49s)
--- PASS: TestAccAWSAutoScalingGroup_launchTempPartitionNum (45.25s)
--- PASS: TestAccAWSAutoScalingGroup_LoadBalancers (703.48s)
--- PASS: TestAccAWSAutoScalingGroup_MaxInstanceLifetime (79.42s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy (266.34s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_OnDemandAllocationStrategy (106.47s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_OnDemandBaseCapacity (79.45s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_OnDemandPercentageAboveBaseCapacity (48.15s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_SpotAllocationStrategy (96.45s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_SpotInstancePools (72.86s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_SpotMaxPrice (77.33s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_UpdateToZeroOnDemandBaseCapacity (45.55s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_LaunchTemplate_LaunchTemplateSpecification_LaunchTemplateName (52.49s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_LaunchTemplate_LaunchTemplateSpecification_Version (73.51s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_LaunchTemplate_Override_InstanceType (76.41s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_LaunchTemplate_Override_WeightedCapacity (161.24s)
--- PASS: TestAccAWSAutoScalingGroup_namePrefix (55.45s)
--- PASS: TestAccAWSAutoScalingGroup_serviceLinkedRoleARN (48.37s)
--- PASS: TestAccAWSAutoScalingGroup_suspendingProcesses (206.53s)
--- PASS: TestAccAWSAutoScalingGroup_tags (261.72s)
--- PASS: TestAccAWSAutoScalingGroup_TargetGroupArns (185.94s)
--- PASS: TestAccAWSAutoScalingGroup_terminationPolicies (133.73s)
--- PASS: TestAccAWSAutoScalingGroup_VpcUpdates (76.21s)
--- PASS: TestAccAWSAutoScalingGroup_WithLoadBalancer (339.36s)
--- PASS: TestAccAWSAutoScalingGroup_WithLoadBalancer_ToTargetGroup (332.66s)
--- PASS: TestAccAWSAutoScalingGroup_withMetrics (129.58s)
--- PASS: TestAccAWSAutoScalingGroup_withPlacementGroup (168.23s)
…one_identifier ConflictsWith Reference: #12927 Output from acceptance testing: ``` --- PASS: TestAccAWSAutoScalingGroup_ALB_TargetGroups (149.76s) --- PASS: TestAccAWSAutoScalingGroup_ALB_TargetGroups_ELBCapacity (305.03s) --- PASS: TestAccAWSAutoScalingGroup_autoGeneratedName (48.42s) --- PASS: TestAccAWSAutoScalingGroup_basic (263.71s) --- PASS: TestAccAWSAutoScalingGroup_classicVpcZoneIdentifier (110.01s) --- PASS: TestAccAWSAutoScalingGroup_enablingMetrics (201.08s) --- PASS: TestAccAWSAutoScalingGroup_initialLifecycleHook (343.64s) --- PASS: TestAccAWSAutoScalingGroup_launchTemplate (40.12s) --- PASS: TestAccAWSAutoScalingGroup_LaunchTemplate_IAMInstanceProfile (61.25s) --- PASS: TestAccAWSAutoScalingGroup_launchTemplate_update (139.49s) --- PASS: TestAccAWSAutoScalingGroup_launchTempPartitionNum (45.25s) --- PASS: TestAccAWSAutoScalingGroup_LoadBalancers (703.48s) --- PASS: TestAccAWSAutoScalingGroup_MaxInstanceLifetime (79.42s) --- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy (266.34s) --- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_OnDemandAllocationStrategy (106.47s) --- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_OnDemandBaseCapacity (79.45s) --- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_OnDemandPercentageAboveBaseCapacity (48.15s) --- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_SpotAllocationStrategy (96.45s) --- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_SpotInstancePools (72.86s) --- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_SpotMaxPrice (77.33s) --- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_UpdateToZeroOnDemandBaseCapacity (45.55s) --- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_LaunchTemplate_LaunchTemplateSpecification_LaunchTemplateName (52.49s) --- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_LaunchTemplate_LaunchTemplateSpecification_Version (73.51s) --- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_LaunchTemplate_Override_InstanceType (76.41s) --- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_LaunchTemplate_Override_WeightedCapacity (161.24s) --- PASS: TestAccAWSAutoScalingGroup_namePrefix (55.45s) --- PASS: TestAccAWSAutoScalingGroup_serviceLinkedRoleARN (48.37s) --- PASS: TestAccAWSAutoScalingGroup_suspendingProcesses (206.53s) --- PASS: TestAccAWSAutoScalingGroup_tags (261.72s) --- PASS: TestAccAWSAutoScalingGroup_TargetGroupArns (185.94s) --- PASS: TestAccAWSAutoScalingGroup_terminationPolicies (133.73s) --- PASS: TestAccAWSAutoScalingGroup_VpcUpdates (76.21s) --- PASS: TestAccAWSAutoScalingGroup_WithLoadBalancer (339.36s) --- PASS: TestAccAWSAutoScalingGroup_WithLoadBalancer_ToTargetGroup (332.66s) --- PASS: TestAccAWSAutoScalingGroup_withMetrics (129.58s) --- PASS: TestAccAWSAutoScalingGroup_withPlacementGroup (168.23s) ```
Thank you! |
This has been released in version 3.0.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks! |
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! |
Community Note
This PR adds
ConflictsWith
tovpc_zone_identifier
, ensuring that a user that has passed VPC subnet IDs does not also pass a set of AZ names. This configuration would have previously resulted in an error on apply and now will trigger and error during validation.Relates to #9622
Release note for CHANGELOG: