Show / Hide Table of Contents

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.VpnGateway resource can also automatically attach the Virtual Private Gateway it creates to an existing VPC by setting the vpc_id attribute 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,
    });
}

}
Inheritance
System.Object
Resource
CustomResource
VpnGatewayAttachment
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Aws.Ec2
Assembly: Pulumi.Aws.dll
Syntax
public class VpnGatewayAttachment : CustomResource

Constructors

View Source

VpnGatewayAttachment(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 Source

VpcId

The ID of the VPC.

Declaration
public Output<string> VpcId { get; }
Property Value
Type Description
Output<System.String>
View Source

VpnGatewayId

The ID of the Virtual Private Gateway.

Declaration
public Output<string> VpnGatewayId { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(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
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.