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

d/lb - add private_ipv4_address attribute to subnet mapping #14545

Merged
merged 8 commits into from Aug 13, 2020

Conversation

DrFaust92
Copy link
Collaborator

@DrFaust92 DrFaust92 commented Aug 10, 2020

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

Relates #11404, Closes #14565.

Release note for CHANGELOG:

data_source_aws_lb - add `private_ipv4_address` attribute to subnet mapping

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccDataSourceAWSLB_'
--- PASS: TestAccDataSourceAWSLB_basic (289.27s)
--- PASS: TestAccDataSourceAWSLB_BackwardsCompatibility(301.30s)

@DrFaust92 DrFaust92 requested a review from a team August 10, 2020 18:34
@ghost ghost added size/M Managed by automation to categorize the size of a PR. service/elbv2 Issues and PRs that pertain to the elbv2 service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Aug 10, 2020
@bflad
Copy link
Member

bflad commented Aug 10, 2020

Sigh, #8223 rears its head again. 😖 Thanks for working on this, @DrFaust92, is this still WIP (according to the PR title)?

@bflad bflad added the bug Addresses a defect in current functionality. label Aug 10, 2020
@bflad bflad added this to the v3.2.0 milestone Aug 10, 2020
@bflad bflad added the regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. label Aug 10, 2020
@DrFaust92
Copy link
Collaborator Author

@bflad, yeah debugging an issue where subnet_mapping differs from data source and resource. Looking into it.

@DrFaust92 DrFaust92 changed the title [WIP]d/lb - add private_ipv4_address attribute to subnet mapping d/lb - add private_ipv4_address attribute to subnet mapping Aug 10, 2020
@DrFaust92
Copy link
Collaborator Author

@bflad, there was another issue with the Set func missing hiding there as well.

@ewbankkit
Copy link
Contributor

Closes #14565.

@kartik-moolya
Copy link

Can we expedite this please. I'm having to move all of my code to cloudformation due to this bug :(

@bflad bflad self-assigned this Aug 13, 2020
Copy link
Member

@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.

Thank you for working on this, @DrFaust92 I think we should be able to remove the Set function below. Other than that, we can get this in today. 👍

"fmt"
"log"

"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/elbv2"
"github.com/hashicorp/terraform-plugin-sdk/helper/hashcode"
Copy link
Member

Choose a reason for hiding this comment

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

This import was very recently moved as part of our Terraform Plugin SDK v1 removal: #14593

It now lives at:

"github.com/terraform-providers/terraform-provider-aws/aws/internal/hashcode"

That being said, adding Set functions to data sources should generally not be necessary and especially after this fix in SDK version 2: hashicorp/terraform-plugin-sdk#197

If this is rebased against the current commit on the main branch, which is all up to date with SDK v2, the Set function can hopefully be removed.

aws/data_source_aws_lb.go Outdated Show resolved Hide resolved
@@ -61,14 +63,30 @@ func dataSourceAwsLb() *schema.Resource {
Schema: map[string]*schema.Schema{
"subnet_id": {
Type: schema.TypeString,
Required: true,
Copy link
Member

Choose a reason for hiding this comment

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

Thank you for fixing these. 😄

DrFaust92 and others added 3 commits August 13, 2020 21:20
Co-authored-by: Brian Flad <bflad417@gmail.com>
add validation to arn
@DrFaust92
Copy link
Collaborator Author

Thanks @bflad, fixed and added some more tests to cover all attributes

@DrFaust92 DrFaust92 requested a review from bflad August 13, 2020 18:41
Copy link
Member

@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 great, thanks @DrFaust92 🚀

Output from acceptance testing:

--- PASS: TestAccDataSourceAWSLB_basic (219.10s)
--- PASS: TestAccDataSourceAWSLB_BackwardsCompatibility (219.37s)

@bflad bflad merged commit 1b15b2a into hashicorp:master Aug 13, 2020
bflad added a commit that referenced this pull request Aug 13, 2020
@ghost
Copy link

ghost commented Aug 14, 2020

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

@DrFaust92 DrFaust92 deleted the d/lb_subnet_mapping_fix branch August 27, 2020 17:59
@ghost
Copy link

ghost commented Sep 13, 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 Sep 13, 2020
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. regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. service/elbv2 Issues and PRs that pertain to the elbv2 service. size/M 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
4 participants