Resource: aws_ec2_client_vpn_authorization_rule

Provides authorization rules for AWS Client VPN endpoints. For more information on usage, please see the AWS Client VPN Administrator's Guide.

Example Usage

resource "aws_ec2_client_vpn_authorization_rule" "example" {
  client_vpn_endpoint_id = aws_ec2_client_vpn_endpoint.example.id
  target_network_cidr    = aws_subnet.example.cidr_block
  authorize_all_groups   = true
}

Argument Reference

This resource supports the following arguments:

Attribute Reference

This resource exports no additional attributes.

Timeouts

Configuration options:

Import

In Terraform v1.5.0 and later, use an import block to import AWS Client VPN authorization rules using the endpoint ID and target network CIDR. If there is a specific group name, include that also. All values are separated by a ,. For example:

Using the endpoint ID and target network CIDR:

import {
  to = aws_ec2_client_vpn_authorization_rule.example
  id = "cvpn-endpoint-0ac3a1abbccddd666,10.1.0.0/24"
}

Using the endpoint ID, target network CIDR, and group name:

import {
  to = aws_ec2_client_vpn_authorization_rule.example
  id = "cvpn-endpoint-0ac3a1abbccddd666,10.1.0.0/24,team-a"
}

Using terraform import to import AWS Client VPN authorization rules using the endpoint ID and target network CIDR. If there is a specific group name, include that also. All values are separated by a ,. For example:

Using the endpoint ID and target network CIDR:

% terraform import aws_ec2_client_vpn_authorization_rule.example cvpn-endpoint-0ac3a1abbccddd666,10.1.0.0/24

Using the endpoint ID, target network CIDR, and group name:

% terraform import aws_ec2_client_vpn_authorization_rule.example cvpn-endpoint-0ac3a1abbccddd666,10.1.0.0/24,team-a