Provides network associations for AWS Client VPN endpoints. For more information on usage, please see the AWS Client VPN Administrator's Guide.
resource "aws_ec2_client_vpn_network_association" "example" {
client_vpn_endpoint_id = aws_ec2_client_vpn_endpoint.example.id
subnet_id = aws_subnet.example.id
}
This resource supports the following arguments:
client_vpn_endpoint_id
- (Required) The ID of the Client VPN endpoint.subnet_id
- (Required) The ID of the subnet to associate with the Client VPN endpoint.This resource exports the following attributes in addition to the arguments above:
id
- The unique ID of the target network association.association_id
- The unique ID of the target network association.vpc_id
- The ID of the VPC in which the target subnet is located.create
- (Default 30m
)delete
- (Default 30m
)In Terraform v1.5.0 and later, use an import
block to import AWS Client VPN network associations using the endpoint ID and the association ID. Values are separated by a ,
. For example:
import {
to = aws_ec2_client_vpn_network_association.example
id = "cvpn-endpoint-0ac3a1abbccddd666,cvpn-assoc-0b8db902465d069ad"
}
Using terraform import
, import AWS Client VPN network associations using the endpoint ID and the association ID. Values are separated by a ,
. For example:
% terraform import aws_ec2_client_vpn_network_association.example cvpn-endpoint-0ac3a1abbccddd666,cvpn-assoc-0b8db902465d069ad