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

Support empty associate_public_ip_address in launch_template data sources #12936

Merged
merged 1 commit into from
Apr 23, 2020

Conversation

jalaziz
Copy link
Contributor

@jalaziz jalaziz commented Apr 22, 2020

This ports the changes from #10157 to the launch_template data source.

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

Closes #12067

Release note for CHANGELOG:

BUG FIXES:
* data-source/aws_launch_template: Fix error when associate_public_ip_address 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
=== CONT  TestAccAWSLaunchTemplateDataSource_basic
=== CONT  TestAccAWSLaunchTemplateDataSource_metadataOptions
=== CONT  TestAccAWSLaunchTemplateDataSource_filter_basic
=== CONT  TestAccAWSLaunchTemplateDataSource_filter_tags
=== CONT  TestAccAWSLaunchTemplateDataSource_associatePublicIPAddress
--- PASS: TestAccAWSLaunchTemplateDataSource_filter_basic (28.96s)
--- PASS: TestAccAWSLaunchTemplateDataSource_metadataOptions (29.06s)
--- PASS: TestAccAWSLaunchTemplateDataSource_basic (29.14s)
--- PASS: TestAccAWSLaunchTemplateDataSource_filter_tags (29.30s)
--- PASS: TestAccAWSLaunchTemplateDataSource_associatePublicIPAddress (63.73s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	65.092s

…rces

This ports the changes from hashicorp#10157 to the launch_template data source.
@jalaziz jalaziz requested a review from a team April 22, 2020 07:19
@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 Apr 22, 2020
@anGie44 anGie44 added enhancement Requests to existing resources that expand the functionality or scope. needs-triage Waiting for first response or review from a maintainer. and removed needs-triage Waiting for first response or review from a maintainer. enhancement Requests to existing resources that expand the functionality or scope. labels Apr 22, 2020
@bflad bflad added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Apr 23, 2020
@bflad bflad self-assigned this Apr 23, 2020
@bflad bflad added this to the v2.59.0 milestone Apr 23, 2020
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.

Thanks so much for this bug fix and the well implemented covering acceptance testing, @jalaziz 🚀

Output from acceptance testing:

--- PASS: TestAccAWSLaunchTemplateDataSource_basic (9.56s)
--- PASS: TestAccAWSLaunchTemplateDataSource_filter_tags (10.47s)
--- PASS: TestAccAWSLaunchTemplateDataSource_metadataOptions (10.52s)
--- PASS: TestAccAWSLaunchTemplateDataSource_filter_basic (10.51s)
--- PASS: TestAccAWSLaunchTemplateDataSource_associatePublicIPAddress (21.20s)

@bflad
Copy link
Contributor

bflad commented Apr 23, 2020

(For curious onlookers, type changes like this are typically breaking changes. The original issue of this argument having 3 possible values has more information about the original resource schema update along with how the implementation was okay to update in that manner. The data source was not updated at the same time and was currently broken without this update as well, hence the merging of this as a bug fix.)

@bflad bflad merged commit 06ace78 into hashicorp:master Apr 23, 2020
bflad added a commit that referenced this pull request Apr 23, 2020
@jalaziz
Copy link
Contributor Author

jalaziz commented Apr 23, 2020

Awesome! Thanks for the quick turnaround 🎉

@ghost
Copy link

ghost commented Apr 24, 2020

This has been released in version 2.59.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 May 23, 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 May 23, 2020
@jalaziz jalaziz deleted the lt-data-source-associate-public-ip branch August 7, 2020 06:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. 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.

aws_launch_template data source error setting network_interfaces
3 participants