IpsecServer

class IpsecServer : KotlinCustomResource

Provides a VPN Ipsec Server resource. For information about VPN Ipsec Server and how to use it, see What is Ipsec Server.

NOTE: Available in v1.161.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.AlicloudFunctions;
import com.pulumi.alicloud.inputs.GetZonesArgs;
import com.pulumi.alicloud.vpc.Network;
import com.pulumi.alicloud.vpc.NetworkArgs;
import com.pulumi.alicloud.vpc.Switch;
import com.pulumi.alicloud.vpc.SwitchArgs;
import com.pulumi.alicloud.vpn.Gateway;
import com.pulumi.alicloud.vpn.GatewayArgs;
import com.pulumi.alicloud.vpn.IpsecServer;
import com.pulumi.alicloud.vpn.IpsecServerArgs;
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 fooZones = AlicloudFunctions.getZones(GetZonesArgs.builder()
.availableResourceCreation("VSwitch")
.build());
var fooNetwork = new Network("fooNetwork", NetworkArgs.builder()
.vpcName("terraform-example")
.cidrBlock("172.16.0.0/12")
.build());
var fooSwitch = new Switch("fooSwitch", SwitchArgs.builder()
.vswitchName("terraform-example")
.cidrBlock("172.16.0.0/21")
.vpcId(fooNetwork.id())
.zoneId(fooZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
.build());
var fooGateway = new Gateway("fooGateway", GatewayArgs.builder()
.vpcId(fooNetwork.id())
.bandwidth("10")
.enableSsl(true)
.instanceChargeType("PrePaid")
.description("terraform-example")
.vswitchId(fooSwitch.id())
.build());
var fooIpsecServer = new IpsecServer("fooIpsecServer", IpsecServerArgs.builder()
.clientIpPool("10.0.0.0/24")
.ipsecServerName("terraform-example")
.localSubnet("192.168.0.0/24")
.vpnGatewayId(fooGateway.id())
.pskEnabled(true)
.build());
}
}

Import

VPN Ipsec Server can be imported using the id, e.g.

$ pulumi import alicloud:vpn/ipsecServer:IpsecServer example <id>

Properties

Link copied to clipboard
val clientIpPool: Output<String>

The client CIDR block. It refers to the CIDR block that is allocated to the virtual interface of the client.

Link copied to clipboard
val dryRun: Output<Boolean>?

The dry run.

Link copied to clipboard

Specifies whether you want the configuration to immediately take effect.

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

The configuration of Phase 1 negotiations. See the following Block ike_config.

Link copied to clipboard

The configuration of Phase 2 negotiations. See the following Block ipsec_config.

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

The name of the IPsec server. The name must be 2 to 128 characters in length, and can contain digits, hyphens (-), and underscores (_). It must start with a letter.

Link copied to clipboard
val localSubnet: Output<String>

The local CIDR block. It refers to the CIDR block of the virtual private cloud (VPC) that is used to connect with the client. Separate multiple CIDR blocks with commas (,). Example: 192.168.1.0/24,192.168.2.0/24.

Link copied to clipboard
val psk: Output<String>

The pre-shared key. The pre-shared key is used to authenticate the VPN gateway and the client. By default, the system generates a random string that is 16 bits in length. You can also specify the pre-shared key. It can contain at most 100 characters.

Link copied to clipboard
val pskEnabled: Output<Boolean>?

Whether to enable the pre-shared key authentication method. The value is only true, which indicates that the pre-shared key authentication method is enabled.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val vpnGatewayId: Output<String>

The ID of the VPN gateway.