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

Allow local and remote IPv4 and IPv6 CIDRs to be of any size #17573

Merged
merged 7 commits into from
May 27, 2021
Merged

Allow local and remote IPv4 and IPv6 CIDRs to be of any size #17573

merged 7 commits into from
May 27, 2021

Conversation

jsf9k
Copy link
Contributor

@jsf9k jsf9k commented Feb 11, 2021

Previously the IPv4 parameters were required to be a /32 and the IPv6 parameters were restricted to be a /128. This constraint is not mentioned in the Terraform or AWS documentation, and in fact the default values are /0s.

Without this change, users are forced to leave local_ipv4_network_cidr, local_ipv6_network_cidr, remote_ipv4_network_cidr, and remote_ipv6_network_cidr unspecified, resulting in the values 0.0.0.0/0 or 0::/128 being used. This is obviously suboptimal. Depending on what hardware or software is at the other end of the tunnel, it may even prevent the tunnel from functioning as expected.

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

Closes #16879.

Output from acceptance testing:

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

@jsf9k jsf9k requested a review from a team as a code owner February 11, 2021 20:23
@ghost ghost added size/M Managed by automation to categorize the size of a PR. 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 11, 2021
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Feb 11, 2021
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Welcome @jsf9k 👋

It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTING guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.

Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.

Thanks again, and welcome to the community! 😃

@nikolai-derzhak-distillery

Hey, guys, we really would appreciate if you you merge that (assuming no issues with PR). As we are going to have bunch of customers soon and rest of infra already in terraform. Thanks !

@YakDriver YakDriver self-assigned this May 27, 2021
Previously the IPv4 parameters were required to be a /32 and the IPv6
parameters were restricted to be a /128.  This constraint is not
mentioned in the Terraform or AWS documentation, and in fact the
default values are /0s.

Resolves #16879.
@jsf9k
Copy link
Contributor Author

jsf9k commented May 27, 2021

@YakDriver, do you want me to fix those failing tests or is that something you're currently working on? I don't want to step on your toes.

@YakDriver YakDriver removed the needs-triage Waiting for first response or review from a maintainer. label May 27, 2021
@YakDriver
Copy link
Member

@jsf9k Thanks for the offer and this PR! GovCloud operates a little differently so I'm adjusting that while I'm here. Other than that we should be good to go in the next few (30-60) minutes.

@ghost ghost added size/XL Managed by automation to categorize the size of a PR. and removed size/M Managed by automation to categorize the size of a PR. labels May 27, 2021
@YakDriver YakDriver added this to the v3.43.0 milestone May 27, 2021
Copy link
Member

@YakDriver YakDriver left a comment

Choose a reason for hiding this comment

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

Looks great! 🎉 Thanks!

Output from acceptance tests (us-west-2):

--- PASS: TestAccAWSVpnConnection_basic (716.42s)
--- PASS: TestAccAWSVpnConnection_disappears (375.44s)
--- PASS: TestAccAWSVpnConnection_specifyIpv4 (754.19s)
--- PASS: TestAccAWSVpnConnection_specifyIpv6 (669.27s)
--- PASS: TestAccAWSVpnConnection_tags (303.79s)
--- PASS: TestAccAWSVpnConnection_TransitGatewayID (657.22s)
--- PASS: TestAccAWSVpnConnection_Tunnel1InsideCidr (645.87s)
--- PASS: TestAccAWSVpnConnection_Tunnel1InsideIpv6Cidr (616.98s)
--- PASS: TestAccAWSVpnConnection_Tunnel1PresharedKey (769.15s)
--- PASS: TestAccAWSVpnConnection_tunnelOptions (306.45s)
--- PASS: TestAccAWSVpnConnection_tunnelOptionsLesser (332.30s)
--- PASS: TestAccAWSVpnConnection_withEnableAcceleration (737.10s)
--- PASS: TestAccAWSVpnConnection_withIpv6 (589.56s)
--- PASS: TestAccAWSVpnConnection_withoutStaticRoutes (316.15s)

Output from acceptance tests (GovCloud):


--- PASS: TestAccAWSVpnConnection_basic (658.72s)
--- PASS: TestAccAWSVpnConnection_disappears (256.03s)
--- PASS: TestAccAWSVpnConnection_specifyIpv4 (210.24s)
--- PASS: TestAccAWSVpnConnection_specifyIpv6 (841.73s)
--- PASS: TestAccAWSVpnConnection_tags (274.36s)
--- PASS: TestAccAWSVpnConnection_TransitGatewayID (906.37s)
--- PASS: TestAccAWSVpnConnection_Tunnel1InsideCidr (245.02s)
--- PASS: TestAccAWSVpnConnection_Tunnel1InsideIpv6Cidr (786.89s)
--- PASS: TestAccAWSVpnConnection_Tunnel1PresharedKey (225.87s)
--- PASS: TestAccAWSVpnConnection_tunnelOptionsLesser (242.62s)
--- PASS: TestAccAWSVpnConnection_withIpv6 (781.76s)
--- PASS: TestAccAWSVpnConnection_withoutStaticRoutes (227.04s)
--- SKIP: TestAccAWSVpnConnection_tunnelOptions (29.48s)
--- SKIP: TestAccAWSVpnConnection_withEnableAcceleration (486.27s)

@YakDriver YakDriver merged commit f9080a5 into hashicorp:main May 27, 2021
@jsf9k
Copy link
Contributor Author

jsf9k commented May 27, 2021

Thanks @YakDriver!

@ghost
Copy link

ghost commented Jun 1, 2021

This has been released in version 3.43.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!

@github-actions
Copy link

github-actions bot commented Jul 2, 2021

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/ec2 Issues and PRs that pertain to the ec2 service. size/XL 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
3 participants