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

data-source/aws_launch_template: Fix empty delete_on_termination regression #14498

Closed

Conversation

jalaziz
Copy link
Contributor

@jalaziz jalaziz commented Aug 7, 2020

This fixes a regression introduced with #8612. With that change, the aws_launch_template data source broke when an ENI is set.

This is similar to #12936.

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" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Release note for CHANGELOG:

BUG FIXES:
* data-source/aws_launch_template: Fix error when ENI delete_on_termination is empty

Output from acceptance testing:

$ make testacc 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
=== RUN   TestAccAWSLaunchTemplateDataSource_associatePublicIPAddress
=== PAUSE TestAccAWSLaunchTemplateDataSource_associatePublicIPAddress
=== RUN   TestAccAWSLaunchTemplateDataSource_deleteOnTermination
=== PAUSE TestAccAWSLaunchTemplateDataSource_deleteOnTermination
=== RUN   TestAccAWSLaunchTemplateDataSource_NonExistent
=== PAUSE TestAccAWSLaunchTemplateDataSource_NonExistent
=== CONT  TestAccAWSLaunchTemplateDataSource_basic
=== CONT  TestAccAWSLaunchTemplateDataSource_associatePublicIPAddress
=== CONT  TestAccAWSLaunchTemplateDataSource_NonExistent
=== CONT  TestAccAWSLaunchTemplateDataSource_deleteOnTermination
=== CONT  TestAccAWSLaunchTemplateDataSource_filter_tags
=== CONT  TestAccAWSLaunchTemplateDataSource_metadataOptions
=== CONT  TestAccAWSLaunchTemplateDataSource_filter_basic
--- PASS: TestAccAWSLaunchTemplateDataSource_NonExistent (4.38s)
--- PASS: TestAccAWSLaunchTemplateDataSource_metadataOptions (25.17s)
--- PASS: TestAccAWSLaunchTemplateDataSource_basic (25.86s)
--- PASS: TestAccAWSLaunchTemplateDataSource_filter_tags (26.00s)
--- PASS: TestAccAWSLaunchTemplateDataSource_filter_basic (26.11s)
--- PASS: TestAccAWSLaunchTemplateDataSource_associatePublicIPAddress (58.57s)
--- PASS: TestAccAWSLaunchTemplateDataSource_deleteOnTermination (58.63s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	60.246s

This ports the changes from hashicorp#8612 to the launch_template data source.
@jalaziz jalaziz requested a review from a team August 7, 2020 05:56
@ghost ghost added size/S Managed by automation to categorize the size of a PR. needs-triage Waiting for first response or review from a maintainer. service/ec2 Issues and PRs that pertain to the ec2 service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Aug 7, 2020
@jalaziz jalaziz changed the title Support empty delete_on_termination in launch_template data sources data-source/aws_launch_template: Fix empty delete_on_termination regression Aug 9, 2020
@jalaziz
Copy link
Contributor Author

jalaziz commented Sep 8, 2020

Closing as this landed in a later PR. #14599

@jalaziz jalaziz closed this Sep 8, 2020
@jalaziz jalaziz deleted the lt-data-source-delete-on-termination branch September 8, 2020 07:20
@ghost
Copy link

ghost commented Oct 8, 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 as resolved and limited conversation to collaborators Oct 8, 2020
@breathingdust breathingdust removed the needs-triage Waiting for first response or review from a maintainer. label Sep 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/ec2 Issues and PRs that pertain to the ec2 service. size/S Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants