UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

105 lines (104 loc) 4.08 kB
import * as pulumi from "@pulumi/pulumi"; /** * 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 `vpcId` attribute accordingly. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const network = new aws.ec2.Vpc("network", {cidrBlock: "10.0.0.0/16"}); * const vpn = new aws.ec2.VpnGateway("vpn", {tags: { * Name: "example-vpn-gateway", * }}); * const vpnAttachment = new aws.ec2.VpnGatewayAttachment("vpn_attachment", { * vpcId: network.id, * vpnGatewayId: vpn.id, * }); * ``` * * See [Virtual Private Cloud](http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Introduction.html) * and [Virtual Private Gateway](http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html) user * guides for more information. * * ## Import * * You cannot import this resource. */ export declare class VpnGatewayAttachment extends pulumi.CustomResource { /** * Get an existing VpnGatewayAttachment resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: VpnGatewayAttachmentState, opts?: pulumi.CustomResourceOptions): VpnGatewayAttachment; /** * Returns true if the given object is an instance of VpnGatewayAttachment. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is VpnGatewayAttachment; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ readonly region: pulumi.Output<string>; /** * The ID of the VPC. */ readonly vpcId: pulumi.Output<string>; /** * The ID of the Virtual Private Gateway. */ readonly vpnGatewayId: pulumi.Output<string>; /** * Create a VpnGatewayAttachment resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: VpnGatewayAttachmentArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering VpnGatewayAttachment resources. */ export interface VpnGatewayAttachmentState { /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input<string>; /** * The ID of the VPC. */ vpcId?: pulumi.Input<string>; /** * The ID of the Virtual Private Gateway. */ vpnGatewayId?: pulumi.Input<string>; } /** * The set of arguments for constructing a VpnGatewayAttachment resource. */ export interface VpnGatewayAttachmentArgs { /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input<string>; /** * The ID of the VPC. */ vpcId: pulumi.Input<string>; /** * The ID of the Virtual Private Gateway. */ vpnGatewayId: pulumi.Input<string>; }