hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.75k stars 9.11k forks source link

[Bug]: custom tunnel*_inside_ipv6_cidr should not have dependency on the present of transit_gateway_id #36075

Closed tmatty102 closed 6 months ago

tmatty102 commented 6 months ago

Description

When specifying the "Inside IPv6 CIDR" for VPN tunnels, the provider requires specifying a Transit Gateway ID. In the case of working with Cloud WAN attachment, the Transit Gateway is not necessary. thus, TF exit with error message

| Error: Missing required argument │ │ with module.cloudwan-gcp-vpn.aws_vpn_connection.vpn-alpha, │ on ........ in resource "aws_vpn_connection" "vpn-alpha": │ 136: tunnel1_inside_ipv6_cidr = var.alpha_tunnel1_inside_ipv6_cidr │ │ "tunnel1_inside_ipv6_cidr": all of transit_gateway_id,tunnel1_inside_ipv6_cidr must be specified

the corresponding CLI request to create the vpn_connection without specifying the transit gateway id but still able to provide tunnel options for custom inside IPc6 CIDR

aws ec2 create-vpn-connection \ --customer-gateway-id cgw-0e8e8f909f51e6b70 \ --type ipsec.1 \ --options TunnelInsideIpVersion=ipv6,TunnelOptions='[{TunnelInsideIpv6Cidr=fdff:1::6:0/126},{TunnelInsideIpv6Cidr=fdff:1::7:0/126}]'

response

"CustomerGatewayId": "cgw-0e8e8f909f51e6b70", "Category": "VPN", "State": "pending", "VpnConnectionId": "vpn-014ec04af94661dab", "GatewayAssociationState": "not-associated", "Options": { "EnableAcceleration": false, "StaticRoutesOnly": false, "LocalIpv6NetworkCidr": "::/0", "RemoteIpv6NetworkCidr": "::/0", "OutsideIpAddressType": "PublicIpv4", "TunnelInsideIpVersion": "ipv6",

Affected Resource(s) and/or Data Source(s)

aws_vpn_connection

Potential Terraform Configuration

No response

References

https://docs.aws.amazon.com/vpn/latest/s2svpn/create-cwan-vpn-attachment.html

Would you like to implement a fix?

Yes

github-actions[bot] commented 6 months ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

github-actions[bot] commented 6 months ago

This functionality has been released in v5.42.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. Thank you!

github-actions[bot] commented 5 months ago

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.