GatewayVpnAttachmentArgs

data class GatewayVpnAttachmentArgs(val bgpConfig: Output<GatewayVpnAttachmentBgpConfigArgs>? = null, val customerGatewayId: Output<String>? = null, val effectImmediately: Output<Boolean>? = null, val enableDpd: Output<Boolean>? = null, val enableNatTraversal: Output<Boolean>? = null, val healthCheckConfig: Output<GatewayVpnAttachmentHealthCheckConfigArgs>? = null, val ikeConfig: Output<GatewayVpnAttachmentIkeConfigArgs>? = null, val ipsecConfig: Output<GatewayVpnAttachmentIpsecConfigArgs>? = null, val localSubnet: Output<String>? = null, val networkType: Output<String>? = null, val remoteSubnet: Output<String>? = null, val vpnAttachmentName: Output<String>? = null) : ConvertibleToJava<GatewayVpnAttachmentArgs>

Provides a VPN Gateway Vpn Attachment resource. For information about VPN Gateway Vpn Attachment and how to use it, see What is Vpn Attachment.

NOTE: Available since v1.181.0.

Example Usage

Basic Usage

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 com.pulumi.alicloud.vpn.GatewayVpnAttachment;
import com.pulumi.alicloud.vpn.GatewayVpnAttachmentArgs;
import com.pulumi.alicloud.vpn.inputs.GatewayVpnAttachmentIkeConfigArgs;
import com.pulumi.alicloud.vpn.inputs.GatewayVpnAttachmentIpsecConfigArgs;
import com.pulumi.alicloud.vpn.inputs.GatewayVpnAttachmentBgpConfigArgs;
import com.pulumi.alicloud.vpn.inputs.GatewayVpnAttachmentHealthCheckConfigArgs;
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("tf-example");
var defaultCustomerGateway = new CustomerGateway("defaultCustomerGateway", CustomerGatewayArgs.builder()
.ipAddress("42.104.22.210")
.asn("45014")
.description(name)
.build());
var defaultGatewayVpnAttachment = new GatewayVpnAttachment("defaultGatewayVpnAttachment", GatewayVpnAttachmentArgs.builder()
.customerGatewayId(defaultCustomerGateway.id())
.networkType("public")
.localSubnet("0.0.0.0/0")
.remoteSubnet("0.0.0.0/0")
.effectImmediately(false)
.ikeConfig(GatewayVpnAttachmentIkeConfigArgs.builder()
.ikeAuthAlg("md5")
.ikeEncAlg("des")
.ikeVersion("ikev2")
.ikeMode("main")
.ikeLifetime(86400)
.psk("tf-testvpn2")
.ikePfs("group1")
.remoteId("testbob2")
.localId("testalice2")
.build())
.ipsecConfig(GatewayVpnAttachmentIpsecConfigArgs.builder()
.ipsecPfs("group5")
.ipsecEncAlg("des")
.ipsecAuthAlg("md5")
.ipsecLifetime(86400)
.build())
.bgpConfig(GatewayVpnAttachmentBgpConfigArgs.builder()
.enable(true)
.localAsn(45014)
.tunnelCidr("169.254.11.0/30")
.localBgpIp("169.254.11.1")
.build())
.healthCheckConfig(GatewayVpnAttachmentHealthCheckConfigArgs.builder()
.enable(true)
.sip("192.168.1.1")
.dip("10.0.0.1")
.interval(10)
.retry(10)
.policy("revoke_route")
.build())
.enableDpd(true)
.enableNatTraversal(true)
.vpnAttachmentName(name)
.build());
}
}

Import

VPN Gateway Vpn Attachment can be imported using the id, e.g.

$ pulumi import alicloud:vpn/gatewayVpnAttachment:GatewayVpnAttachment example <id>

Constructors

Link copied to clipboard
fun GatewayVpnAttachmentArgs(bgpConfig: Output<GatewayVpnAttachmentBgpConfigArgs>? = null, customerGatewayId: Output<String>? = null, effectImmediately: Output<Boolean>? = null, enableDpd: Output<Boolean>? = null, enableNatTraversal: Output<Boolean>? = null, healthCheckConfig: Output<GatewayVpnAttachmentHealthCheckConfigArgs>? = null, ikeConfig: Output<GatewayVpnAttachmentIkeConfigArgs>? = null, ipsecConfig: Output<GatewayVpnAttachmentIpsecConfigArgs>? = null, localSubnet: Output<String>? = null, networkType: Output<String>? = null, remoteSubnet: Output<String>? = null, vpnAttachmentName: Output<String>? = null)

Functions

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

Properties

Link copied to clipboard

Bgp configuration information. See bgp_config below.

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

The ID of the customer gateway. From version 1.196.0, customer_gateway_id can be modified.

Link copied to clipboard
val effectImmediately: Output<Boolean>? = null

Indicates whether IPsec-VPN negotiations are initiated immediately. Valid values.

Link copied to clipboard
val enableDpd: Output<Boolean>? = null

Whether to enable the DPD (peer survival detection) function.

Link copied to clipboard
val enableNatTraversal: Output<Boolean>? = null

Allow NAT penetration.

Link copied to clipboard

Health check configuration information. See health_check_config below.

Link copied to clipboard

Configuration negotiated in the second stage. See ike_config below.

Link copied to clipboard

Configuration negotiated in the second stage. See ipsec_config below.

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

The CIDR block of the virtual private cloud (VPC).

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

The network type of the IPsec connection. Valid values: public, private.

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

The CIDR block of the on-premises data center.

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

The name of the vpn attachment.