1. Packages
  2. AWS
  3. API Docs
  4. ec2
  5. CustomerGateway
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

aws.ec2.CustomerGateway

Explore with Pulumi AI

aws logo
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Provides a customer gateway inside a VPC. These objects can be connected to VPN gateways via VPN connections, and allow you to establish tunnels between your network and the VPC.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const main = new aws.ec2.CustomerGateway("main", {
        bgpAsn: "65000",
        ipAddress: "172.83.124.10",
        type: "ipsec.1",
        tags: {
            Name: "main-customer-gateway",
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    
    main = aws.ec2.CustomerGateway("main",
        bgp_asn="65000",
        ip_address="172.83.124.10",
        type="ipsec.1",
        tags={
            "Name": "main-customer-gateway",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ec2.NewCustomerGateway(ctx, "main", &ec2.CustomerGatewayArgs{
    			BgpAsn:    pulumi.String("65000"),
    			IpAddress: pulumi.String("172.83.124.10"),
    			Type:      pulumi.String("ipsec.1"),
    			Tags: pulumi.StringMap{
    				"Name": pulumi.String("main-customer-gateway"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var main = new Aws.Ec2.CustomerGateway("main", new()
        {
            BgpAsn = "65000",
            IpAddress = "172.83.124.10",
            Type = "ipsec.1",
            Tags = 
            {
                { "Name", "main-customer-gateway" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.ec2.CustomerGateway;
    import com.pulumi.aws.ec2.CustomerGatewayArgs;
    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 main = new CustomerGateway("main", CustomerGatewayArgs.builder()
                .bgpAsn(65000)
                .ipAddress("172.83.124.10")
                .type("ipsec.1")
                .tags(Map.of("Name", "main-customer-gateway"))
                .build());
    
        }
    }
    
    resources:
      main:
        type: aws:ec2:CustomerGateway
        properties:
          bgpAsn: 65000
          ipAddress: 172.83.124.10
          type: ipsec.1
          tags:
            Name: main-customer-gateway
    

    Create CustomerGateway Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new CustomerGateway(name: string, args: CustomerGatewayArgs, opts?: CustomResourceOptions);
    @overload
    def CustomerGateway(resource_name: str,
                        args: CustomerGatewayArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def CustomerGateway(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        type: Optional[str] = None,
                        bgp_asn: Optional[str] = None,
                        bgp_asn_extended: Optional[str] = None,
                        certificate_arn: Optional[str] = None,
                        device_name: Optional[str] = None,
                        ip_address: Optional[str] = None,
                        tags: Optional[Mapping[str, str]] = None)
    func NewCustomerGateway(ctx *Context, name string, args CustomerGatewayArgs, opts ...ResourceOption) (*CustomerGateway, error)
    public CustomerGateway(string name, CustomerGatewayArgs args, CustomResourceOptions? opts = null)
    public CustomerGateway(String name, CustomerGatewayArgs args)
    public CustomerGateway(String name, CustomerGatewayArgs args, CustomResourceOptions options)
    
    type: aws:ec2:CustomerGateway
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args CustomerGatewayArgs
    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 CustomerGatewayArgs
    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 CustomerGatewayArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CustomerGatewayArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CustomerGatewayArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var customerGatewayResource = new Aws.Ec2.CustomerGateway("customerGatewayResource", new()
    {
        Type = "string",
        BgpAsn = "string",
        BgpAsnExtended = "string",
        CertificateArn = "string",
        DeviceName = "string",
        IpAddress = "string",
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := ec2.NewCustomerGateway(ctx, "customerGatewayResource", &ec2.CustomerGatewayArgs{
    	Type:           pulumi.String("string"),
    	BgpAsn:         pulumi.String("string"),
    	BgpAsnExtended: pulumi.String("string"),
    	CertificateArn: pulumi.String("string"),
    	DeviceName:     pulumi.String("string"),
    	IpAddress:      pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var customerGatewayResource = new CustomerGateway("customerGatewayResource", CustomerGatewayArgs.builder()
        .type("string")
        .bgpAsn("string")
        .bgpAsnExtended("string")
        .certificateArn("string")
        .deviceName("string")
        .ipAddress("string")
        .tags(Map.of("string", "string"))
        .build());
    
    customer_gateway_resource = aws.ec2.CustomerGateway("customerGatewayResource",
        type="string",
        bgp_asn="string",
        bgp_asn_extended="string",
        certificate_arn="string",
        device_name="string",
        ip_address="string",
        tags={
            "string": "string",
        })
    
    const customerGatewayResource = new aws.ec2.CustomerGateway("customerGatewayResource", {
        type: "string",
        bgpAsn: "string",
        bgpAsnExtended: "string",
        certificateArn: "string",
        deviceName: "string",
        ipAddress: "string",
        tags: {
            string: "string",
        },
    });
    
    type: aws:ec2:CustomerGateway
    properties:
        bgpAsn: string
        bgpAsnExtended: string
        certificateArn: string
        deviceName: string
        ipAddress: string
        tags:
            string: string
        type: string
    

    CustomerGateway Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The CustomerGateway resource accepts the following input properties:

    Type string
    The type of customer gateway. The only type AWS supports at this time is "ipsec.1".
    BgpAsn string
    The gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN). Valid values are from 1 to 2147483647. Conflicts with bgp_asn_extended.
    BgpAsnExtended string
    The gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN). Valid values are from 2147483648 to 4294967295 Conflicts with bgp_asn.
    CertificateArn string
    The Amazon Resource Name (ARN) for the customer gateway certificate.
    DeviceName string
    A name for the customer gateway device.
    IpAddress string
    The IPv4 address for the customer gateway device's outside interface.
    Tags Dictionary<string, string>
    Tags to apply to the gateway. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    Type string
    The type of customer gateway. The only type AWS supports at this time is "ipsec.1".
    BgpAsn string
    The gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN). Valid values are from 1 to 2147483647. Conflicts with bgp_asn_extended.
    BgpAsnExtended string
    The gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN). Valid values are from 2147483648 to 4294967295 Conflicts with bgp_asn.
    CertificateArn string
    The Amazon Resource Name (ARN) for the customer gateway certificate.
    DeviceName string
    A name for the customer gateway device.
    IpAddress string
    The IPv4 address for the customer gateway device's outside interface.
    Tags map[string]string
    Tags to apply to the gateway. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    type String
    The type of customer gateway. The only type AWS supports at this time is "ipsec.1".
    bgpAsn String
    The gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN). Valid values are from 1 to 2147483647. Conflicts with bgp_asn_extended.
    bgpAsnExtended String
    The gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN). Valid values are from 2147483648 to 4294967295 Conflicts with bgp_asn.
    certificateArn String
    The Amazon Resource Name (ARN) for the customer gateway certificate.
    deviceName String
    A name for the customer gateway device.
    ipAddress String
    The IPv4 address for the customer gateway device's outside interface.
    tags Map<String,String>
    Tags to apply to the gateway. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    type string
    The type of customer gateway. The only type AWS supports at this time is "ipsec.1".
    bgpAsn string
    The gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN). Valid values are from 1 to 2147483647. Conflicts with bgp_asn_extended.
    bgpAsnExtended string
    The gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN). Valid values are from 2147483648 to 4294967295 Conflicts with bgp_asn.
    certificateArn string
    The Amazon Resource Name (ARN) for the customer gateway certificate.
    deviceName string
    A name for the customer gateway device.
    ipAddress string
    The IPv4 address for the customer gateway device's outside interface.
    tags {[key: string]: string}
    Tags to apply to the gateway. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    type str
    The type of customer gateway. The only type AWS supports at this time is "ipsec.1".
    bgp_asn str
    The gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN). Valid values are from 1 to 2147483647. Conflicts with bgp_asn_extended.
    bgp_asn_extended str
    The gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN). Valid values are from 2147483648 to 4294967295 Conflicts with bgp_asn.
    certificate_arn str
    The Amazon Resource Name (ARN) for the customer gateway certificate.
    device_name str
    A name for the customer gateway device.
    ip_address str
    The IPv4 address for the customer gateway device's outside interface.
    tags Mapping[str, str]
    Tags to apply to the gateway. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    type String
    The type of customer gateway. The only type AWS supports at this time is "ipsec.1".
    bgpAsn String
    The gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN). Valid values are from 1 to 2147483647. Conflicts with bgp_asn_extended.
    bgpAsnExtended String
    The gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN). Valid values are from 2147483648 to 4294967295 Conflicts with bgp_asn.
    certificateArn String
    The Amazon Resource Name (ARN) for the customer gateway certificate.
    deviceName String
    A name for the customer gateway device.
    ipAddress String
    The IPv4 address for the customer gateway device's outside interface.
    tags Map<String>
    Tags to apply to the gateway. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the CustomerGateway resource produces the following output properties:

    Arn string
    The ARN of the customer gateway.
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Arn string
    The ARN of the customer gateway.
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    The ARN of the customer gateway.
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn string
    The ARN of the customer gateway.
    id string
    The provider-assigned unique ID for this managed resource.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn str
    The ARN of the customer gateway.
    id str
    The provider-assigned unique ID for this managed resource.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    The ARN of the customer gateway.
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Look up Existing CustomerGateway Resource

    Get an existing CustomerGateway 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?: CustomerGatewayState, opts?: CustomResourceOptions): CustomerGateway
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            arn: Optional[str] = None,
            bgp_asn: Optional[str] = None,
            bgp_asn_extended: Optional[str] = None,
            certificate_arn: Optional[str] = None,
            device_name: Optional[str] = None,
            ip_address: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None,
            type: Optional[str] = None) -> CustomerGateway
    func GetCustomerGateway(ctx *Context, name string, id IDInput, state *CustomerGatewayState, opts ...ResourceOption) (*CustomerGateway, error)
    public static CustomerGateway Get(string name, Input<string> id, CustomerGatewayState? state, CustomResourceOptions? opts = null)
    public static CustomerGateway get(String name, Output<String> id, CustomerGatewayState 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.
    The following state arguments are supported:
    Arn string
    The ARN of the customer gateway.
    BgpAsn string
    The gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN). Valid values are from 1 to 2147483647. Conflicts with bgp_asn_extended.
    BgpAsnExtended string
    The gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN). Valid values are from 2147483648 to 4294967295 Conflicts with bgp_asn.
    CertificateArn string
    The Amazon Resource Name (ARN) for the customer gateway certificate.
    DeviceName string
    A name for the customer gateway device.
    IpAddress string
    The IPv4 address for the customer gateway device's outside interface.
    Tags Dictionary<string, string>
    Tags to apply to the gateway. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Type string
    The type of customer gateway. The only type AWS supports at this time is "ipsec.1".
    Arn string
    The ARN of the customer gateway.
    BgpAsn string
    The gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN). Valid values are from 1 to 2147483647. Conflicts with bgp_asn_extended.
    BgpAsnExtended string
    The gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN). Valid values are from 2147483648 to 4294967295 Conflicts with bgp_asn.
    CertificateArn string
    The Amazon Resource Name (ARN) for the customer gateway certificate.
    DeviceName string
    A name for the customer gateway device.
    IpAddress string
    The IPv4 address for the customer gateway device's outside interface.
    Tags map[string]string
    Tags to apply to the gateway. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Type string
    The type of customer gateway. The only type AWS supports at this time is "ipsec.1".
    arn String
    The ARN of the customer gateway.
    bgpAsn String
    The gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN). Valid values are from 1 to 2147483647. Conflicts with bgp_asn_extended.
    bgpAsnExtended String
    The gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN). Valid values are from 2147483648 to 4294967295 Conflicts with bgp_asn.
    certificateArn String
    The Amazon Resource Name (ARN) for the customer gateway certificate.
    deviceName String
    A name for the customer gateway device.
    ipAddress String
    The IPv4 address for the customer gateway device's outside interface.
    tags Map<String,String>
    Tags to apply to the gateway. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    type String
    The type of customer gateway. The only type AWS supports at this time is "ipsec.1".
    arn string
    The ARN of the customer gateway.
    bgpAsn string
    The gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN). Valid values are from 1 to 2147483647. Conflicts with bgp_asn_extended.
    bgpAsnExtended string
    The gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN). Valid values are from 2147483648 to 4294967295 Conflicts with bgp_asn.
    certificateArn string
    The Amazon Resource Name (ARN) for the customer gateway certificate.
    deviceName string
    A name for the customer gateway device.
    ipAddress string
    The IPv4 address for the customer gateway device's outside interface.
    tags {[key: string]: string}
    Tags to apply to the gateway. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    type string
    The type of customer gateway. The only type AWS supports at this time is "ipsec.1".
    arn str
    The ARN of the customer gateway.
    bgp_asn str
    The gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN). Valid values are from 1 to 2147483647. Conflicts with bgp_asn_extended.
    bgp_asn_extended str
    The gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN). Valid values are from 2147483648 to 4294967295 Conflicts with bgp_asn.
    certificate_arn str
    The Amazon Resource Name (ARN) for the customer gateway certificate.
    device_name str
    A name for the customer gateway device.
    ip_address str
    The IPv4 address for the customer gateway device's outside interface.
    tags Mapping[str, str]
    Tags to apply to the gateway. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    type str
    The type of customer gateway. The only type AWS supports at this time is "ipsec.1".
    arn String
    The ARN of the customer gateway.
    bgpAsn String
    The gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN). Valid values are from 1 to 2147483647. Conflicts with bgp_asn_extended.
    bgpAsnExtended String
    The gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN). Valid values are from 2147483648 to 4294967295 Conflicts with bgp_asn.
    certificateArn String
    The Amazon Resource Name (ARN) for the customer gateway certificate.
    deviceName String
    A name for the customer gateway device.
    ipAddress String
    The IPv4 address for the customer gateway device's outside interface.
    tags Map<String>
    Tags to apply to the gateway. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    type String
    The type of customer gateway. The only type AWS supports at this time is "ipsec.1".

    Import

    Using pulumi import, import Customer Gateways using the id. For example:

    $ pulumi import aws:ec2/customerGateway:CustomerGateway main cgw-b4dc3961
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi