-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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 Resource: d/aws_route #4529
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.
Hi @VeganBroccoli! Thanks for the pull request. This looks mostly correct to me, with one minor nit. If you get a chance to review it and see if you agree that would be great, and we can get this merged!
aws/data_source_aws_route.go
Outdated
func dataSourceAwsRouteRead(d *schema.ResourceData, meta interface{}) error { | ||
conn := meta.(*AWSClient).ec2conn | ||
req := &ec2.DescribeRouteTablesInput{} | ||
rtbId, rtbOk := d.GetOk("route_table_id") |
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.
I'm not sure we need a check here, since the schema marks route_table_id
as required.
aws/data_source_aws_route.go
Outdated
cidr := d.Get("destination_cidr_block") | ||
ipv6Cidr := d.Get("destination_ipv6_cidr_block") | ||
|
||
if !rtbOk { |
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.
Similarly, I'm not sure this guard clause is required.
Hey @jen20! Cheers for the review! You're quite right, I've switched to |
Thanks @VeganBroccoli! |
This has been released in version 1.21.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
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! |
make testacc TEST=./aws/ TESTARGS='-run=TestAccDataSourceAwsRoute_basic'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -run=TestAccDataSourceAwsRoute_basic -timeout 120m
=== RUN TestAccDataSourceAwsRoute_basic
--- PASS: TestAccDataSourceAwsRoute_basic (133.40s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 133.455s