Terraform-provider-aws: Client VPN Endpoint - Create Client Route

Created on 9 Oct 2019  ยท  4Comments  ยท  Source: hashicorp/terraform-provider-aws

Description

Like https://github.com/terraform-providers/terraform-provider-aws/issues/7494, it looks like this is also missing. This is needed to update the Client VPN routing table

New or Affected Resource(s)

aws_ec2_client_vpn_route

Potential Terraform Configuration

https://docs.aws.amazon.com/sdk-for-go/api/service/ec2/#EC2.CreateClientVpnRoute

resource "aws_ec2_client_vpn_route" "route" {
  client_vpn_endpoint_id = ""
  destination_cidr_block = ""
  target_vpc_subnet_id = ""

  description = "optional description"
}

References

https://docs.aws.amazon.com/cli/latest/reference/ec2/create-client-vpn-route.html

enhancement new-resource servicec2

Most helpful comment

Any update on when a solution for this issue will be merged in to the main "aws_ec2_client_vpn_endpoint" resource?

I see every few days someone makes a PR to address this issue.

All 4 comments

Hi, could I possibly submit a PR for this?

Workaround:

resource "null_resource" "client_vpn_route" {
  provisioner "local-exec" {
    when = "create"
    command = "aws ec2 create-client-vpn-route --client-vpn-endpoint-id ${aws_ec2_client_vpn_endpoint.client_vpn.id} --destination-cidr-block 0.0.0.0/0 --target-vpc-subnet-id ${var.subnet_id}"
  }
  provisioner "local-exec" {
    when = "destroy"
    command = "aws ec2  delete-client-vpn-route --client-vpn-endpoint-id ${aws_ec2_client_vpn_endpoint.client_vpn.id} --destination-cidr-block 0.0.0.0/0"
  }
}

Any update on when a solution for this issue will be merged in to the main "aws_ec2_client_vpn_endpoint" resource?

I see every few days someone makes a PR to address this issue.

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!

Was this page helpful?
0 / 5 - 0 ratings