VpnGateway

class VpnGateway : KotlinCustomResource

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

Properties

Link copied to clipboard
val amazonSideAsn: Output<String>

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 arn: Output<String>

Amazon Resource Name (ARN) of the VPN Gateway.

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

The Availability Zone for the virtual private gateway.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val tags: Output<Map<String, String>>?

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 tagsAll: Output<Map<String, String>>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val vpcId: Output<String>

The VPC ID to create in.