Class VpnGatewayAttachment
Provides a Virtual Private Gateway attachment resource, allowing for an existing hardware VPN gateway to be attached and/or detached from a VPC.
Note: The
aws.ec2.VpnGatewayresource can also automatically attach the Virtual Private Gateway it creates to an existing VPC by setting thevpc_idattribute accordingly.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var network = new Aws.Ec2.Vpc("network", new Aws.Ec2.VpcArgs
{
CidrBlock = "10.0.0.0/16",
});
var vpn = new Aws.Ec2.VpnGateway("vpn", new Aws.Ec2.VpnGatewayArgs
{
Tags =
{
{ "Name", "example-vpn-gateway" },
},
});
var vpnAttachment = new Aws.Ec2.VpnGatewayAttachment("vpnAttachment", new Aws.Ec2.VpnGatewayAttachmentArgs
{
VpcId = network.Id,
VpnGatewayId = vpn.Id,
});
}
}
Inherited Members
Namespace: Pulumi.Aws.Ec2
Assembly: Pulumi.Aws.dll
Syntax
public class VpnGatewayAttachment : CustomResource
Constructors
View SourceVpnGatewayAttachment(String, VpnGatewayAttachmentArgs, CustomResourceOptions)
Create a VpnGatewayAttachment resource with the given unique name, arguments, and options.
Declaration
public VpnGatewayAttachment(string name, VpnGatewayAttachmentArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| VpnGatewayAttachmentArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceVpcId
The ID of the VPC.
Declaration
public Output<string> VpcId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
VpnGatewayId
The ID of the Virtual Private Gateway.
Declaration
public Output<string> VpnGatewayId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, VpnGatewayAttachmentState, CustomResourceOptions)
Get an existing VpnGatewayAttachment resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static VpnGatewayAttachment Get(string name, Input<string> id, VpnGatewayAttachmentState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| VpnGatewayAttachmentState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| VpnGatewayAttachment |