Skip to content
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_launch_template: Tag on create #10759

Merged
merged 4 commits into from
Nov 6, 2019
Merged

Conversation

ewbankkit
Copy link
Contributor

@ewbankkit ewbankkit commented Nov 5, 2019

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" comments, they generate extra noise for pull request followers and do not help prioritize the request

Closes #9501.

Did the keyvaluetags refactoring for #10688 for both resource and corresponding data source.

Added a section to the Contributing Guide on dealing with EC2 resources that have a TagSpecifications field on resource creation.

Release note for CHANGELOG:

resource/aws_launch_template: Tag on create

Output from acceptance testing:

$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSLaunchTemplate_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSLaunchTemplate_ -timeout 120m
=== RUN   TestAccAWSLaunchTemplate_basic
=== PAUSE TestAccAWSLaunchTemplate_basic
=== RUN   TestAccAWSLaunchTemplate_disappears
=== PAUSE TestAccAWSLaunchTemplate_disappears
=== RUN   TestAccAWSLaunchTemplate_BlockDeviceMappings_EBS
=== PAUSE TestAccAWSLaunchTemplate_BlockDeviceMappings_EBS
=== RUN   TestAccAWSLaunchTemplate_BlockDeviceMappings_EBS_DeleteOnTermination
=== PAUSE TestAccAWSLaunchTemplate_BlockDeviceMappings_EBS_DeleteOnTermination
=== RUN   TestAccAWSLaunchTemplate_EbsOptimized
=== PAUSE TestAccAWSLaunchTemplate_EbsOptimized
=== RUN   TestAccAWSLaunchTemplate_ElasticInferenceAccelerator
=== PAUSE TestAccAWSLaunchTemplate_ElasticInferenceAccelerator
=== RUN   TestAccAWSLaunchTemplate_data
=== PAUSE TestAccAWSLaunchTemplate_data
=== RUN   TestAccAWSLaunchTemplate_description
=== PAUSE TestAccAWSLaunchTemplate_description
=== RUN   TestAccAWSLaunchTemplate_update
=== PAUSE TestAccAWSLaunchTemplate_update
=== RUN   TestAccAWSLaunchTemplate_tags
=== PAUSE TestAccAWSLaunchTemplate_tags
=== RUN   TestAccAWSLaunchTemplate_capacityReservation_preference
=== PAUSE TestAccAWSLaunchTemplate_capacityReservation_preference
=== RUN   TestAccAWSLaunchTemplate_capacityReservation_target
=== PAUSE TestAccAWSLaunchTemplate_capacityReservation_target
=== RUN   TestAccAWSLaunchTemplate_creditSpecification_nonBurstable
=== PAUSE TestAccAWSLaunchTemplate_creditSpecification_nonBurstable
=== RUN   TestAccAWSLaunchTemplate_creditSpecification_t2
=== PAUSE TestAccAWSLaunchTemplate_creditSpecification_t2
=== RUN   TestAccAWSLaunchTemplate_creditSpecification_t3
=== PAUSE TestAccAWSLaunchTemplate_creditSpecification_t3
=== RUN   TestAccAWSLaunchTemplate_IamInstanceProfile_EmptyConfigurationBlock
=== PAUSE TestAccAWSLaunchTemplate_IamInstanceProfile_EmptyConfigurationBlock
=== RUN   TestAccAWSLaunchTemplate_networkInterface
=== PAUSE TestAccAWSLaunchTemplate_networkInterface
=== RUN   TestAccAWSLaunchTemplate_networkInterface_ipv6Addresses
=== PAUSE TestAccAWSLaunchTemplate_networkInterface_ipv6Addresses
=== RUN   TestAccAWSLaunchTemplate_networkInterface_ipv6AddressCount
=== PAUSE TestAccAWSLaunchTemplate_networkInterface_ipv6AddressCount
=== RUN   TestAccAWSLaunchTemplate_instanceMarketOptions
=== PAUSE TestAccAWSLaunchTemplate_instanceMarketOptions
=== RUN   TestAccAWSLaunchTemplate_licenseSpecification
=== PAUSE TestAccAWSLaunchTemplate_licenseSpecification
=== CONT  TestAccAWSLaunchTemplate_basic
=== CONT  TestAccAWSLaunchTemplate_capacityReservation_target
=== CONT  TestAccAWSLaunchTemplate_capacityReservation_preference
=== CONT  TestAccAWSLaunchTemplate_tags
=== CONT  TestAccAWSLaunchTemplate_update
=== CONT  TestAccAWSLaunchTemplate_description
=== CONT  TestAccAWSLaunchTemplate_data
=== CONT  TestAccAWSLaunchTemplate_ElasticInferenceAccelerator
=== CONT  TestAccAWSLaunchTemplate_EbsOptimized
=== CONT  TestAccAWSLaunchTemplate_BlockDeviceMappings_EBS_DeleteOnTermination
=== CONT  TestAccAWSLaunchTemplate_BlockDeviceMappings_EBS
=== CONT  TestAccAWSLaunchTemplate_disappears
=== CONT  TestAccAWSLaunchTemplate_licenseSpecification
=== CONT  TestAccAWSLaunchTemplate_instanceMarketOptions
=== CONT  TestAccAWSLaunchTemplate_creditSpecification_t2
=== CONT  TestAccAWSLaunchTemplate_networkInterface_ipv6AddressCount
=== CONT  TestAccAWSLaunchTemplate_creditSpecification_nonBurstable
=== CONT  TestAccAWSLaunchTemplate_networkInterface_ipv6Addresses
=== CONT  TestAccAWSLaunchTemplate_networkInterface
=== CONT  TestAccAWSLaunchTemplate_IamInstanceProfile_EmptyConfigurationBlock
--- PASS: TestAccAWSLaunchTemplate_disappears (17.02s)
=== CONT  TestAccAWSLaunchTemplate_creditSpecification_t3
--- PASS: TestAccAWSLaunchTemplate_IamInstanceProfile_EmptyConfigurationBlock (20.31s)
--- PASS: TestAccAWSLaunchTemplate_creditSpecification_nonBurstable (22.34s)
--- PASS: TestAccAWSLaunchTemplate_capacityReservation_preference (22.43s)
--- PASS: TestAccAWSLaunchTemplate_networkInterface_ipv6Addresses (22.48s)
--- PASS: TestAccAWSLaunchTemplate_networkInterface_ipv6AddressCount (22.52s)
--- PASS: TestAccAWSLaunchTemplate_basic (22.82s)
--- PASS: TestAccAWSLaunchTemplate_creditSpecification_t2 (23.04s)
--- PASS: TestAccAWSLaunchTemplate_data (23.05s)
--- PASS: TestAccAWSLaunchTemplate_licenseSpecification (24.87s)
--- PASS: TestAccAWSLaunchTemplate_capacityReservation_target (27.12s)
--- PASS: TestAccAWSLaunchTemplate_description (34.06s)
--- PASS: TestAccAWSLaunchTemplate_ElasticInferenceAccelerator (34.79s)
--- PASS: TestAccAWSLaunchTemplate_tags (35.18s)
--- PASS: TestAccAWSLaunchTemplate_creditSpecification_t3 (19.12s)
--- PASS: TestAccAWSLaunchTemplate_networkInterface (40.40s)
--- PASS: TestAccAWSLaunchTemplate_BlockDeviceMappings_EBS_DeleteOnTermination (48.06s)
--- PASS: TestAccAWSLaunchTemplate_BlockDeviceMappings_EBS (48.12s)
--- PASS: TestAccAWSLaunchTemplate_EbsOptimized (69.90s)
--- PASS: TestAccAWSLaunchTemplate_update (79.66s)
--- PASS: TestAccAWSLaunchTemplate_instanceMarketOptions (90.41s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	90.463s
$ 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
=== CONT  TestAccAWSLaunchTemplateDataSource_basic
--- PASS: TestAccAWSLaunchTemplateDataSource_basic (20.25s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	20.279s

@ewbankkit ewbankkit requested a review from a team November 5, 2019 22:05
@ghost ghost added size/M Managed by automation to categorize the size of a PR. service/ec2 Issues and PRs that pertain to the ec2 service. labels Nov 5, 2019
@bflad bflad added the enhancement Requests to existing resources that expand the functionality or scope. label Nov 6, 2019
@bflad bflad added this to the v2.35.0 milestone Nov 6, 2019
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks @ewbankkit 🚀

Output from acceptance testing in AWS Commercial:

--- PASS: TestAccAWSLaunchTemplate_disappears (17.96s)
--- PASS: TestAccAWSLaunchTemplate_capacityReservation_preference (19.77s)
--- PASS: TestAccAWSLaunchTemplate_creditSpecification_t2 (21.16s)
--- PASS: TestAccAWSLaunchTemplate_IamInstanceProfile_EmptyConfigurationBlock (21.61s)
--- PASS: TestAccAWSLaunchTemplate_creditSpecification_nonBurstable (21.81s)
--- PASS: TestAccAWSLaunchTemplate_networkInterface_ipv6AddressCount (21.67s)
--- PASS: TestAccAWSLaunchTemplate_creditSpecification_t3 (21.75s)
--- PASS: TestAccAWSLaunchTemplate_basic (22.30s)
--- PASS: TestAccAWSLaunchTemplate_networkInterface_ipv6Addresses (22.51s)
--- PASS: TestAccAWSLaunchTemplateDataSource_basic (22.95s)
--- PASS: TestAccAWSLaunchTemplate_capacityReservation_target (23.06s)
--- PASS: TestAccAWSLaunchTemplate_networkInterface (24.32s)
--- PASS: TestAccAWSLaunchTemplate_data (24.93s)
--- PASS: TestAccAWSLaunchTemplate_tags (27.79s)
--- PASS: TestAccAWSLaunchTemplate_ElasticInferenceAccelerator (28.09s)
--- PASS: TestAccAWSLaunchTemplate_description (28.46s)
--- PASS: TestAccAWSLaunchTemplate_licenseSpecification (12.17s)
--- PASS: TestAccAWSLaunchTemplate_EbsOptimized (47.92s)
--- PASS: TestAccAWSLaunchTemplate_BlockDeviceMappings_EBS_DeleteOnTermination (48.78s)
--- PASS: TestAccAWSLaunchTemplate_BlockDeviceMappings_EBS (49.19s)
--- PASS: TestAccAWSLaunchTemplate_update (53.83s)
--- PASS: TestAccAWSLaunchTemplate_instanceMarketOptions (53.31s)

Output from acceptance testing in AWS GovCloud (US) (test failures unrelated):

--- FAIL: TestAccAWSLaunchTemplate_BlockDeviceMappings_EBS_DeleteOnTermination (3.90s)
--- FAIL: TestAccAWSLaunchTemplate_BlockDeviceMappings_EBS (4.21s)
--- PASS: TestAccAWSLaunchTemplate_disappears (12.78s)
--- PASS: TestAccAWSLaunchTemplate_basic (15.65s)
--- PASS: TestAccAWSLaunchTemplate_creditSpecification_nonBurstable (16.11s)
--- PASS: TestAccAWSLaunchTemplate_creditSpecification_t2 (16.77s)
--- PASS: TestAccAWSLaunchTemplate_capacityReservation_preference (17.41s)
--- PASS: TestAccAWSLaunchTemplateDataSource_basic (17.85s)
--- PASS: TestAccAWSLaunchTemplate_data (18.56s)
--- PASS: TestAccAWSLaunchTemplate_capacityReservation_target (18.93s)
--- PASS: TestAccAWSLaunchTemplate_IamInstanceProfile_EmptyConfigurationBlock (14.73s)
--- PASS: TestAccAWSLaunchTemplate_creditSpecification_t3 (16.38s)
--- FAIL: TestAccAWSLaunchTemplate_licenseSpecification (4.26s)
--- PASS: TestAccAWSLaunchTemplate_description (23.16s)
--- PASS: TestAccAWSLaunchTemplate_ElasticInferenceAccelerator (23.50s)
--- PASS: TestAccAWSLaunchTemplate_tags (24.07s)
--- PASS: TestAccAWSLaunchTemplate_networkInterface_ipv6Addresses (9.66s)
--- PASS: TestAccAWSLaunchTemplate_networkInterface_ipv6AddressCount (9.19s)
--- PASS: TestAccAWSLaunchTemplate_networkInterface (13.45s)
--- PASS: TestAccAWSLaunchTemplate_EbsOptimized (29.30s)
--- PASS: TestAccAWSLaunchTemplate_update (53.57s)
--- PASS: TestAccAWSLaunchTemplate_instanceMarketOptions (41.36s)

@bflad bflad merged commit ed0e8be into hashicorp:master Nov 6, 2019
bflad added a commit that referenced this pull request Nov 6, 2019
@ewbankkit ewbankkit deleted the issue-9501 branch November 6, 2019 21:13
@ghost
Copy link

ghost commented Nov 7, 2019

This has been released in version 2.35.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!

@ghost
Copy link

ghost commented Mar 29, 2020

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!

@ghost ghost locked and limited conversation to collaborators Mar 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/ec2 Issues and PRs that pertain to the ec2 service. size/M Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

r/aws_launch_template: Tag on create
2 participants