NetworkAssociation

class NetworkAssociation : KotlinCustomResource

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

NOTE on Client VPN endpoint target network security groups: The provider provides both a standalone Client VPN endpoint network association resource with a (deprecated) security_groups argument and a Client VPN endpoint resource with a security_group_ids argument. Do not specify security groups in both resources. Doing so will cause a conflict and will overwrite the target network security group association.

Example Usage

Using default security group

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2clientvpn.NetworkAssociation;
import com.pulumi.aws.ec2clientvpn.NetworkAssociationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new NetworkAssociation("example", NetworkAssociationArgs.builder()
.clientVpnEndpointId(aws_ec2_client_vpn_endpoint.example().id())
.subnetId(aws_subnet.example().id())
.build());
}
}

Using custom security groups

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2clientvpn.NetworkAssociation;
import com.pulumi.aws.ec2clientvpn.NetworkAssociationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new NetworkAssociation("example", NetworkAssociationArgs.builder()
.clientVpnEndpointId(aws_ec2_client_vpn_endpoint.example().id())
.subnetId(aws_subnet.example().id())
.securityGroups(
aws_security_group.example1().id(),
aws_security_group.example2().id())
.build());
}
}

Import

AWS Client VPN network associations can be imported using the endpoint ID and the association ID. Values are separated by a ,.

$ pulumi import aws:ec2clientvpn/networkAssociation:NetworkAssociation example cvpn-endpoint-0ac3a1abbccddd666,vpn-assoc-0b8db902465d069ad

Properties

Link copied to clipboard
val associationId: Output<String>

The unique ID of the target network association.

Link copied to clipboard

The ID of the Client VPN endpoint.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val securityGroups: Output<List<String>>

A list of up to five custom security groups to apply to the target network. If not specified, the VPC's default security group is assigned.

Link copied to clipboard
val status: Output<String>

Deprecated The current state of the target network association.

Link copied to clipboard
val subnetId: Output<String>

The ID of the subnet to associate with the Client VPN endpoint.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val vpcId: Output<String>

The ID of the VPC in which the target subnet is located.