CustomerGateway

class CustomerGateway : KotlinCustomResource

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const _default = new alicloud.vpn.CustomerGateway("default", {
description: name,
ipAddress: "4.3.2.10",
asn: "1219002",
customerGatewayName: name,
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
default = alicloud.vpn.CustomerGateway("default",
description=name,
ip_address="4.3.2.10",
asn="1219002",
customer_gateway_name=name)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "terraform-example";
var @default = new AliCloud.Vpn.CustomerGateway("default", new()
{
Description = name,
IpAddress = "4.3.2.10",
Asn = "1219002",
CustomerGatewayName = name,
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpn"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "terraform-example"
if param := cfg.Get("name"); param != "" {
name = param
}
_, err := vpn.NewCustomerGateway(ctx, "default", &vpn.CustomerGatewayArgs{
Description: pulumi.String(name),
IpAddress: pulumi.String("4.3.2.10"),
Asn: pulumi.String("1219002"),
CustomerGatewayName: pulumi.String(name),
})
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.alicloud.vpn.CustomerGateway;
import com.pulumi.alicloud.vpn.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) {
final var config = ctx.config();
final var name = config.get("name").orElse("terraform-example");
var default_ = new CustomerGateway("default", CustomerGatewayArgs.builder()
.description(name)
.ipAddress("4.3.2.10")
.asn("1219002")
.customerGatewayName(name)
.build());
}
}
configuration:
name:
type: string
default: terraform-example
resources:
default:
type: alicloud:vpn:CustomerGateway
properties:
description: ${name}
ipAddress: 4.3.2.10
asn: '1219002'
customerGatewayName: ${name}

Import

VPN customer gateway can be imported using the id, e.g.

$ pulumi import alicloud:vpn/customerGateway:CustomerGateway example <id>

Properties

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

Asn.

Link copied to clipboard
val createTime: Output<Int>

The time when the customer gateway was created.

Link copied to clipboard

The name of the customer gateway.

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

The description of the customer gateway.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val ipAddress: Output<String>

The IP address of the customer gateway.

Link copied to clipboard
val name: Output<String>

. Field 'name' has been deprecated from provider version 1.216.0. New field 'customer_gateway_name' instead.

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>>?

tag. The following arguments will be discarded. Please use new fields as soon as possible:

Link copied to clipboard
val urn: Output<String>