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

New data source aws_ec2_transit_gateway_route_tables #17589

Merged
merged 7 commits into from
Mar 18, 2021
Merged

New data source aws_ec2_transit_gateway_route_tables #17589

merged 7 commits into from
Mar 18, 2021

Conversation

mattrobinsonsre
Copy link
Contributor

@mattrobinsonsre mattrobinsonsre commented Feb 12, 2021

Greetings. This is my first attempt to contribute to any public terraform provider and go is not even slightly my first language.

This is to resolve issue #12373 which I would like to resolve for selfish reasons as it affects me. It seemed like a good place to start contributing as I'm a heavy user of the really rather excellent provider.

The new data source "aws_ec2_transit_gateway_route_tables" is modelled after "aws_route_tables". The code is shamelessly plagiarised from the aws_route_tables and the aws_transit_gateway_route_table data sources.

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 OR Closes #12373

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAWSEc2TransitGatewayRouteTablesDataSource_TransitGatewayFilter'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSEc2TransitGatewayRouteTablesDataSource_TransitGatewayFilter -timeout 120m
=== RUN   TestAccAWSEc2TransitGatewayRouteTablesDataSource_TransitGatewayFilter
=== PAUSE TestAccAWSEc2TransitGatewayRouteTablesDataSource_TransitGatewayFilter
=== CONT  TestAccAWSEc2TransitGatewayRouteTablesDataSource_TransitGatewayFilter
--- PASS: TestAccAWSEc2TransitGatewayRouteTablesDataSource_TransitGatewayFilter (347.78s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	349.965s

… is not even slightly my first language.

This is to resolve 12373 which I would like to resolve for selfish reasons as it affects me.  It seemed like a good place to start.

The new data source "aws_ec2_transit_gateway_route_tables" is modelled after "aws_route_tables".  The code is shamelessly plagiarized from the aws_route_tables and the aws_transit_gateway_route_table resources.

I've included tests which I think are right, but I'm not sure on protocol for running them.

The code compiles.  Which is a good start.
@mattrobinsonsre mattrobinsonsre requested a review from a team as a code owner February 12, 2021 12:21
@ghost ghost added size/L Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. provider Pertains to the provider itself, rather than any interaction with AWS. service/ec2 Issues and PRs that pertain to the ec2 service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Feb 12, 2021
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Feb 12, 2021
@anGie44 anGie44 added new-data-source Introduces a new data source. and removed needs-triage Waiting for first response or review from a maintainer. labels Mar 12, 2021
@anGie44 anGie44 self-assigned this Mar 15, 2021
Copy link
Contributor

@anGie44 anGie44 left a comment

Choose a reason for hiding this comment

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

Hi @mrobinson-anaplan, thank you for this PR! overall looked in great condition 👍 To get this into an upcoming release, I've gone ahead and made some changes related to the Route Table filtering. In short, since we can use the filter block to filter by transit gateway, i've removed that field from the schema to make the filtering uniform for users. With that said, additional changes in the test and documentation reflect the changes made in the data source filtering.

Copy link
Contributor

@anGie44 anGie44 left a comment

Choose a reason for hiding this comment

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

Thanks again @mrobinson-anaplan 🚀 !

Output of acceptance tests (commercial):

--- PASS: TestAccDataSourceAwsEc2TransitGatewayRouteTables_Filter (358.86s)
--- PASS: TestAccDataSourceAwsEc2TransitGatewayRouteTables_basic (368.72s)

@anGie44 anGie44 added this to the v3.33.0 milestone Mar 18, 2021
@anGie44 anGie44 merged commit 6d59a79 into hashicorp:main Mar 18, 2021
@mattrobinsonsre
Copy link
Contributor Author

Thanks @anGie44

@ghost
Copy link

ghost commented Mar 18, 2021

This has been released in version 3.33.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 Apr 18, 2021

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 as resolved and limited conversation to collaborators Apr 18, 2021
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. new-data-source Introduces a new data source. provider Pertains to the provider itself, rather than any interaction with AWS. service/ec2 Issues and PRs that pertain to the ec2 service. size/L 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.

data_source_aws_ec2_transit_gateway_route_table list output ids
2 participants