VpnGatewayArgs

data class VpnGatewayArgs(val amazonSideAsn: Output<String>? = null, val availabilityZone: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val vpcId: Output<String>? = null) : ConvertibleToJava<VpnGatewayArgs>

Provides a resource to create a VPC VPN Gateway.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const vpnGw = new aws.ec2.VpnGateway("vpn_gw", {
vpcId: main.id,
tags: {
Name: "main",
},
});
import pulumi
import pulumi_aws as aws
vpn_gw = aws.ec2.VpnGateway("vpn_gw",
vpc_id=main["id"],
tags={
"Name": "main",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var vpnGw = new Aws.Ec2.VpnGateway("vpn_gw", new()
{
VpcId = main.Id,
Tags =
{
{ "Name", "main" },
},
});
});
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.NewVpnGateway(ctx, "vpn_gw", &ec2.VpnGatewayArgs{
VpcId: pulumi.Any(main.Id),
Tags: pulumi.StringMap{
"Name": pulumi.String("main"),
},
})
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.ec2.VpnGateway;
import com.pulumi.aws.ec2.VpnGatewayArgs;
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 vpnGw = new VpnGateway("vpnGw", VpnGatewayArgs.builder()
.vpcId(main.id())
.tags(Map.of("Name", "main"))
.build());
}
}
resources:
vpnGw:
type: aws:ec2:VpnGateway
name: vpn_gw
properties:
vpcId: ${main.id}
tags:
Name: main

Import

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

$ pulumi import aws:ec2/vpnGateway:VpnGateway testvpngateway vgw-9a4cacf3

Constructors

Link copied to clipboard
constructor(amazonSideAsn: Output<String>? = null, availabilityZone: Output<String>? = null, tags: Output<Map<String, String>>? = null, vpcId: Output<String>? = null)

Properties

Link copied to clipboard
val amazonSideAsn: Output<String>? = null

The Autonomous System Number (ASN) for the Amazon side of the gateway. If you don't specify an ASN, the virtual private gateway is created with the default ASN.

Link copied to clipboard
val availabilityZone: Output<String>? = null

The Availability Zone for the virtual private gateway.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

A map of tags to assign to the resource. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Link copied to clipboard
val vpcId: Output<String>? = null

The VPC ID to create in.

Functions

Link copied to clipboard
open override fun toJava(): VpnGatewayArgs