-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
Conversation
Sigh, #8223 rears its head again. 😖 Thanks for working on this, @DrFaust92, is this still WIP (according to the PR title)? |
@bflad, yeah debugging an issue where subnet_mapping differs from data source and resource. Looking into it. |
private_ipv4_address
attribute to subnet mappingprivate_ipv4_address
attribute to subnet mapping
@bflad, there was another issue with the Set func missing hiding there as well. |
Closes #14565. |
Can we expedite this please. I'm having to move all of my code to cloudformation due to this bug :( |
590a219
to
5c79926
Compare
There was a problem hiding this 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. 👍
aws/data_source_aws_lb.go
Outdated
"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" |
There was a problem hiding this comment.
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.
@@ -61,14 +63,30 @@ func dataSourceAwsLb() *schema.Resource { | |||
Schema: map[string]*schema.Schema{ | |||
"subnet_id": { | |||
Type: schema.TypeString, | |||
Required: true, |
There was a problem hiding this comment.
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. 😄
Co-authored-by: Brian Flad <bflad417@gmail.com>
add validation to arn
Thanks @bflad, fixed and added some more tests to cover all attributes |
There was a problem hiding this 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)
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! |
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! |
Community Note
Relates #11404, Closes #14565.
Release note for CHANGELOG:
Output from acceptance testing: