-
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
Enable all metadata-options to be enabled regardless of http_endpoint setting for EC2 Launch Template #30107
Conversation
Community NoteVoting for Prioritization
For Submitters
|
Updating formatting
Updated function naming to replace Http with HTTP
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.
LGTM 🚀
$ make testacc PKG=ec2 TESTS="TestAccEC2LaunchTemplate_"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccEC2LaunchTemplate_' -timeout 180m
--- PASS: TestAccEC2LaunchTemplate_basic (34.68s)
--- PASS: TestAccEC2LaunchTemplate_instanceRequirements_spotMaxPricePercentageOverLowestPrice (39.07s)
--- PASS: TestAccEC2LaunchTemplate_licenseSpecification (40.40s)
--- PASS: TestAccEC2LaunchTemplate_Placement_partitionNum (55.70s)
--- PASS: TestAccEC2LaunchTemplate_instanceRequirements_cpuManufacturers (67.21s)
--- PASS: TestAccEC2LaunchTemplate_instanceRequirements_acceleratorNames (67.79s)
--- PASS: TestAccEC2LaunchTemplate_instanceRequirements_excludedInstanceTypes (67.80s)
--- PASS: TestAccEC2LaunchTemplate_instanceRequirements_instanceGenerations (68.03s)
--- PASS: TestAccEC2LaunchTemplate_instanceRequirements_memoryMiBAndVCPUCount (68.67s)
--- PASS: TestAccEC2LaunchTemplate_instanceRequirements_acceleratorManufacturers (68.80s)
--- PASS: TestAccEC2LaunchTemplate_instanceRequirements_onDemandMaxPricePercentageOverLowestPrice (33.21s)
--- PASS: TestAccEC2LaunchTemplate_hibernation (73.70s)
--- PASS: TestAccEC2LaunchTemplate_defaultVersion (73.89s)
--- PASS: TestAccEC2LaunchTemplate_enclaveOptions (74.36s)
--- PASS: TestAccEC2LaunchTemplate_NetworkInterface_ipv6AddressCount (32.19s)
--- PASS: TestAccEC2LaunchTemplate_instanceRequirements_acceleratorCount (96.59s)
--- PASS: TestAccEC2LaunchTemplate_instanceRequirements_totalLocalStorageGB (97.95s)
--- PASS: TestAccEC2LaunchTemplate_instanceRequirements_baselineEBSBandwidthMbps (98.62s)
--- PASS: TestAccEC2LaunchTemplate_instanceRequirements_networkBandwidthGbps (99.54s)
--- PASS: TestAccEC2LaunchTemplate_updateDefaultVersion (99.58s)
--- PASS: TestAccEC2LaunchTemplate_NetworkInterface_ipv6Addresses (31.87s)
--- PASS: TestAccEC2LaunchTemplate_instanceRequirements_acceleratorTotalMemoryMiB (99.79s)
--- PASS: TestAccEC2LaunchTemplate_instanceRequirements_requireHibernateSupport (65.17s)
--- PASS: TestAccEC2LaunchTemplate_privateDNSNameOptions (31.16s)
--- PASS: TestAccEC2LaunchTemplate_metadataOptions (108.91s)
--- PASS: TestAccEC2LaunchTemplate_CreditSpecification_nonBurstable (32.68s)
--- PASS: TestAccEC2LaunchTemplate_Placement_hostResourceGroupARN (34.76s)
--- PASS: TestAccEC2LaunchTemplate_instanceRequirements_localStorageTypes (63.57s)
--- PASS: TestAccEC2LaunchTemplate_networkInterfaceIPv6PrefixCount (32.08s)
--- PASS: TestAccEC2LaunchTemplate_networkInterfaceCardIndex (31.96s)
--- PASS: TestAccEC2LaunchTemplate_networkInterfaceIPv4PrefixCount (32.30s)
--- PASS: TestAccEC2LaunchTemplate_networkInterfaceIPv4Prefixes (32.63s)
--- PASS: TestAccEC2LaunchTemplate_networkInterfaceIPv6Prefixes (33.47s)
--- PASS: TestAccEC2LaunchTemplate_networkInterfaceType (31.87s)
--- PASS: TestAccEC2LaunchTemplate_instanceRequirements_acceleratorTypes (63.28s)
--- PASS: TestAccEC2LaunchTemplate_instanceRequirements_allowedInstanceTypes (64.74s)
--- PASS: TestAccEC2LaunchTemplate_networkInterfaceAddresses (37.91s)
--- PASS: TestAccEC2LaunchTemplate_instanceMarketOptions (83.89s)
--- PASS: TestAccEC2LaunchTemplate_cpuOptions (25.47s)
--- PASS: TestAccEC2LaunchTemplate_IAMInstanceProfile_emptyBlock (35.16s)
--- PASS: TestAccEC2LaunchTemplate_networkInterface (50.38s)
--- PASS: TestAccEC2LaunchTemplate_CapacityReservation_preference (37.53s)
--- PASS: TestAccEC2LaunchTemplate_instanceRequirements_burstablePerformance (105.88s)
--- PASS: TestAccEC2LaunchTemplate_instanceRequirements_localStorage (105.14s)
--- PASS: TestAccEC2LaunchTemplate_instanceRequirements_memoryGiBPerVCPU (105.28s)
--- PASS: TestAccEC2LaunchTemplate_instanceRequirements_networkInterfaceCount (133.58s)
--- PASS: TestAccEC2LaunchTemplate_CreditSpecification_t4g (42.58s)
--- PASS: TestAccEC2LaunchTemplate_CreditSpecification_t3 (42.65s)
--- PASS: TestAccEC2LaunchTemplate_CreditSpecification_t2 (44.33s)
--- PASS: TestAccEC2LaunchTemplate_CapacityReservation_target (43.73s)
--- PASS: TestAccEC2LaunchTemplate_instanceRequirements_bareMetal (103.45s)
--- PASS: TestAccEC2LaunchTemplate_data (38.03s)
--- PASS: TestAccEC2LaunchTemplate_disappears (16.50s)
--- PASS: TestAccEC2LaunchTemplate_associateCarrierIPAddress (94.45s)
--- PASS: TestAccEC2LaunchTemplate_Name_prefix (22.35s)
--- PASS: TestAccEC2LaunchTemplate_Name_generated (22.86s)
--- PASS: TestAccEC2LaunchTemplate_description (51.55s)
--- PASS: TestAccEC2LaunchTemplate_elasticInferenceAccelerator (35.92s)
--- PASS: TestAccEC2LaunchTemplate_tags (65.94s)
--- PASS: TestAccEC2LaunchTemplate_NetworkInterfaces_deleteOnTermination (76.53s)
--- PASS: TestAccEC2LaunchTemplate_update (70.86s)
--- PASS: TestAccEC2LaunchTemplate_BlockDeviceMappingsEBS_deleteOnTermination (58.71s)
--- PASS: TestAccEC2LaunchTemplate_BlockDeviceMappingsEBS_gp3 (44.09s)
--- PASS: TestAccEC2LaunchTemplate_BlockDeviceMappings_ebs (44.89s)
--- PASS: TestAccEC2LaunchTemplate_ebsOptimized (60.52s)
--- PASS: TestAccEC2LaunchTemplate_associatePublicIPAddress (252.18s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/ec2 354.145s
@wzzzrd86 thanks for the contribution! 🎉 |
This functionality has been released in v4.61.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. Thank you! |
ok - this changed the default metadata options from whats set in the documentation. This is a BREAKING CHANGE 4.61.0 release changes the default setting from optional to required. http_tokens - (Optional) Whether or not the metadata service requires session tokens, also referred to as Instance Metadata Service Version 2 (IMDSv2). Can be "optional" or "required". (Default: "optional"). If this is intentional - it is not reflected in the release notes or 4.61.0 documentation. |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Description
This change will allow the options
instance_metadata_tags
,http_tokens
, andhttp_put_request
to be set in theaws_launch_template
resource without the optionhttp_endpoint
being set to enabled.Currently, if you set any of the 3 options above you will without
http_endpoint
you will see the following warning where the values are set to ""After reading the documentation I don't see that any of these values are dependent on
http_endpoint
.Relations
Closes #29209
Closes #23174
Closes #25909
Closes #25836
References
Metadata options documentation from AWS
Output from Acceptance Testing
make testacc TESTS=TestAccEC2LaunchTemplate_metadataOptions