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 Resource: d/aws_route #4529

Merged
merged 2 commits into from
May 26, 2018
Merged

Conversation

VeganBroccoli
Copy link
Contributor

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

@ghost ghost added the size/L Managed by automation to categorize the size of a PR. label May 14, 2018
@bflad bflad added new-data-source Introduces a new data source. service/ec2 Issues and PRs that pertain to the ec2 service. labels May 14, 2018
Copy link
Contributor

@jen20 jen20 left a 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!

func dataSourceAwsRouteRead(d *schema.ResourceData, meta interface{}) error {
conn := meta.(*AWSClient).ec2conn
req := &ec2.DescribeRouteTablesInput{}
rtbId, rtbOk := d.GetOk("route_table_id")
Copy link
Contributor

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.

cidr := d.Get("destination_cidr_block")
ipv6Cidr := d.Get("destination_ipv6_cidr_block")

if !rtbOk {
Copy link
Contributor

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.

@ghost ghost added the size/L Managed by automation to categorize the size of a PR. label May 26, 2018
@VeganBroccoli
Copy link
Contributor Author

Hey @jen20! Cheers for the review! You're quite right, I've switched to d.Get and removed the guard.

@jen20 jen20 merged commit 255f252 into hashicorp:master May 26, 2018
@jen20
Copy link
Contributor

jen20 commented May 26, 2018

Thanks @VeganBroccoli!

@bflad bflad added this to the v1.21.0 milestone May 31, 2018
@bflad
Copy link
Contributor

bflad commented May 31, 2018

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.

@ghost
Copy link

ghost commented Apr 5, 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 Apr 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
new-data-source Introduces a new data source. service/ec2 Issues and PRs that pertain to the ec2 service. size/L Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants