Gateway Vpn Attachment Args
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());
}
}
Content copied to clipboard
Import
VPN Gateway Vpn Attachment can be imported using the id, e.g.
$ pulumi import alicloud:vpn/gatewayVpnAttachment:GatewayVpnAttachment example <id>
Content copied to clipboard
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)