Try AWS Native preview for resources not in the classic version.
aws.ec2clientvpn.NetworkAssociation
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
Provides network associations for AWS Client VPN endpoints. For more information on usage, please see the AWS Client VPN Administrator’s Guide.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Ec2ClientVpn.NetworkAssociation("example", new()
{
ClientVpnEndpointId = aws_ec2_client_vpn_endpoint.Example.Id,
SubnetId = aws_subnet.Example.Id,
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2clientvpn"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ec2clientvpn.NewNetworkAssociation(ctx, "example", &ec2clientvpn.NetworkAssociationArgs{
ClientVpnEndpointId: pulumi.Any(aws_ec2_client_vpn_endpoint.Example.Id),
SubnetId: pulumi.Any(aws_subnet.Example.Id),
})
if err != nil {
return err
}
return nil
})
}
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());
}
}
import pulumi
import pulumi_aws as aws
example = aws.ec2clientvpn.NetworkAssociation("example",
client_vpn_endpoint_id=aws_ec2_client_vpn_endpoint["example"]["id"],
subnet_id=aws_subnet["example"]["id"])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.ec2clientvpn.NetworkAssociation("example", {
clientVpnEndpointId: aws_ec2_client_vpn_endpoint.example.id,
subnetId: aws_subnet.example.id,
});
resources:
example:
type: aws:ec2clientvpn:NetworkAssociation
properties:
clientVpnEndpointId: ${aws_ec2_client_vpn_endpoint.example.id}
subnetId: ${aws_subnet.example.id}
Create NetworkAssociation Resource
new NetworkAssociation(name: string, args: NetworkAssociationArgs, opts?: CustomResourceOptions);
@overload
def NetworkAssociation(resource_name: str,
opts: Optional[ResourceOptions] = None,
client_vpn_endpoint_id: Optional[str] = None,
subnet_id: Optional[str] = None)
@overload
def NetworkAssociation(resource_name: str,
args: NetworkAssociationArgs,
opts: Optional[ResourceOptions] = None)
func NewNetworkAssociation(ctx *Context, name string, args NetworkAssociationArgs, opts ...ResourceOption) (*NetworkAssociation, error)
public NetworkAssociation(string name, NetworkAssociationArgs args, CustomResourceOptions? opts = null)
public NetworkAssociation(String name, NetworkAssociationArgs args)
public NetworkAssociation(String name, NetworkAssociationArgs args, CustomResourceOptions options)
type: aws:ec2clientvpn:NetworkAssociation
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NetworkAssociationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args NetworkAssociationArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args NetworkAssociationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NetworkAssociationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NetworkAssociationArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
NetworkAssociation Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The NetworkAssociation resource accepts the following input properties:
- Client
Vpn stringEndpoint Id The ID of the Client VPN endpoint.
- Subnet
Id string The ID of the subnet to associate with the Client VPN endpoint.
- Client
Vpn stringEndpoint Id The ID of the Client VPN endpoint.
- Subnet
Id string The ID of the subnet to associate with the Client VPN endpoint.
- client
Vpn StringEndpoint Id The ID of the Client VPN endpoint.
- subnet
Id String The ID of the subnet to associate with the Client VPN endpoint.
- client
Vpn stringEndpoint Id The ID of the Client VPN endpoint.
- subnet
Id string The ID of the subnet to associate with the Client VPN endpoint.
- client_
vpn_ strendpoint_ id The ID of the Client VPN endpoint.
- subnet_
id str The ID of the subnet to associate with the Client VPN endpoint.
- client
Vpn StringEndpoint Id The ID of the Client VPN endpoint.
- subnet
Id String The ID of the subnet to associate with the Client VPN endpoint.
Outputs
All input properties are implicitly available as output properties. Additionally, the NetworkAssociation resource produces the following output properties:
- Association
Id string The unique ID of the target network association.
- Id string
The provider-assigned unique ID for this managed resource.
- Vpc
Id string The ID of the VPC in which the target subnet is located.
- Association
Id string The unique ID of the target network association.
- Id string
The provider-assigned unique ID for this managed resource.
- Vpc
Id string The ID of the VPC in which the target subnet is located.
- association
Id String The unique ID of the target network association.
- id String
The provider-assigned unique ID for this managed resource.
- vpc
Id String The ID of the VPC in which the target subnet is located.
- association
Id string The unique ID of the target network association.
- id string
The provider-assigned unique ID for this managed resource.
- vpc
Id string The ID of the VPC in which the target subnet is located.
- association_
id str The unique ID of the target network association.
- id str
The provider-assigned unique ID for this managed resource.
- vpc_
id str The ID of the VPC in which the target subnet is located.
- association
Id String The unique ID of the target network association.
- id String
The provider-assigned unique ID for this managed resource.
- vpc
Id String The ID of the VPC in which the target subnet is located.
Look up Existing NetworkAssociation Resource
Get an existing NetworkAssociation resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: NetworkAssociationState, opts?: CustomResourceOptions): NetworkAssociation
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
association_id: Optional[str] = None,
client_vpn_endpoint_id: Optional[str] = None,
subnet_id: Optional[str] = None,
vpc_id: Optional[str] = None) -> NetworkAssociation
func GetNetworkAssociation(ctx *Context, name string, id IDInput, state *NetworkAssociationState, opts ...ResourceOption) (*NetworkAssociation, error)
public static NetworkAssociation Get(string name, Input<string> id, NetworkAssociationState? state, CustomResourceOptions? opts = null)
public static NetworkAssociation get(String name, Output<String> id, NetworkAssociationState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Association
Id string The unique ID of the target network association.
- Client
Vpn stringEndpoint Id The ID of the Client VPN endpoint.
- Subnet
Id string The ID of the subnet to associate with the Client VPN endpoint.
- Vpc
Id string The ID of the VPC in which the target subnet is located.
- Association
Id string The unique ID of the target network association.
- Client
Vpn stringEndpoint Id The ID of the Client VPN endpoint.
- Subnet
Id string The ID of the subnet to associate with the Client VPN endpoint.
- Vpc
Id string The ID of the VPC in which the target subnet is located.
- association
Id String The unique ID of the target network association.
- client
Vpn StringEndpoint Id The ID of the Client VPN endpoint.
- subnet
Id String The ID of the subnet to associate with the Client VPN endpoint.
- vpc
Id String The ID of the VPC in which the target subnet is located.
- association
Id string The unique ID of the target network association.
- client
Vpn stringEndpoint Id The ID of the Client VPN endpoint.
- subnet
Id string The ID of the subnet to associate with the Client VPN endpoint.
- vpc
Id string The ID of the VPC in which the target subnet is located.
- association_
id str The unique ID of the target network association.
- client_
vpn_ strendpoint_ id The ID of the Client VPN endpoint.
- subnet_
id str The ID of the subnet to associate with the Client VPN endpoint.
- vpc_
id str The ID of the VPC in which the target subnet is located.
- association
Id String The unique ID of the target network association.
- client
Vpn StringEndpoint Id The ID of the Client VPN endpoint.
- subnet
Id String The ID of the subnet to associate with the Client VPN endpoint.
- vpc
Id String The ID of the VPC in which the target subnet is located.
Import
Using pulumi import
, import AWS Client VPN network associations using the endpoint ID and the association ID. Values are separated by a ,
. For example:
$ pulumi import aws:ec2clientvpn/networkAssociation:NetworkAssociation example cvpn-endpoint-0ac3a1abbccddd666,vpn-assoc-0b8db902465d069ad
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
aws
Terraform Provider.
Try AWS Native preview for resources not in the classic version.