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

resource/aws_route: Allow adding IPv6 routes to instances and network interfaces #2265

Merged
merged 2 commits into from
Jan 23, 2018
Merged

resource/aws_route: Allow adding IPv6 routes to instances and network interfaces #2265

merged 2 commits into from
Jan 23, 2018

Conversation

stevenewey
Copy link
Contributor

Fix for #2264

My first PR, please be kind 😊

@radeksimko radeksimko added size/S Managed by automation to categorize the size of a PR. bug Addresses a defect in current functionality. labels Nov 15, 2017
@radeksimko radeksimko changed the title aws_route can add IPv6 routes to instances and network interfaces r/aws_route: Allow adding IPv6 routes to instances and network interfaces Nov 16, 2017
@radeksimko
Copy link
Member

Hi @stevenewey
thanks for the PR.

Do you mind adding an acceptance test for this bugfix? Feel free to use the config from #2264 and use "copy-paste-modify" approach. Here's an existing test you can copy:

https://github.com/terraform-providers/terraform-provider-aws/blob/b59fa964c12c294c4f83b39527c715d0c3726ec8/aws/resource_aws_route_test.go#L89-L107

The goal is to have a test which is failing prior to your patch and passing after patch. 😉

Let me know if you need any further help.

@radeksimko radeksimko added the waiting-response Maintainers are waiting on response from community or contributor. label Nov 16, 2017
@stevenewey
Copy link
Contributor Author

Thanks for the pointer @radeksimko!

The tests run on master...

~/go/src/github.com/terraform-providers/terraform-provider-aws(master) $ TF_ACC=1 go test github.com/terraform-providers/terraform-provider-aws/aws -v -run 'TestAccAWSRoute_ipv6ToInstance'
=== RUN   TestAccAWSRoute_ipv6ToInstance
--- FAIL: TestAccAWSRoute_ipv6ToInstance (144.12s)
	testing.go:503: Step 0 error: Error applying: 1 error(s) occurred:

		* aws_route.internal-default-route-ipv6: 1 error(s) occurred:

		* aws_route.internal-default-route-ipv6: Error creating route: MissingParameter: The request must contain the parameter destinationCidrBlock or destinationIpv6CidrBlock
			status code: 400, request id: 973ea2d4-bbbb-472a-9ead-2af0ad769360
FAIL
exit status 1
FAIL	github.com/terraform-providers/terraform-provider-aws/aws	144.153s
~/go/src/github.com/terraform-providers/terraform-provider-aws(master) $ TF_ACC=1 go test github.com/terraform-providers/terraform-provider-aws/aws -v -run 'TestAccAWSRoute_ipv6ToNetworkInterface'
=== RUN   TestAccAWSRoute_ipv6ToNetworkInterface
--- FAIL: TestAccAWSRoute_ipv6ToNetworkInterface (194.86s)
	testing.go:503: Step 0 error: Error applying: 1 error(s) occurred:

		* aws_route.internal-default-route-ipv6: 1 error(s) occurred:

		* aws_route.internal-default-route-ipv6: Error creating route: MissingParameter: The request must contain the parameter destinationCidrBlock or destinationIpv6CidrBlock
			status code: 400, request id: 4f35b513-17f0-414f-9e0d-dd828e5d8634
FAIL
exit status 1
FAIL	github.com/terraform-providers/terraform-provider-aws/aws	194.893s

And on my branch...

~/go/src/github.com/terraform-providers/terraform-provider-aws(route-ipv6) $ TF_ACC=1 go test github.com/terraform-providers/terraform-provider-aws/aws -v -run 'TestAccAWSRoute_ipv6ToInstance'
=== RUN   TestAccAWSRoute_ipv6ToInstance
--- PASS: TestAccAWSRoute_ipv6ToInstance (142.91s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	142.946s
~/go/src/github.com/terraform-providers/terraform-provider-aws(route-ipv6) $ TF_ACC=1 go test github.com/terraform-providers/terraform-provider-aws/aws -v -run 'TestAccAWSRoute_ipv6ToNetworkInterface'
=== RUN   TestAccAWSRoute_ipv6ToNetworkInterface
--- PASS: TestAccAWSRoute_ipv6ToNetworkInterface (210.37s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	210.399s

@stevenewey
Copy link
Contributor Author

Hi @radeksimko
Are my acceptance tests sufficient, or do I need to do more?
Thanks.

@mindw
Copy link

mindw commented Jan 11, 2018

Is there anything missing here?
Thanks!

@radeksimko radeksimko added the service/ec2 Issues and PRs that pertain to the ec2 service. label Jan 16, 2018
@radeksimko radeksimko changed the title r/aws_route: Allow adding IPv6 routes to instances and network interfaces resource/aws_route: Allow adding IPv6 routes to instances and network interfaces Jan 16, 2018
@bflad bflad removed the waiting-response Maintainers are waiting on response from community or contributor. label Jan 23, 2018
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for adding the acceptance tests!

 make testacc TEST=./aws TESTARGS='-run=TestAccAWSRoute_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -run=TestAccAWSRoute_ -timeout 120m
=== RUN   TestAccAWSRoute_basic
--- PASS: TestAccAWSRoute_basic (38.67s)
=== RUN   TestAccAWSRoute_ipv6Support
--- PASS: TestAccAWSRoute_ipv6Support (29.11s)
=== RUN   TestAccAWSRoute_ipv6ToInternetGateway
--- PASS: TestAccAWSRoute_ipv6ToInternetGateway (38.24s)
=== RUN   TestAccAWSRoute_ipv6ToInstance
--- PASS: TestAccAWSRoute_ipv6ToInstance (166.32s)
=== RUN   TestAccAWSRoute_ipv6ToNetworkInterface
--- PASS: TestAccAWSRoute_ipv6ToNetworkInterface (188.57s)
=== RUN   TestAccAWSRoute_ipv6ToPeeringConnection
--- PASS: TestAccAWSRoute_ipv6ToPeeringConnection (28.88s)
=== RUN   TestAccAWSRoute_changeCidr
--- PASS: TestAccAWSRoute_changeCidr (54.87s)
=== RUN   TestAccAWSRoute_noopdiff
--- PASS: TestAccAWSRoute_noopdiff (114.88s)
=== RUN   TestAccAWSRoute_doesNotCrashWithVPCEndpoint
--- PASS: TestAccAWSRoute_doesNotCrashWithVPCEndpoint (41.54s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	701.139s

@bflad bflad merged commit 92580ac into hashicorp:master Jan 23, 2018
bflad added a commit that referenced this pull request Jan 23, 2018
@bflad bflad added this to the v1.8.0 milestone Jan 23, 2018
@stevenewey stevenewey deleted the route-ipv6 branch January 26, 2018 14:39
@bflad
Copy link
Contributor

bflad commented Jan 29, 2018

This has been released in terraform-provider-aws version 1.8.0. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@ghost
Copy link

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

Successfully merging this pull request may close these issues.

None yet

4 participants