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/launch_template: default network_interfaces.delete_on_termination to true #6450

Closed

Conversation

kl4w
Copy link
Contributor

@kl4w kl4w commented Nov 13, 2018

Fixes #6080

Changes proposed in this pull request:

  • defaults network_interfaces.delete_on_termination to true

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 -parallel 20 -run=TestAccAWSLaunchTemplate_ -timeout 120m
=== RUN   TestAccAWSLaunchTemplate_importBasic
=== PAUSE TestAccAWSLaunchTemplate_importBasic
=== RUN   TestAccAWSLaunchTemplate_importData
=== PAUSE TestAccAWSLaunchTemplate_importData
=== 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_data
=== PAUSE TestAccAWSLaunchTemplate_data
=== 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_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
=== CONT  TestAccAWSLaunchTemplate_importBasic
=== CONT  TestAccAWSLaunchTemplate_capacityReservation_preference
=== CONT  TestAccAWSLaunchTemplate_BlockDeviceMappings_EBS_DeleteOnTermination
=== CONT  TestAccAWSLaunchTemplate_networkInterface
=== CONT  TestAccAWSLaunchTemplate_networkInterface_ipv6Addresses
=== CONT  TestAccAWSLaunchTemplate_creditSpecification_t2
=== CONT  TestAccAWSLaunchTemplate_creditSpecification_t3
=== CONT  TestAccAWSLaunchTemplate_update
=== CONT  TestAccAWSLaunchTemplate_tags
=== CONT  TestAccAWSLaunchTemplate_disappears
=== CONT  TestAccAWSLaunchTemplate_networkInterface_ipv6AddressCount
=== CONT  TestAccAWSLaunchTemplate_BlockDeviceMappings_EBS
=== CONT  TestAccAWSLaunchTemplate_instanceMarketOptions
=== CONT  TestAccAWSLaunchTemplate_basic
=== CONT  TestAccAWSLaunchTemplate_data
=== CONT  TestAccAWSLaunchTemplate_EbsOptimized
=== CONT  TestAccAWSLaunchTemplate_creditSpecification_nonBurstable
=== CONT  TestAccAWSLaunchTemplate_importData
=== CONT  TestAccAWSLaunchTemplate_capacityReservation_target
--- PASS: TestAccAWSLaunchTemplate_disappears (9.22s)
--- PASS: TestAccAWSLaunchTemplate_networkInterface_ipv6AddressCount (11.63s)
--- PASS: TestAccAWSLaunchTemplate_creditSpecification_t3 (11.66s)
--- PASS: TestAccAWSLaunchTemplate_capacityReservation_preference (11.69s)
--- PASS: TestAccAWSLaunchTemplate_creditSpecification_t2 (11.72s)
--- PASS: TestAccAWSLaunchTemplate_data (11.73s)
--- PASS: TestAccAWSLaunchTemplate_creditSpecification_nonBurstable (11.73s)
--- PASS: TestAccAWSLaunchTemplate_basic (12.19s)
--- PASS: TestAccAWSLaunchTemplate_networkInterface_ipv6Addresses (12.23s)
--- PASS: TestAccAWSLaunchTemplate_importData (12.92s)
--- PASS: TestAccAWSLaunchTemplate_importBasic (13.20s)
--- PASS: TestAccAWSLaunchTemplate_capacityReservation_target (17.23s)
--- PASS: TestAccAWSLaunchTemplate_tags (21.27s)
--- PASS: TestAccAWSLaunchTemplate_networkInterface (30.38s)
--- PASS: TestAccAWSLaunchTemplate_instanceMarketOptions (44.07s)
--- PASS: TestAccAWSLaunchTemplate_EbsOptimized (45.74s)
--- PASS: TestAccAWSLaunchTemplate_update (47.16s)
--- PASS: TestAccAWSLaunchTemplate_BlockDeviceMappings_EBS_DeleteOnTermination (48.07s)
--- PASS: TestAccAWSLaunchTemplate_BlockDeviceMappings_EBS (48.70s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	(cached)

@ghost ghost added size/XS Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. service/ec2 Issues and PRs that pertain to the ec2 service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Nov 13, 2018
@nathanielks
Copy link
Contributor

Thanks for this! I ran into this myself.

@savar
Copy link
Contributor

savar commented May 13, 2019

This is not the right approach as the default should not be set if you don't specify one.

@aeschright aeschright self-assigned this Jun 21, 2019
@aeschright aeschright requested a review from a team June 25, 2019 19:12
@aeschright aeschright removed their assignment Jul 12, 2019
@tmccombs
Copy link
Contributor

tmccombs commented Sep 3, 2019

@savar what is the correct approach then?

@savar
Copy link
Contributor

savar commented Sep 4, 2019

checkout #8612

Terraform should mimic a way to configure it as if you configure it through the API or AWS console. As the API documents it, the setting is "NOT_SET" normally (which turns out to be the same as "true") ..

2019-09-04_04-41

so setting it to "true" is "kind of" doing the right thing but it actually doesn't in terms of reflecting the API. In the other pull request this NOT_SET is the 3rd option which was added and being the default (which also would fix your issue).

@bflad
Copy link
Contributor

bflad commented Jul 2, 2020

Hi folks 👋 Just to followup here, first, thank you @kl4w for submitting this and apologies its been lingering. We are working on improving our processes on tracking breaking changes for major releases and providing more consistent (and constant) communication.

As mentioned above, we anticipate the correct approach here will be something similar to #8612 to support the 3-way boolean argument, so in this case we are going to opt to close this particular pull request in preference of that. We anticipate to merge that in within the next month as part of our version 3.0.0 release.

@bflad bflad closed this Jul 2, 2020
@ghost
Copy link

ghost commented Aug 2, 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 Aug 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. service/ec2 Issues and PRs that pertain to the ec2 service. size/XS 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.

aws_launch_template network interfaces default settings
6 participants