-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
rd/aws_instance and rd/aws_launch_template: Add support for metadata_options #12491
Conversation
aws/provider_test.go
Outdated
@@ -1093,6 +1095,61 @@ func testAccCheckAWSProviderPartition(providers *[]*schema.Provider, expectedPar | |||
} | |||
} | |||
|
|||
// testAccPreCheckHasDefaultVpc checks that the test region has a default VPC. |
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.
These new pre-check functions are copied from #11126.
35ab82e
to
fc578dd
Compare
…_response_hop_limit.
Rebased and removed merge conflict. $ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSLaunchTemplateDataSource_'==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -count 1 -parallel 20 -run=TestAccAWSLaunchTemplateDataSource_ -timeout 120m
=== RUN TestAccAWSLaunchTemplateDataSource_basic
=== PAUSE TestAccAWSLaunchTemplateDataSource_basic
=== RUN TestAccAWSLaunchTemplateDataSource_filter_basic
=== PAUSE TestAccAWSLaunchTemplateDataSource_filter_basic
=== RUN TestAccAWSLaunchTemplateDataSource_filter_tags
=== PAUSE TestAccAWSLaunchTemplateDataSource_filter_tags
=== RUN TestAccAWSLaunchTemplateDataSource_metadataOptions
=== PAUSE TestAccAWSLaunchTemplateDataSource_metadataOptions
=== CONT TestAccAWSLaunchTemplateDataSource_basic
=== CONT TestAccAWSLaunchTemplateDataSource_filter_tags
=== CONT TestAccAWSLaunchTemplateDataSource_metadataOptions
=== CONT TestAccAWSLaunchTemplateDataSource_filter_basic
--- PASS: TestAccAWSLaunchTemplateDataSource_filter_tags (29.80s)
--- PASS: TestAccAWSLaunchTemplateDataSource_metadataOptions (29.81s)
--- PASS: TestAccAWSLaunchTemplateDataSource_basic (29.82s)
--- PASS: TestAccAWSLaunchTemplateDataSource_filter_basic (29.85s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 29.898s |
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 great, thanks @stefansundin and @ewbankkit 🚀
Output from acceptance testing:
--- PASS: TestAccAWSInstance_addSecondaryInterface (119.84s)
--- PASS: TestAccAWSInstance_addSecurityGroupNetworkInterface (121.22s)
--- PASS: TestAccAWSInstance_associatePublic_defaultPrivate (195.96s)
--- PASS: TestAccAWSInstance_associatePublic_defaultPublic (116.21s)
--- PASS: TestAccAWSInstance_associatePublic_explicitPrivate (74.96s)
--- PASS: TestAccAWSInstance_associatePublic_explicitPublic (65.15s)
--- PASS: TestAccAWSInstance_associatePublic_overridePrivate (88.82s)
--- PASS: TestAccAWSInstance_associatePublic_overridePublic (74.75s)
--- PASS: TestAccAWSInstance_associatePublicIPAndPrivateIP (74.45s)
--- PASS: TestAccAWSInstance_basic (117.55s)
--- PASS: TestAccAWSInstance_blockDevices (81.13s)
--- PASS: TestAccAWSInstance_changeInstanceType (250.47s)
--- PASS: TestAccAWSInstance_CreditSpecification_Empty_NonBurstable (309.70s)
--- PASS: TestAccAWSInstance_creditSpecification_isNotAppliedToNonBurstable (199.97s)
--- PASS: TestAccAWSInstance_creditSpecification_standardCpuCredits (83.21s)
--- PASS: TestAccAWSInstance_creditSpecification_standardCpuCredits_t2Tot3Taint (371.76s)
--- PASS: TestAccAWSInstance_creditSpecification_unknownCpuCredits_t2 (73.69s)
--- PASS: TestAccAWSInstance_creditSpecification_unknownCpuCredits_t3 (317.06s)
--- PASS: TestAccAWSInstance_creditSpecification_unlimitedCpuCredits (84.87s)
--- PASS: TestAccAWSInstance_creditSpecification_unlimitedCpuCredits_t2Tot3Taint (379.62s)
--- PASS: TestAccAWSInstance_creditSpecification_unspecifiedDefaultsToStandard (286.49s)
--- PASS: TestAccAWSInstance_CreditSpecification_UnspecifiedToEmpty_NonBurstable (80.29s)
--- PASS: TestAccAWSInstance_creditSpecification_updateCpuCredits (290.97s)
--- PASS: TestAccAWSInstance_creditSpecificationT3_standardCpuCredits (78.24s)
--- PASS: TestAccAWSInstance_creditSpecificationT3_unlimitedCpuCredits (88.78s)
--- PASS: TestAccAWSInstance_creditSpecificationT3_unspecifiedDefaultsToUnlimited (302.24s)
--- PASS: TestAccAWSInstance_creditSpecificationT3_updateCpuCredits (102.13s)
--- PASS: TestAccAWSInstance_disableApiTermination (164.50s)
--- PASS: TestAccAWSInstance_disappears (261.26s)
--- PASS: TestAccAWSInstance_EbsBlockDevice_KmsKeyArn (97.16s)
--- PASS: TestAccAWSInstance_forceNewAndTagsDrift (232.47s)
--- PASS: TestAccAWSInstance_getPasswordData_falseToTrue (144.52s)
--- PASS: TestAccAWSInstance_getPasswordData_trueToFalse (187.83s)
--- PASS: TestAccAWSInstance_GP2IopsDevice (180.18s)
--- PASS: TestAccAWSInstance_GP2WithIopsValue (74.36s)
--- PASS: TestAccAWSInstance_hibernation (154.28s)
--- PASS: TestAccAWSInstance_inDefaultVpcBySgId (73.44s)
--- PASS: TestAccAWSInstance_inDefaultVpcBySgName (63.63s)
--- PASS: TestAccAWSInstance_instanceProfileChange (167.75s)
--- PASS: TestAccAWSInstance_ipv6_supportAddressCount (84.39s)
--- PASS: TestAccAWSInstance_ipv6_supportAddressCountWithIpv4 (74.64s)
--- PASS: TestAccAWSInstance_ipv6AddressCountAndSingleAddressCausesError (10.24s)
--- PASS: TestAccAWSInstance_keyPairCheck (64.02s)
--- PASS: TestAccAWSInstance_metadataOptions (109.63s)
--- PASS: TestAccAWSInstance_multipleRegions (288.93s)
--- PASS: TestAccAWSInstance_NetworkInstanceRemovingAllSecurityGroups (80.87s)
--- PASS: TestAccAWSInstance_NetworkInstanceSecurityGroups (75.71s)
--- PASS: TestAccAWSInstance_NetworkInstanceVPCSecurityGroupIDs (77.31s)
--- PASS: TestAccAWSInstance_noAMIEphemeralDevices (53.12s)
--- PASS: TestAccAWSInstance_placementGroup (57.48s)
--- PASS: TestAccAWSInstance_primaryNetworkInterface (75.66s)
--- PASS: TestAccAWSInstance_primaryNetworkInterfaceSourceDestCheck (75.62s)
--- PASS: TestAccAWSInstance_privateIP (225.99s)
--- PASS: TestAccAWSInstance_RootBlockDevice_KmsKeyArn (332.91s)
--- PASS: TestAccAWSInstance_rootBlockDeviceMismatch (184.08s)
--- PASS: TestAccAWSInstance_rootInstanceStore (78.80s)
--- PASS: TestAccAWSInstance_sourceDestCheck (112.21s)
--- PASS: TestAccAWSInstance_tags (122.35s)
--- PASS: TestAccAWSInstance_UserData_EmptyStringToUnspecified (93.28s)
--- PASS: TestAccAWSInstance_UserData_UnspecifiedToEmptyString (94.48s)
--- PASS: TestAccAWSInstance_userDataBase64 (140.77s)
--- PASS: TestAccAWSInstance_volumeTags (110.94s)
--- PASS: TestAccAWSInstance_volumeTagsComputed (113.26s)
--- PASS: TestAccAWSInstance_vpc (195.02s)
--- PASS: TestAccAWSInstance_withIamInstanceProfile (104.20s)
--- PASS: TestAccAWSInstanceDataSource_AzUserData (126.15s)
--- PASS: TestAccAWSInstanceDataSource_basic (243.94s)
--- PASS: TestAccAWSInstanceDataSource_blockDevices (132.16s)
--- PASS: TestAccAWSInstanceDataSource_creditSpecification (82.57s)
--- PASS: TestAccAWSInstanceDataSource_EbsBlockDevice_KmsKeyId (112.70s)
--- PASS: TestAccAWSInstanceDataSource_getPasswordData_falseToTrue (136.36s)
--- PASS: TestAccAWSInstanceDataSource_getPasswordData_trueToFalse (182.19s)
--- PASS: TestAccAWSInstanceDataSource_GetUserData (115.04s)
--- PASS: TestAccAWSInstanceDataSource_GetUserData_NoUserData (126.13s)
--- PASS: TestAccAWSInstanceDataSource_gp2IopsDevice (95.90s)
--- PASS: TestAccAWSInstanceDataSource_keyPair (116.53s)
--- PASS: TestAccAWSInstanceDataSource_metadataOptions (269.78s)
--- PASS: TestAccAWSInstanceDataSource_PlacementGroup (185.42s)
--- PASS: TestAccAWSInstanceDataSource_privateIP (109.88s)
--- PASS: TestAccAWSInstanceDataSource_RootBlockDevice_KmsKeyId (125.17s)
--- PASS: TestAccAWSInstanceDataSource_rootInstanceStore (103.80s)
--- PASS: TestAccAWSInstanceDataSource_SecurityGroups (137.01s)
--- PASS: TestAccAWSInstanceDataSource_tags (170.40s)
--- PASS: TestAccAWSInstanceDataSource_VPC (86.95s)
--- PASS: TestAccAWSInstanceDataSource_VPCSecurityGroups (88.26s)
--- PASS: TestAccAWSInstancesDataSource_basic (203.13s)
--- PASS: TestAccAWSInstancesDataSource_instance_state_names (181.72s)
--- PASS: TestAccAWSInstancesDataSource_tags (191.42s)
--- PASS: TestAccAWSLaunchTemplate_associatePublicIPAddress (24.44s)
--- PASS: TestAccAWSLaunchTemplate_basic (8.09s)
--- PASS: TestAccAWSLaunchTemplate_BlockDeviceMappings_EBS (46.88s)
--- PASS: TestAccAWSLaunchTemplate_BlockDeviceMappings_EBS_DeleteOnTermination (41.88s)
--- PASS: TestAccAWSLaunchTemplate_capacityReservation_preference (8.13s)
--- PASS: TestAccAWSLaunchTemplate_capacityReservation_target (10.02s)
--- PASS: TestAccAWSLaunchTemplate_cpuOptions (7.26s)
--- PASS: TestAccAWSLaunchTemplate_creditSpecification_nonBurstable (8.32s)
--- PASS: TestAccAWSLaunchTemplate_creditSpecification_t2 (8.46s)
--- PASS: TestAccAWSLaunchTemplate_creditSpecification_t3 (8.44s)
--- PASS: TestAccAWSLaunchTemplate_data (8.06s)
--- PASS: TestAccAWSLaunchTemplate_description (13.41s)
--- PASS: TestAccAWSLaunchTemplate_disappears (5.99s)
--- PASS: TestAccAWSLaunchTemplate_EbsOptimized (29.01s)
--- PASS: TestAccAWSLaunchTemplate_ElasticInferenceAccelerator (13.88s)
--- PASS: TestAccAWSLaunchTemplate_IamInstanceProfile_EmptyConfigurationBlock (7.29s)
--- PASS: TestAccAWSLaunchTemplate_instanceMarketOptions (47.99s)
--- PASS: TestAccAWSLaunchTemplate_licenseSpecification (8.17s)
--- PASS: TestAccAWSLaunchTemplate_metadataOptions (7.90s)
--- PASS: TestAccAWSLaunchTemplate_networkInterface (12.15s)
--- PASS: TestAccAWSLaunchTemplate_networkInterface_ipv6AddressCount (8.47s)
--- PASS: TestAccAWSLaunchTemplate_networkInterface_ipv6Addresses (8.67s)
--- PASS: TestAccAWSLaunchTemplate_networkInterfaceAddresses (12.01s)
--- PASS: TestAccAWSLaunchTemplate_tags (14.18s)
--- PASS: TestAccAWSLaunchTemplate_update (47.80s)
--- PASS: TestAccAWSLaunchTemplateDataSource_basic (8.69s)
--- PASS: TestAccAWSLaunchTemplateDataSource_filter_basic (8.92s)
--- PASS: TestAccAWSLaunchTemplateDataSource_filter_tags (9.22s)
--- PASS: TestAccAWSLaunchTemplateDataSource_metadataOptions (9.91s)
} | ||
|
||
// testAccPreCheckOffersEc2InstanceType checks that the test region offers the specified EC2 instance type. | ||
func testAccPreCheckOffersEc2InstanceType(t *testing.T, instanceType string) { |
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.
Now that there is the aws_ec2_isntance_type_offering
data source, we can use that to selectively pick out of a list of preferred instance types. 👍
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.
Yes, that's probably a simpler way.
This has been released in version 2.55.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
Closes #10949.
Closes #11794.
Continuation of #11076.
Release note for CHANGELOG:
Output from acceptance testing: