Currently aws_ec2_client_vpn_endpoint
resource only supports authentication_options
type directory-service-authentication
OR certificate-authentication
. This resource should support multiple authentication options (AND/OR). aws_ec2_client_vpn_endpoint
schema currently defines authentication_options
MaxItems as 1.
resource "aws_ec2_client_vpn_endpoint" "vpn" {
server_certificate_arn = "${var.server_certificate_arn}"
client_cidr_block = "${var.client_cidr_block}"
authentication_options {
type = "certificate-authentication"
root_certificate_chain_arn = "${var.root_certificate_chain_arn}"
}
authentication_options {
type = "directory-service-authentication"
active_directory_id = "${var.active_directory_id}"
}
}
Voting for this; was surprised to learn that this resource doesn't allow you to specify both authentication options, as mutual TLS combined with password auth is definitely the most secure solution. Without this ability, this resource isn't capable of supporting prod-ready VPN config, IMHO.
Support for this has been merged and will release with version 2.58.0 of the Terraform AWS Provider, later this week. Thanks to @davidsung for the implementation. 👍
This has been released in version 2.58.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!
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!
Most helpful comment
Voting for this; was surprised to learn that this resource doesn't allow you to specify both authentication options, as mutual TLS combined with password auth is definitely the most secure solution. Without this ability, this resource isn't capable of supporting prod-ready VPN config, IMHO.