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

Please allow dot in aws_vpn_connection.tunnel*_preshared_key #4169

Closed
saiya opened this issue Apr 11, 2018 · 3 comments · Fixed by #4731
Closed

Please allow dot in aws_vpn_connection.tunnel*_preshared_key #4169

saiya opened this issue Apr 11, 2018 · 3 comments · Fixed by #4731
Labels
bug Addresses a defect in current functionality. service/ec2 Issues and PRs that pertain to the ec2 service.
Milestone

Comments

@saiya
Copy link

saiya commented Apr 11, 2018

Hi, I encountered issue caused by validation mismatch between AWS and terraform.
It prevent us from creating aws_vpn_connection.

Could you fix this validation issue?

Terraform Version

Terraform v0.11.6
+ provider.aws v1.14.0

Affected Resource(s)

  • aws_vpn_connection

Terraform Configuration Files

resource "aws_vpn_connection" "main" {
  # (snip)

  tunnel1_preshared_key = "example.preshared.key"
  tunnel2_preshared_key = "example.preshared.key"
}

Expected Behavior

Able to use preshared_key that contains dot (".").

Actual Behavior

Got following error, cannot create aws_vpn_connection resource:

Error: module.vpn.aws_vpn_connection.main: "tunnel2_preshared_key" can only contain alphanumeric and underscore characters

I think this behavior is caused by this code: https://github.com/terraform-providers/terraform-provider-aws/blob/master/aws/resource_aws_vpn_connection.go#L571

Steps to Reproduce

  • Generate VPN pre-shared key with VPN appliance
  • Write aws_vpn_connection resource
  • terraform plan

References

AWS official document says:

The PSK must be between 8 and 64 characters in length and cannot start with zero (0). Allowed characters are alphanumeric characters, periods (.), and underscores (_).
@radeksimko radeksimko added bug Addresses a defect in current functionality. service/ec2 Issues and PRs that pertain to the ec2 service. labels Apr 24, 2018
saravanan30erd added a commit to saravanan30erd/terraform-provider-aws that referenced this issue Jun 2, 2018
saravanan30erd added a commit to saravanan30erd/terraform-provider-aws that referenced this issue Jun 2, 2018
@bflad bflad added this to the v1.22.0 milestone Jun 2, 2018
bflad added a commit that referenced this issue Jun 2, 2018
issue #4169 Allow dot in aws_vpn_connection tunnel preshared_key
@bflad
Copy link
Contributor

bflad commented Jun 2, 2018

The fix for this will be released with v1.22.0 of the AWS provider, middle of this week.

@bflad
Copy link
Contributor

bflad commented Jun 5, 2018

This has been released in version 1.22.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
bug Addresses a defect in current functionality. service/ec2 Issues and PRs that pertain to the ec2 service.
Projects
None yet
3 participants