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
New Data Sources: aws_ec2_local_gateway_virtual_interface_group(s) #13767
New Data Sources: aws_ec2_local_gateway_virtual_interface_group(s) #13767
Conversation
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.
A few questions about computed tags and PreCheck function, otherwise LGTM 🚀
--- PASS: TestAccDataSourceAwsEc2LocalGatewayVirtualInterfaceGroups_basic (20.31s)
--- PASS: TestAccDataSourceAwsEc2LocalGatewayVirtualInterfaceGroup_LocalGatewayId (21.16s)
--- PASS: TestAccDataSourceAwsEc2LocalGatewayVirtualInterfaceGroup_Filter (21.36s)
--- PASS: TestAccDataSourceAwsEc2LocalGatewayVirtualInterfaceGroups_Filter (21.63s)
Computed: true, | ||
Elem: &schema.Schema{Type: schema.TypeString}, | ||
}, | ||
"tags": tagsSchema(), |
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.
Should this be tagsSchemaComputed
?
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.
tags
can be provided as an argument for filtering: https://github.com/terraform-providers/terraform-provider-aws/pull/13767/files#diff-e466993d721ef8f751f7e6fd9172444cR54-R56
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.
Ah yeah, you are correct -- I'll try to add covering tests as well using the new aws_ec2_tag
resource (since this resource implicitly exists and cannot be managed). 😄
// Hide Outposts testing behind consistent environment variable | ||
outpostArn := os.Getenv("AWS_OUTPOST_ARN") | ||
if outpostArn == "" { | ||
t.Skip( | ||
"Environment variable AWS_OUTPOST_ARN is not set. " + | ||
"This environment variable must be set to the ARN of " + | ||
"a deployed Outpost to enable this test.") | ||
} |
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.
Should this be a PreCheck function instead of inline for the tests?
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.
The Outposts client support was just merged and the PreCheck
function is pending in this other PR: https://github.com/terraform-providers/terraform-provider-aws/pull/13777/files#diff-19464074d9803005745f6f85ccb8c12fR49
Computed: true, | ||
Elem: &schema.Schema{Type: schema.TypeString}, | ||
}, | ||
"tags": tagsSchema(), |
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.
Should this be tagsSchemaComputed
?
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.
tags
can be provided as an argument for filtering: https://github.com/terraform-providers/terraform-provider-aws/pull/13767/files#diff-ea9ecbab165a8d3632ec5cce0350e3aeR38-R40
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.
Oh duh 🤦 Yes it should be tagsSchemaComputed()
since that's Optional + Computed.
outpostArn := os.Getenv("AWS_OUTPOST_ARN") | ||
if outpostArn == "" { | ||
t.Skip( | ||
"Environment variable AWS_OUTPOST_ARN is not set. " + | ||
"This environment variable must be set to the ARN of " + | ||
"a deployed Outpost to enable this test.") | ||
} |
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.
Should this be a PreCheck?
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.
Same note as above, this part was just delayed since Outposts API functionality was "phase 4" and this can swapped once #13777 is merged.
Reference: #13502 Output from acceptance testing: ``` --- PASS: TestAccDataSourceAwsEc2LocalGatewayVirtualInterfaceGroup_LocalGatewayId (17.89s) --- PASS: TestAccDataSourceAwsEc2LocalGatewayVirtualInterfaceGroup_Filter (18.16s) --- PASS: TestAccDataSourceAwsEc2LocalGatewayVirtualInterfaceGroups_basic (16.94s) --- PASS: TestAccDataSourceAwsEc2LocalGatewayVirtualInterfaceGroups_Filter (21.14s) ```
…data source tags arguments work and are tested Output from acceptance testing: ``` --- PASS: TestAccDataSourceAwsEc2LocalGatewayVirtualInterfaceGroup_Filter (17.76s) --- PASS: TestAccDataSourceAwsEc2LocalGatewayVirtualInterfaceGroup_LocalGatewayId (17.68s) --- PASS: TestAccDataSourceAwsEc2LocalGatewayVirtualInterfaceGroup_Tags (21.87s) --- PASS: TestAccDataSourceAwsEc2LocalGatewayVirtualInterfaceGroups_basic (16.28s) --- PASS: TestAccDataSourceAwsEc2LocalGatewayVirtualInterfaceGroups_Filter (18.11s) --- PASS: TestAccDataSourceAwsEc2LocalGatewayVirtualInterfaceGroups_Tags (22.15s) ```
9174152
to
12244c7
Compare
Rebased to fix merge conflict and ensured the tags arguments were working as expected, will merge once CI is green. 👍 Updated output from acceptance testing:
|
This has been released in version 2.67.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
Closes #13502
Release note for CHANGELOG:
Output from acceptance testing: