1. Packages
  2. Alicloud Provider
  3. API Docs
  4. vpn
  5. IpsecServer
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

alicloud.vpn.IpsecServer

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

    Provides a VPN Ipsec Server resource.

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

    NOTE: Available since v1.161.0+.

    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 = alicloud.getZones({
        availableResourceCreation: "VSwitch",
    });
    const defaultGetNetworks = alicloud.vpc.getNetworks({
        nameRegex: "^default-NODELETING$",
        cidrBlock: "172.16.0.0/16",
    });
    const default0 = Promise.all([defaultGetNetworks, _default]).then(([defaultGetNetworks, _default]) => alicloud.vpc.getSwitches({
        vpcId: defaultGetNetworks.ids?.[0],
        zoneId: _default.ids?.[0],
    }));
    const default1 = Promise.all([defaultGetNetworks, _default]).then(([defaultGetNetworks, _default]) => alicloud.vpc.getSwitches({
        vpcId: defaultGetNetworks.ids?.[0],
        zoneId: _default.ids?.[1],
    }));
    const defaultGateway = new alicloud.vpn.Gateway("default", {
        vpnGatewayName: name,
        vpcId: defaultGetNetworks.then(defaultGetNetworks => defaultGetNetworks.ids?.[0]),
        bandwidth: 10,
        enableSsl: true,
        description: name,
        paymentType: "Subscription",
        vswitchId: default0.then(default0 => default0.ids?.[0]),
        disasterRecoveryVswitchId: default1.then(default1 => default1.ids?.[0]),
    });
    const foo = new alicloud.vpn.IpsecServer("foo", {
        clientIpPool: "10.0.0.0/24",
        ipsecServerName: name,
        localSubnet: "192.168.0.0/24",
        vpnGatewayId: defaultGateway.id,
        pskEnabled: true,
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "terraform-example"
    default = alicloud.get_zones(available_resource_creation="VSwitch")
    default_get_networks = alicloud.vpc.get_networks(name_regex="^default-NODELETING$",
        cidr_block="172.16.0.0/16")
    default0 = alicloud.vpc.get_switches(vpc_id=default_get_networks.ids[0],
        zone_id=default.ids[0])
    default1 = alicloud.vpc.get_switches(vpc_id=default_get_networks.ids[0],
        zone_id=default.ids[1])
    default_gateway = alicloud.vpn.Gateway("default",
        vpn_gateway_name=name,
        vpc_id=default_get_networks.ids[0],
        bandwidth=10,
        enable_ssl=True,
        description=name,
        payment_type="Subscription",
        vswitch_id=default0.ids[0],
        disaster_recovery_vswitch_id=default1.ids[0])
    foo = alicloud.vpn.IpsecServer("foo",
        client_ip_pool="10.0.0.0/24",
        ipsec_server_name=name,
        local_subnet="192.168.0.0/24",
        vpn_gateway_id=default_gateway.id,
        psk_enabled=True)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
    	"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
    		}
    		_default, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
    			AvailableResourceCreation: pulumi.StringRef("VSwitch"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultGetNetworks, err := vpc.GetNetworks(ctx, &vpc.GetNetworksArgs{
    			NameRegex: pulumi.StringRef("^default-NODELETING$"),
    			CidrBlock: pulumi.StringRef("172.16.0.0/16"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		default0, err := vpc.GetSwitches(ctx, &vpc.GetSwitchesArgs{
    			VpcId:  pulumi.StringRef(defaultGetNetworks.Ids[0]),
    			ZoneId: pulumi.StringRef(_default.Ids[0]),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		default1, err := vpc.GetSwitches(ctx, &vpc.GetSwitchesArgs{
    			VpcId:  pulumi.StringRef(defaultGetNetworks.Ids[0]),
    			ZoneId: pulumi.StringRef(_default.Ids[1]),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultGateway, err := vpn.NewGateway(ctx, "default", &vpn.GatewayArgs{
    			VpnGatewayName:            pulumi.String(name),
    			VpcId:                     pulumi.String(defaultGetNetworks.Ids[0]),
    			Bandwidth:                 pulumi.Int(10),
    			EnableSsl:                 pulumi.Bool(true),
    			Description:               pulumi.String(name),
    			PaymentType:               pulumi.String("Subscription"),
    			VswitchId:                 pulumi.String(default0.Ids[0]),
    			DisasterRecoveryVswitchId: pulumi.String(default1.Ids[0]),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = vpn.NewIpsecServer(ctx, "foo", &vpn.IpsecServerArgs{
    			ClientIpPool:    pulumi.String("10.0.0.0/24"),
    			IpsecServerName: pulumi.String(name),
    			LocalSubnet:     pulumi.String("192.168.0.0/24"),
    			VpnGatewayId:    defaultGateway.ID(),
    			PskEnabled:      pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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 = AliCloud.GetZones.Invoke(new()
        {
            AvailableResourceCreation = "VSwitch",
        });
    
        var defaultGetNetworks = AliCloud.Vpc.GetNetworks.Invoke(new()
        {
            NameRegex = "^default-NODELETING$",
            CidrBlock = "172.16.0.0/16",
        });
    
        var default0 = AliCloud.Vpc.GetSwitches.Invoke(new()
        {
            VpcId = defaultGetNetworks.Apply(getNetworksResult => getNetworksResult.Ids[0]),
            ZoneId = @default.Apply(getZonesResult => getZonesResult.Ids[0]),
        });
    
        var default1 = AliCloud.Vpc.GetSwitches.Invoke(new()
        {
            VpcId = defaultGetNetworks.Apply(getNetworksResult => getNetworksResult.Ids[0]),
            ZoneId = @default.Apply(getZonesResult => getZonesResult.Ids[1]),
        });
    
        var defaultGateway = new AliCloud.Vpn.Gateway("default", new()
        {
            VpnGatewayName = name,
            VpcId = defaultGetNetworks.Apply(getNetworksResult => getNetworksResult.Ids[0]),
            Bandwidth = 10,
            EnableSsl = true,
            Description = name,
            PaymentType = "Subscription",
            VswitchId = default0.Apply(getSwitchesResult => getSwitchesResult.Ids[0]),
            DisasterRecoveryVswitchId = default1.Apply(getSwitchesResult => getSwitchesResult.Ids[0]),
        });
    
        var foo = new AliCloud.Vpn.IpsecServer("foo", new()
        {
            ClientIpPool = "10.0.0.0/24",
            IpsecServerName = name,
            LocalSubnet = "192.168.0.0/24",
            VpnGatewayId = defaultGateway.Id,
            PskEnabled = true,
        });
    
    });
    
    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.VpcFunctions;
    import com.pulumi.alicloud.vpc.inputs.GetNetworksArgs;
    import com.pulumi.alicloud.vpc.inputs.GetSwitchesArgs;
    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 config = ctx.config();
            final var name = config.get("name").orElse("terraform-example");
            final var default = AlicloudFunctions.getZones(GetZonesArgs.builder()
                .availableResourceCreation("VSwitch")
                .build());
    
            final var defaultGetNetworks = VpcFunctions.getNetworks(GetNetworksArgs.builder()
                .nameRegex("^default-NODELETING$")
                .cidrBlock("172.16.0.0/16")
                .build());
    
            final var default0 = VpcFunctions.getSwitches(GetSwitchesArgs.builder()
                .vpcId(defaultGetNetworks.applyValue(getNetworksResult -> getNetworksResult.ids()[0]))
                .zoneId(default_.ids()[0])
                .build());
    
            final var default1 = VpcFunctions.getSwitches(GetSwitchesArgs.builder()
                .vpcId(defaultGetNetworks.applyValue(getNetworksResult -> getNetworksResult.ids()[0]))
                .zoneId(default_.ids()[1])
                .build());
    
            var defaultGateway = new Gateway("defaultGateway", GatewayArgs.builder()
                .vpnGatewayName(name)
                .vpcId(defaultGetNetworks.applyValue(getNetworksResult -> getNetworksResult.ids()[0]))
                .bandwidth("10")
                .enableSsl(true)
                .description(name)
                .paymentType("Subscription")
                .vswitchId(default0.applyValue(getSwitchesResult -> getSwitchesResult.ids()[0]))
                .disasterRecoveryVswitchId(default1.applyValue(getSwitchesResult -> getSwitchesResult.ids()[0]))
                .build());
    
            var foo = new IpsecServer("foo", IpsecServerArgs.builder()
                .clientIpPool("10.0.0.0/24")
                .ipsecServerName(name)
                .localSubnet("192.168.0.0/24")
                .vpnGatewayId(defaultGateway.id())
                .pskEnabled(true)
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: terraform-example
    resources:
      defaultGateway:
        type: alicloud:vpn:Gateway
        name: default
        properties:
          vpnGatewayName: ${name}
          vpcId: ${defaultGetNetworks.ids[0]}
          bandwidth: '10'
          enableSsl: true
          description: ${name}
          paymentType: Subscription
          vswitchId: ${default0.ids[0]}
          disasterRecoveryVswitchId: ${default1.ids[0]}
      foo:
        type: alicloud:vpn:IpsecServer
        properties:
          clientIpPool: 10.0.0.0/24
          ipsecServerName: ${name}
          localSubnet: 192.168.0.0/24
          vpnGatewayId: ${defaultGateway.id}
          pskEnabled: true
    variables:
      default:
        fn::invoke:
          Function: alicloud:getZones
          Arguments:
            availableResourceCreation: VSwitch
      defaultGetNetworks:
        fn::invoke:
          Function: alicloud:vpc:getNetworks
          Arguments:
            nameRegex: ^default-NODELETING$
            cidrBlock: 172.16.0.0/16
      default0:
        fn::invoke:
          Function: alicloud:vpc:getSwitches
          Arguments:
            vpcId: ${defaultGetNetworks.ids[0]}
            zoneId: ${default.ids[0]}
      default1:
        fn::invoke:
          Function: alicloud:vpc:getSwitches
          Arguments:
            vpcId: ${defaultGetNetworks.ids[0]}
            zoneId: ${default.ids[1]}
    

    Create IpsecServer Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new IpsecServer(name: string, args: IpsecServerArgs, opts?: CustomResourceOptions);
    @overload
    def IpsecServer(resource_name: str,
                    args: IpsecServerArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def IpsecServer(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    client_ip_pool: Optional[str] = None,
                    local_subnet: Optional[str] = None,
                    vpn_gateway_id: Optional[str] = None,
                    dry_run: Optional[bool] = None,
                    effect_immediately: Optional[bool] = None,
                    ike_configs: Optional[Sequence[IpsecServerIkeConfigArgs]] = None,
                    ipsec_configs: Optional[Sequence[IpsecServerIpsecConfigArgs]] = None,
                    ipsec_server_name: Optional[str] = None,
                    psk: Optional[str] = None,
                    psk_enabled: Optional[bool] = None)
    func NewIpsecServer(ctx *Context, name string, args IpsecServerArgs, opts ...ResourceOption) (*IpsecServer, error)
    public IpsecServer(string name, IpsecServerArgs args, CustomResourceOptions? opts = null)
    public IpsecServer(String name, IpsecServerArgs args)
    public IpsecServer(String name, IpsecServerArgs args, CustomResourceOptions options)
    
    type: alicloud:vpn:IpsecServer
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args IpsecServerArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args IpsecServerArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args IpsecServerArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args IpsecServerArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args IpsecServerArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var ipsecServerResource = new AliCloud.Vpn.IpsecServer("ipsecServerResource", new()
    {
        ClientIpPool = "string",
        LocalSubnet = "string",
        VpnGatewayId = "string",
        DryRun = false,
        EffectImmediately = false,
        IkeConfigs = new[]
        {
            new AliCloud.Vpn.Inputs.IpsecServerIkeConfigArgs
            {
                IkeAuthAlg = "string",
                IkeEncAlg = "string",
                IkeLifetime = 0,
                IkeMode = "string",
                IkePfs = "string",
                IkeVersion = "string",
                LocalId = "string",
                RemoteId = "string",
            },
        },
        IpsecConfigs = new[]
        {
            new AliCloud.Vpn.Inputs.IpsecServerIpsecConfigArgs
            {
                IpsecAuthAlg = "string",
                IpsecEncAlg = "string",
                IpsecLifetime = 0,
                IpsecPfs = "string",
            },
        },
        IpsecServerName = "string",
        Psk = "string",
        PskEnabled = false,
    });
    
    example, err := vpn.NewIpsecServer(ctx, "ipsecServerResource", &vpn.IpsecServerArgs{
    	ClientIpPool:      pulumi.String("string"),
    	LocalSubnet:       pulumi.String("string"),
    	VpnGatewayId:      pulumi.String("string"),
    	DryRun:            pulumi.Bool(false),
    	EffectImmediately: pulumi.Bool(false),
    	IkeConfigs: vpn.IpsecServerIkeConfigArray{
    		&vpn.IpsecServerIkeConfigArgs{
    			IkeAuthAlg:  pulumi.String("string"),
    			IkeEncAlg:   pulumi.String("string"),
    			IkeLifetime: pulumi.Int(0),
    			IkeMode:     pulumi.String("string"),
    			IkePfs:      pulumi.String("string"),
    			IkeVersion:  pulumi.String("string"),
    			LocalId:     pulumi.String("string"),
    			RemoteId:    pulumi.String("string"),
    		},
    	},
    	IpsecConfigs: vpn.IpsecServerIpsecConfigArray{
    		&vpn.IpsecServerIpsecConfigArgs{
    			IpsecAuthAlg:  pulumi.String("string"),
    			IpsecEncAlg:   pulumi.String("string"),
    			IpsecLifetime: pulumi.Int(0),
    			IpsecPfs:      pulumi.String("string"),
    		},
    	},
    	IpsecServerName: pulumi.String("string"),
    	Psk:             pulumi.String("string"),
    	PskEnabled:      pulumi.Bool(false),
    })
    
    var ipsecServerResource = new IpsecServer("ipsecServerResource", IpsecServerArgs.builder()
        .clientIpPool("string")
        .localSubnet("string")
        .vpnGatewayId("string")
        .dryRun(false)
        .effectImmediately(false)
        .ikeConfigs(IpsecServerIkeConfigArgs.builder()
            .ikeAuthAlg("string")
            .ikeEncAlg("string")
            .ikeLifetime(0)
            .ikeMode("string")
            .ikePfs("string")
            .ikeVersion("string")
            .localId("string")
            .remoteId("string")
            .build())
        .ipsecConfigs(IpsecServerIpsecConfigArgs.builder()
            .ipsecAuthAlg("string")
            .ipsecEncAlg("string")
            .ipsecLifetime(0)
            .ipsecPfs("string")
            .build())
        .ipsecServerName("string")
        .psk("string")
        .pskEnabled(false)
        .build());
    
    ipsec_server_resource = alicloud.vpn.IpsecServer("ipsecServerResource",
        client_ip_pool="string",
        local_subnet="string",
        vpn_gateway_id="string",
        dry_run=False,
        effect_immediately=False,
        ike_configs=[alicloud.vpn.IpsecServerIkeConfigArgs(
            ike_auth_alg="string",
            ike_enc_alg="string",
            ike_lifetime=0,
            ike_mode="string",
            ike_pfs="string",
            ike_version="string",
            local_id="string",
            remote_id="string",
        )],
        ipsec_configs=[alicloud.vpn.IpsecServerIpsecConfigArgs(
            ipsec_auth_alg="string",
            ipsec_enc_alg="string",
            ipsec_lifetime=0,
            ipsec_pfs="string",
        )],
        ipsec_server_name="string",
        psk="string",
        psk_enabled=False)
    
    const ipsecServerResource = new alicloud.vpn.IpsecServer("ipsecServerResource", {
        clientIpPool: "string",
        localSubnet: "string",
        vpnGatewayId: "string",
        dryRun: false,
        effectImmediately: false,
        ikeConfigs: [{
            ikeAuthAlg: "string",
            ikeEncAlg: "string",
            ikeLifetime: 0,
            ikeMode: "string",
            ikePfs: "string",
            ikeVersion: "string",
            localId: "string",
            remoteId: "string",
        }],
        ipsecConfigs: [{
            ipsecAuthAlg: "string",
            ipsecEncAlg: "string",
            ipsecLifetime: 0,
            ipsecPfs: "string",
        }],
        ipsecServerName: "string",
        psk: "string",
        pskEnabled: false,
    });
    
    type: alicloud:vpn:IpsecServer
    properties:
        clientIpPool: string
        dryRun: false
        effectImmediately: false
        ikeConfigs:
            - ikeAuthAlg: string
              ikeEncAlg: string
              ikeLifetime: 0
              ikeMode: string
              ikePfs: string
              ikeVersion: string
              localId: string
              remoteId: string
        ipsecConfigs:
            - ipsecAuthAlg: string
              ipsecEncAlg: string
              ipsecLifetime: 0
              ipsecPfs: string
        ipsecServerName: string
        localSubnet: string
        psk: string
        pskEnabled: false
        vpnGatewayId: string
    

    IpsecServer Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The IpsecServer resource accepts the following input properties:

    ClientIpPool string
    The client CIDR block. It refers to the CIDR block that is allocated to the virtual interface of the client.
    LocalSubnet 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.
    VpnGatewayId string
    The ID of the VPN gateway.
    DryRun bool
    The dry run.
    EffectImmediately bool
    Specifies whether you want the configuration to immediately take effect.
    IkeConfigs List<Pulumi.AliCloud.Vpn.Inputs.IpsecServerIkeConfig>
    The configuration of Phase 1 negotiations. See ike_config below.
    IpsecConfigs List<Pulumi.AliCloud.Vpn.Inputs.IpsecServerIpsecConfig>
    The configuration of Phase 2 negotiations. See ipsec_config below.
    IpsecServerName 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.
    Psk 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.
    PskEnabled bool
    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.
    ClientIpPool string
    The client CIDR block. It refers to the CIDR block that is allocated to the virtual interface of the client.
    LocalSubnet 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.
    VpnGatewayId string
    The ID of the VPN gateway.
    DryRun bool
    The dry run.
    EffectImmediately bool
    Specifies whether you want the configuration to immediately take effect.
    IkeConfigs []IpsecServerIkeConfigArgs
    The configuration of Phase 1 negotiations. See ike_config below.
    IpsecConfigs []IpsecServerIpsecConfigArgs
    The configuration of Phase 2 negotiations. See ipsec_config below.
    IpsecServerName 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.
    Psk 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.
    PskEnabled bool
    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.
    clientIpPool String
    The client CIDR block. It refers to the CIDR block that is allocated to the virtual interface of the client.
    localSubnet 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.
    vpnGatewayId String
    The ID of the VPN gateway.
    dryRun Boolean
    The dry run.
    effectImmediately Boolean
    Specifies whether you want the configuration to immediately take effect.
    ikeConfigs List<IpsecServerIkeConfig>
    The configuration of Phase 1 negotiations. See ike_config below.
    ipsecConfigs List<IpsecServerIpsecConfig>
    The configuration of Phase 2 negotiations. See ipsec_config below.
    ipsecServerName 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.
    psk 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.
    pskEnabled 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.
    clientIpPool string
    The client CIDR block. It refers to the CIDR block that is allocated to the virtual interface of the client.
    localSubnet 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.
    vpnGatewayId string
    The ID of the VPN gateway.
    dryRun boolean
    The dry run.
    effectImmediately boolean
    Specifies whether you want the configuration to immediately take effect.
    ikeConfigs IpsecServerIkeConfig[]
    The configuration of Phase 1 negotiations. See ike_config below.
    ipsecConfigs IpsecServerIpsecConfig[]
    The configuration of Phase 2 negotiations. See ipsec_config below.
    ipsecServerName 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.
    psk 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.
    pskEnabled 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.
    client_ip_pool str
    The client CIDR block. It refers to the CIDR block that is allocated to the virtual interface of the client.
    local_subnet str
    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.
    vpn_gateway_id str
    The ID of the VPN gateway.
    dry_run bool
    The dry run.
    effect_immediately bool
    Specifies whether you want the configuration to immediately take effect.
    ike_configs Sequence[IpsecServerIkeConfigArgs]
    The configuration of Phase 1 negotiations. See ike_config below.
    ipsec_configs Sequence[IpsecServerIpsecConfigArgs]
    The configuration of Phase 2 negotiations. See ipsec_config below.
    ipsec_server_name str
    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.
    psk str
    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.
    psk_enabled bool
    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.
    clientIpPool String
    The client CIDR block. It refers to the CIDR block that is allocated to the virtual interface of the client.
    localSubnet 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.
    vpnGatewayId String
    The ID of the VPN gateway.
    dryRun Boolean
    The dry run.
    effectImmediately Boolean
    Specifies whether you want the configuration to immediately take effect.
    ikeConfigs List<Property Map>
    The configuration of Phase 1 negotiations. See ike_config below.
    ipsecConfigs List<Property Map>
    The configuration of Phase 2 negotiations. See ipsec_config below.
    ipsecServerName 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.
    psk 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.
    pskEnabled 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.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the IpsecServer resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing IpsecServer Resource

    Get an existing IpsecServer resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: IpsecServerState, opts?: CustomResourceOptions): IpsecServer
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            client_ip_pool: Optional[str] = None,
            dry_run: Optional[bool] = None,
            effect_immediately: Optional[bool] = None,
            ike_configs: Optional[Sequence[IpsecServerIkeConfigArgs]] = None,
            ipsec_configs: Optional[Sequence[IpsecServerIpsecConfigArgs]] = None,
            ipsec_server_name: Optional[str] = None,
            local_subnet: Optional[str] = None,
            psk: Optional[str] = None,
            psk_enabled: Optional[bool] = None,
            vpn_gateway_id: Optional[str] = None) -> IpsecServer
    func GetIpsecServer(ctx *Context, name string, id IDInput, state *IpsecServerState, opts ...ResourceOption) (*IpsecServer, error)
    public static IpsecServer Get(string name, Input<string> id, IpsecServerState? state, CustomResourceOptions? opts = null)
    public static IpsecServer get(String name, Output<String> id, IpsecServerState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    ClientIpPool string
    The client CIDR block. It refers to the CIDR block that is allocated to the virtual interface of the client.
    DryRun bool
    The dry run.
    EffectImmediately bool
    Specifies whether you want the configuration to immediately take effect.
    IkeConfigs List<Pulumi.AliCloud.Vpn.Inputs.IpsecServerIkeConfig>
    The configuration of Phase 1 negotiations. See ike_config below.
    IpsecConfigs List<Pulumi.AliCloud.Vpn.Inputs.IpsecServerIpsecConfig>
    The configuration of Phase 2 negotiations. See ipsec_config below.
    IpsecServerName 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.
    LocalSubnet 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.
    Psk 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.
    PskEnabled bool
    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.
    VpnGatewayId string
    The ID of the VPN gateway.
    ClientIpPool string
    The client CIDR block. It refers to the CIDR block that is allocated to the virtual interface of the client.
    DryRun bool
    The dry run.
    EffectImmediately bool
    Specifies whether you want the configuration to immediately take effect.
    IkeConfigs []IpsecServerIkeConfigArgs
    The configuration of Phase 1 negotiations. See ike_config below.
    IpsecConfigs []IpsecServerIpsecConfigArgs
    The configuration of Phase 2 negotiations. See ipsec_config below.
    IpsecServerName 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.
    LocalSubnet 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.
    Psk 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.
    PskEnabled bool
    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.
    VpnGatewayId string
    The ID of the VPN gateway.
    clientIpPool String
    The client CIDR block. It refers to the CIDR block that is allocated to the virtual interface of the client.
    dryRun Boolean
    The dry run.
    effectImmediately Boolean
    Specifies whether you want the configuration to immediately take effect.
    ikeConfigs List<IpsecServerIkeConfig>
    The configuration of Phase 1 negotiations. See ike_config below.
    ipsecConfigs List<IpsecServerIpsecConfig>
    The configuration of Phase 2 negotiations. See ipsec_config below.
    ipsecServerName 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.
    localSubnet 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.
    psk 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.
    pskEnabled 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.
    vpnGatewayId String
    The ID of the VPN gateway.
    clientIpPool string
    The client CIDR block. It refers to the CIDR block that is allocated to the virtual interface of the client.
    dryRun boolean
    The dry run.
    effectImmediately boolean
    Specifies whether you want the configuration to immediately take effect.
    ikeConfigs IpsecServerIkeConfig[]
    The configuration of Phase 1 negotiations. See ike_config below.
    ipsecConfigs IpsecServerIpsecConfig[]
    The configuration of Phase 2 negotiations. See ipsec_config below.
    ipsecServerName 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.
    localSubnet 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.
    psk 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.
    pskEnabled 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.
    vpnGatewayId string
    The ID of the VPN gateway.
    client_ip_pool str
    The client CIDR block. It refers to the CIDR block that is allocated to the virtual interface of the client.
    dry_run bool
    The dry run.
    effect_immediately bool
    Specifies whether you want the configuration to immediately take effect.
    ike_configs Sequence[IpsecServerIkeConfigArgs]
    The configuration of Phase 1 negotiations. See ike_config below.
    ipsec_configs Sequence[IpsecServerIpsecConfigArgs]
    The configuration of Phase 2 negotiations. See ipsec_config below.
    ipsec_server_name str
    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.
    local_subnet str
    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.
    psk str
    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.
    psk_enabled bool
    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.
    vpn_gateway_id str
    The ID of the VPN gateway.
    clientIpPool String
    The client CIDR block. It refers to the CIDR block that is allocated to the virtual interface of the client.
    dryRun Boolean
    The dry run.
    effectImmediately Boolean
    Specifies whether you want the configuration to immediately take effect.
    ikeConfigs List<Property Map>
    The configuration of Phase 1 negotiations. See ike_config below.
    ipsecConfigs List<Property Map>
    The configuration of Phase 2 negotiations. See ipsec_config below.
    ipsecServerName 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.
    localSubnet 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.
    psk 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.
    pskEnabled 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.
    vpnGatewayId String
    The ID of the VPN gateway.

    Supporting Types

    IpsecServerIkeConfig, IpsecServerIkeConfigArgs

    IkeAuthAlg string
    The authentication algorithm that is used in Phase 1 negotiations. Default value: sha1.
    IkeEncAlg string
    The encryption algorithm that is used in Phase 1 negotiations. Default value: aes.
    IkeLifetime int
    IkeLifetime: the SA lifetime determined by Phase 1 negotiations. Valid values: 0 to 86400. Default value: 86400. Unit: seconds.
    IkeMode string
    The IKE negotiation mode. Default value: main.
    IkePfs string
    The Diffie-Hellman key exchange algorithm that is used in Phase 1 negotiations. Default value: group2.
    IkeVersion string
    The IKE version. Valid values: ikev1 and ikev2. Default value: ikev2.
    LocalId string
    The identifier of the IPsec server. The value can be a fully qualified domain name (FQDN) or an IP address. The default value is the public IP address of the VPN gateway.
    RemoteId string
    The identifier of the customer gateway. The value can be an FQDN or an IP address. By default, this parameter is not specified.
    IkeAuthAlg string
    The authentication algorithm that is used in Phase 1 negotiations. Default value: sha1.
    IkeEncAlg string
    The encryption algorithm that is used in Phase 1 negotiations. Default value: aes.
    IkeLifetime int
    IkeLifetime: the SA lifetime determined by Phase 1 negotiations. Valid values: 0 to 86400. Default value: 86400. Unit: seconds.
    IkeMode string
    The IKE negotiation mode. Default value: main.
    IkePfs string
    The Diffie-Hellman key exchange algorithm that is used in Phase 1 negotiations. Default value: group2.
    IkeVersion string
    The IKE version. Valid values: ikev1 and ikev2. Default value: ikev2.
    LocalId string
    The identifier of the IPsec server. The value can be a fully qualified domain name (FQDN) or an IP address. The default value is the public IP address of the VPN gateway.
    RemoteId string
    The identifier of the customer gateway. The value can be an FQDN or an IP address. By default, this parameter is not specified.
    ikeAuthAlg String
    The authentication algorithm that is used in Phase 1 negotiations. Default value: sha1.
    ikeEncAlg String
    The encryption algorithm that is used in Phase 1 negotiations. Default value: aes.
    ikeLifetime Integer
    IkeLifetime: the SA lifetime determined by Phase 1 negotiations. Valid values: 0 to 86400. Default value: 86400. Unit: seconds.
    ikeMode String
    The IKE negotiation mode. Default value: main.
    ikePfs String
    The Diffie-Hellman key exchange algorithm that is used in Phase 1 negotiations. Default value: group2.
    ikeVersion String
    The IKE version. Valid values: ikev1 and ikev2. Default value: ikev2.
    localId String
    The identifier of the IPsec server. The value can be a fully qualified domain name (FQDN) or an IP address. The default value is the public IP address of the VPN gateway.
    remoteId String
    The identifier of the customer gateway. The value can be an FQDN or an IP address. By default, this parameter is not specified.
    ikeAuthAlg string
    The authentication algorithm that is used in Phase 1 negotiations. Default value: sha1.
    ikeEncAlg string
    The encryption algorithm that is used in Phase 1 negotiations. Default value: aes.
    ikeLifetime number
    IkeLifetime: the SA lifetime determined by Phase 1 negotiations. Valid values: 0 to 86400. Default value: 86400. Unit: seconds.
    ikeMode string
    The IKE negotiation mode. Default value: main.
    ikePfs string
    The Diffie-Hellman key exchange algorithm that is used in Phase 1 negotiations. Default value: group2.
    ikeVersion string
    The IKE version. Valid values: ikev1 and ikev2. Default value: ikev2.
    localId string
    The identifier of the IPsec server. The value can be a fully qualified domain name (FQDN) or an IP address. The default value is the public IP address of the VPN gateway.
    remoteId string
    The identifier of the customer gateway. The value can be an FQDN or an IP address. By default, this parameter is not specified.
    ike_auth_alg str
    The authentication algorithm that is used in Phase 1 negotiations. Default value: sha1.
    ike_enc_alg str
    The encryption algorithm that is used in Phase 1 negotiations. Default value: aes.
    ike_lifetime int
    IkeLifetime: the SA lifetime determined by Phase 1 negotiations. Valid values: 0 to 86400. Default value: 86400. Unit: seconds.
    ike_mode str
    The IKE negotiation mode. Default value: main.
    ike_pfs str
    The Diffie-Hellman key exchange algorithm that is used in Phase 1 negotiations. Default value: group2.
    ike_version str
    The IKE version. Valid values: ikev1 and ikev2. Default value: ikev2.
    local_id str
    The identifier of the IPsec server. The value can be a fully qualified domain name (FQDN) or an IP address. The default value is the public IP address of the VPN gateway.
    remote_id str
    The identifier of the customer gateway. The value can be an FQDN or an IP address. By default, this parameter is not specified.
    ikeAuthAlg String
    The authentication algorithm that is used in Phase 1 negotiations. Default value: sha1.
    ikeEncAlg String
    The encryption algorithm that is used in Phase 1 negotiations. Default value: aes.
    ikeLifetime Number
    IkeLifetime: the SA lifetime determined by Phase 1 negotiations. Valid values: 0 to 86400. Default value: 86400. Unit: seconds.
    ikeMode String
    The IKE negotiation mode. Default value: main.
    ikePfs String
    The Diffie-Hellman key exchange algorithm that is used in Phase 1 negotiations. Default value: group2.
    ikeVersion String
    The IKE version. Valid values: ikev1 and ikev2. Default value: ikev2.
    localId String
    The identifier of the IPsec server. The value can be a fully qualified domain name (FQDN) or an IP address. The default value is the public IP address of the VPN gateway.
    remoteId String
    The identifier of the customer gateway. The value can be an FQDN or an IP address. By default, this parameter is not specified.

    IpsecServerIpsecConfig, IpsecServerIpsecConfigArgs

    IpsecAuthAlg string
    The authentication algorithm that is used in Phase 2 negotiations. Default value: sha1.
    IpsecEncAlg string
    The encryption algorithm that is used in Phase 2 negotiations. Default value: aes.
    IpsecLifetime int
    The SA lifetime determined by Phase 2 negotiations. Valid values: 0 to 86400. Default value: 86400. Unit: seconds.
    IpsecPfs string
    Forwards packets of all protocols. The Diffie-Hellman key exchange algorithm used in Phase 2 negotiations. Default value: group2.
    IpsecAuthAlg string
    The authentication algorithm that is used in Phase 2 negotiations. Default value: sha1.
    IpsecEncAlg string
    The encryption algorithm that is used in Phase 2 negotiations. Default value: aes.
    IpsecLifetime int
    The SA lifetime determined by Phase 2 negotiations. Valid values: 0 to 86400. Default value: 86400. Unit: seconds.
    IpsecPfs string
    Forwards packets of all protocols. The Diffie-Hellman key exchange algorithm used in Phase 2 negotiations. Default value: group2.
    ipsecAuthAlg String
    The authentication algorithm that is used in Phase 2 negotiations. Default value: sha1.
    ipsecEncAlg String
    The encryption algorithm that is used in Phase 2 negotiations. Default value: aes.
    ipsecLifetime Integer
    The SA lifetime determined by Phase 2 negotiations. Valid values: 0 to 86400. Default value: 86400. Unit: seconds.
    ipsecPfs String
    Forwards packets of all protocols. The Diffie-Hellman key exchange algorithm used in Phase 2 negotiations. Default value: group2.
    ipsecAuthAlg string
    The authentication algorithm that is used in Phase 2 negotiations. Default value: sha1.
    ipsecEncAlg string
    The encryption algorithm that is used in Phase 2 negotiations. Default value: aes.
    ipsecLifetime number
    The SA lifetime determined by Phase 2 negotiations. Valid values: 0 to 86400. Default value: 86400. Unit: seconds.
    ipsecPfs string
    Forwards packets of all protocols. The Diffie-Hellman key exchange algorithm used in Phase 2 negotiations. Default value: group2.
    ipsec_auth_alg str
    The authentication algorithm that is used in Phase 2 negotiations. Default value: sha1.
    ipsec_enc_alg str
    The encryption algorithm that is used in Phase 2 negotiations. Default value: aes.
    ipsec_lifetime int
    The SA lifetime determined by Phase 2 negotiations. Valid values: 0 to 86400. Default value: 86400. Unit: seconds.
    ipsec_pfs str
    Forwards packets of all protocols. The Diffie-Hellman key exchange algorithm used in Phase 2 negotiations. Default value: group2.
    ipsecAuthAlg String
    The authentication algorithm that is used in Phase 2 negotiations. Default value: sha1.
    ipsecEncAlg String
    The encryption algorithm that is used in Phase 2 negotiations. Default value: aes.
    ipsecLifetime Number
    The SA lifetime determined by Phase 2 negotiations. Valid values: 0 to 86400. Default value: 86400. Unit: seconds.
    ipsecPfs String
    Forwards packets of all protocols. The Diffie-Hellman key exchange algorithm used in Phase 2 negotiations. Default value: group2.

    Import

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

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

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi