ionoscloud.vpn.IpsecGateway
Explore with Pulumi AI
An IPSec Gateway resource manages the creation, management, and deletion of VPN IPSec Gateways within the IONOS Cloud infrastructure. This resource facilitates the creation of VPN IPSec Gateways, enabling secure connections between your network resources.
Usage example
import * as pulumi from "@pulumi/pulumi";
import * as ionoscloud from "@ionos-cloud/sdk-pulumi";
// Basic example
const testDatacenter = new ionoscloud.compute.Datacenter("test_datacenter", {
name: "test_vpn_gateway_basic",
location: "de/fra",
});
const testLan = new ionoscloud.compute.Lan("test_lan", {
name: "test_lan_basic",
"public": false,
datacenterId: testDatacenter.id,
});
const testIpblock = new ionoscloud.compute.IPBlock("test_ipblock", {
name: "test_ipblock_basic",
location: "de/fra",
size: 1,
});
const example = new ionoscloud.vpn.IpsecGateway("example", {
name: "ipsec_gateway_basic",
location: "de/fra",
gatewayIp: testIpblock.ips[0],
version: "IKEv2",
description: "This gateway connects site A to VDC X.",
connections: [{
datacenterId: testDatacenter.id,
lanId: testLan.id,
ipv4Cidr: "192.168.100.10/24",
}],
});
import pulumi
import pulumi_ionoscloud as ionoscloud
# Basic example
test_datacenter = ionoscloud.compute.Datacenter("test_datacenter",
name="test_vpn_gateway_basic",
location="de/fra")
test_lan = ionoscloud.compute.Lan("test_lan",
name="test_lan_basic",
public=False,
datacenter_id=test_datacenter.id)
test_ipblock = ionoscloud.compute.IPBlock("test_ipblock",
name="test_ipblock_basic",
location="de/fra",
size=1)
example = ionoscloud.vpn.IpsecGateway("example",
name="ipsec_gateway_basic",
location="de/fra",
gateway_ip=test_ipblock.ips[0],
version="IKEv2",
description="This gateway connects site A to VDC X.",
connections=[{
"datacenter_id": test_datacenter.id,
"lan_id": test_lan.id,
"ipv4_cidr": "192.168.100.10/24",
}])
package main
import (
"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/compute"
"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/vpn"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Basic example
testDatacenter, err := compute.NewDatacenter(ctx, "test_datacenter", &compute.DatacenterArgs{
Name: pulumi.String("test_vpn_gateway_basic"),
Location: pulumi.String("de/fra"),
})
if err != nil {
return err
}
testLan, err := compute.NewLan(ctx, "test_lan", &compute.LanArgs{
Name: pulumi.String("test_lan_basic"),
Public: pulumi.Bool(false),
DatacenterId: testDatacenter.ID(),
})
if err != nil {
return err
}
testIpblock, err := compute.NewIPBlock(ctx, "test_ipblock", &compute.IPBlockArgs{
Name: pulumi.String("test_ipblock_basic"),
Location: pulumi.String("de/fra"),
Size: pulumi.Int(1),
})
if err != nil {
return err
}
_, err = vpn.NewIpsecGateway(ctx, "example", &vpn.IpsecGatewayArgs{
Name: pulumi.String("ipsec_gateway_basic"),
Location: pulumi.String("de/fra"),
GatewayIp: testIpblock.Ips.ApplyT(func(ips []string) (string, error) {
return ips[0], nil
}).(pulumi.StringOutput),
Version: pulumi.String("IKEv2"),
Description: pulumi.String("This gateway connects site A to VDC X."),
Connections: vpn.IpsecGatewayConnectionArray{
&vpn.IpsecGatewayConnectionArgs{
DatacenterId: testDatacenter.ID(),
LanId: testLan.ID(),
Ipv4Cidr: pulumi.String("192.168.100.10/24"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ionoscloud = Ionoscloud.Pulumi.Ionoscloud;
return await Deployment.RunAsync(() =>
{
// Basic example
var testDatacenter = new Ionoscloud.Compute.Datacenter("test_datacenter", new()
{
Name = "test_vpn_gateway_basic",
Location = "de/fra",
});
var testLan = new Ionoscloud.Compute.Lan("test_lan", new()
{
Name = "test_lan_basic",
Public = false,
DatacenterId = testDatacenter.Id,
});
var testIpblock = new Ionoscloud.Compute.IPBlock("test_ipblock", new()
{
Name = "test_ipblock_basic",
Location = "de/fra",
Size = 1,
});
var example = new Ionoscloud.Vpn.IpsecGateway("example", new()
{
Name = "ipsec_gateway_basic",
Location = "de/fra",
GatewayIp = testIpblock.Ips.Apply(ips => ips[0]),
Version = "IKEv2",
Description = "This gateway connects site A to VDC X.",
Connections = new[]
{
new Ionoscloud.Vpn.Inputs.IpsecGatewayConnectionArgs
{
DatacenterId = testDatacenter.Id,
LanId = testLan.Id,
Ipv4Cidr = "192.168.100.10/24",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ionoscloud.compute.Datacenter;
import com.pulumi.ionoscloud.compute.DatacenterArgs;
import com.pulumi.ionoscloud.compute.Lan;
import com.pulumi.ionoscloud.compute.LanArgs;
import com.pulumi.ionoscloud.compute.IPBlock;
import com.pulumi.ionoscloud.compute.IPBlockArgs;
import com.pulumi.ionoscloud.vpn.IpsecGateway;
import com.pulumi.ionoscloud.vpn.IpsecGatewayArgs;
import com.pulumi.ionoscloud.vpn.inputs.IpsecGatewayConnectionArgs;
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) {
// Basic example
var testDatacenter = new Datacenter("testDatacenter", DatacenterArgs.builder()
.name("test_vpn_gateway_basic")
.location("de/fra")
.build());
var testLan = new Lan("testLan", LanArgs.builder()
.name("test_lan_basic")
.public_(false)
.datacenterId(testDatacenter.id())
.build());
var testIpblock = new IPBlock("testIpblock", IPBlockArgs.builder()
.name("test_ipblock_basic")
.location("de/fra")
.size(1)
.build());
var example = new IpsecGateway("example", IpsecGatewayArgs.builder()
.name("ipsec_gateway_basic")
.location("de/fra")
.gatewayIp(testIpblock.ips().applyValue(ips -> ips[0]))
.version("IKEv2")
.description("This gateway connects site A to VDC X.")
.connections(IpsecGatewayConnectionArgs.builder()
.datacenterId(testDatacenter.id())
.lanId(testLan.id())
.ipv4Cidr("192.168.100.10/24")
.build())
.build());
}
}
resources:
# Basic example
testDatacenter:
type: ionoscloud:compute:Datacenter
name: test_datacenter
properties:
name: test_vpn_gateway_basic
location: de/fra
testLan:
type: ionoscloud:compute:Lan
name: test_lan
properties:
name: test_lan_basic
public: false
datacenterId: ${testDatacenter.id}
testIpblock:
type: ionoscloud:compute:IPBlock
name: test_ipblock
properties:
name: test_ipblock_basic
location: de/fra
size: 1
example:
type: ionoscloud:vpn:IpsecGateway
properties:
name: ipsec_gateway_basic
location: de/fra
gatewayIp: ${testIpblock.ips[0]}
version: IKEv2
description: This gateway connects site A to VDC X.
connections:
- datacenterId: ${testDatacenter.id}
lanId: ${testLan.id}
ipv4Cidr: 192.168.100.10/24
import * as pulumi from "@pulumi/pulumi";
import * as ionoscloud from "@ionos-cloud/sdk-pulumi";
import * as random from "@pulumi/random";
// Complete example
const testDatacenter = new ionoscloud.compute.Datacenter("test_datacenter", {
name: "vpn_gateway_test",
location: "de/fra",
});
const testLan = new ionoscloud.compute.Lan("test_lan", {
name: "test_lan",
"public": false,
datacenterId: testDatacenter.id,
ipv6CidrBlock: lanIpv6CidrBlock,
});
const testIpblock = new ionoscloud.compute.IPBlock("test_ipblock", {
name: "test_ipblock",
location: "de/fra",
size: 1,
});
const serverImagePassword = new random.index.Password("server_image_password", {
length: 16,
special: false,
});
const testServer = new ionoscloud.compute.Server("test_server", {
name: "test_server",
datacenterId: testDatacenter.id,
cores: 1,
ram: 2048,
imageName: "ubuntu:latest",
imagePassword: serverImagePassword.result,
nic: {
lan: testLan.id,
name: "test_nic",
dhcp: true,
dhcpv6: false,
ipv6CidrBlock: ipv6CidrBlock,
firewallActive: false,
},
volume: {
name: "test_volume",
diskType: "HDD",
size: 10,
licenceType: "OTHER",
},
});
const example = new ionoscloud.vpn.IpsecGateway("example", {
name: "ipsec-gateway",
location: "de/fra",
gatewayIp: testIpblock.ips[0],
version: "IKEv2",
description: "This gateway connects site A to VDC X.",
connections: [{
datacenterId: testDatacenter.id,
lanId: testLan.id,
ipv4Cidr: "ipv4_cidr_block_from_nic",
ipv6Cidr: "ipv6_cidr_block_from_dc",
}],
maintenanceWindow: {
dayOfTheWeek: "Monday",
time: "09:00:00",
},
tier: "STANDARD",
});
import pulumi
import pulumi_ionoscloud as ionoscloud
import pulumi_random as random
# Complete example
test_datacenter = ionoscloud.compute.Datacenter("test_datacenter",
name="vpn_gateway_test",
location="de/fra")
test_lan = ionoscloud.compute.Lan("test_lan",
name="test_lan",
public=False,
datacenter_id=test_datacenter.id,
ipv6_cidr_block=lan_ipv6_cidr_block)
test_ipblock = ionoscloud.compute.IPBlock("test_ipblock",
name="test_ipblock",
location="de/fra",
size=1)
server_image_password = random.index.Password("server_image_password",
length=16,
special=False)
test_server = ionoscloud.compute.Server("test_server",
name="test_server",
datacenter_id=test_datacenter.id,
cores=1,
ram=2048,
image_name="ubuntu:latest",
image_password=server_image_password["result"],
nic={
"lan": test_lan.id,
"name": "test_nic",
"dhcp": True,
"dhcpv6": False,
"ipv6_cidr_block": ipv6_cidr_block,
"firewall_active": False,
},
volume={
"name": "test_volume",
"disk_type": "HDD",
"size": 10,
"licence_type": "OTHER",
})
example = ionoscloud.vpn.IpsecGateway("example",
name="ipsec-gateway",
location="de/fra",
gateway_ip=test_ipblock.ips[0],
version="IKEv2",
description="This gateway connects site A to VDC X.",
connections=[{
"datacenter_id": test_datacenter.id,
"lan_id": test_lan.id,
"ipv4_cidr": "ipv4_cidr_block_from_nic",
"ipv6_cidr": "ipv6_cidr_block_from_dc",
}],
maintenance_window={
"day_of_the_week": "Monday",
"time": "09:00:00",
},
tier="STANDARD")
package main
import (
"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/compute"
"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/vpn"
"github.com/pulumi/pulumi-random/sdk/go/random"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Complete example
testDatacenter, err := compute.NewDatacenter(ctx, "test_datacenter", &compute.DatacenterArgs{
Name: pulumi.String("vpn_gateway_test"),
Location: pulumi.String("de/fra"),
})
if err != nil {
return err
}
testLan, err := compute.NewLan(ctx, "test_lan", &compute.LanArgs{
Name: pulumi.String("test_lan"),
Public: pulumi.Bool(false),
DatacenterId: testDatacenter.ID(),
Ipv6CidrBlock: pulumi.Any(lanIpv6CidrBlock),
})
if err != nil {
return err
}
testIpblock, err := compute.NewIPBlock(ctx, "test_ipblock", &compute.IPBlockArgs{
Name: pulumi.String("test_ipblock"),
Location: pulumi.String("de/fra"),
Size: pulumi.Int(1),
})
if err != nil {
return err
}
serverImagePassword, err := random.NewPassword(ctx, "server_image_password", &random.PasswordArgs{
Length: 16,
Special: false,
})
if err != nil {
return err
}
_, err = compute.NewServer(ctx, "test_server", &compute.ServerArgs{
Name: pulumi.String("test_server"),
DatacenterId: testDatacenter.ID(),
Cores: pulumi.Int(1),
Ram: pulumi.Int(2048),
ImageName: pulumi.String("ubuntu:latest"),
ImagePassword: serverImagePassword.Result,
Nic: &compute.ServerNicArgs{
Lan: testLan.ID(),
Name: pulumi.String("test_nic"),
Dhcp: pulumi.Bool(true),
Dhcpv6: pulumi.Bool(false),
Ipv6CidrBlock: pulumi.Any(ipv6CidrBlock),
FirewallActive: pulumi.Bool(false),
},
Volume: &compute.ServerVolumeArgs{
Name: pulumi.String("test_volume"),
DiskType: pulumi.String("HDD"),
Size: pulumi.Int(10),
LicenceType: pulumi.String("OTHER"),
},
})
if err != nil {
return err
}
_, err = vpn.NewIpsecGateway(ctx, "example", &vpn.IpsecGatewayArgs{
Name: pulumi.String("ipsec-gateway"),
Location: pulumi.String("de/fra"),
GatewayIp: testIpblock.Ips.ApplyT(func(ips []string) (string, error) {
return ips[0], nil
}).(pulumi.StringOutput),
Version: pulumi.String("IKEv2"),
Description: pulumi.String("This gateway connects site A to VDC X."),
Connections: vpn.IpsecGatewayConnectionArray{
&vpn.IpsecGatewayConnectionArgs{
DatacenterId: testDatacenter.ID(),
LanId: testLan.ID(),
Ipv4Cidr: pulumi.String("ipv4_cidr_block_from_nic"),
Ipv6Cidr: pulumi.String("ipv6_cidr_block_from_dc"),
},
},
MaintenanceWindow: &vpn.IpsecGatewayMaintenanceWindowArgs{
DayOfTheWeek: pulumi.String("Monday"),
Time: pulumi.String("09:00:00"),
},
Tier: pulumi.String("STANDARD"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ionoscloud = Ionoscloud.Pulumi.Ionoscloud;
using Random = Pulumi.Random;
return await Deployment.RunAsync(() =>
{
// Complete example
var testDatacenter = new Ionoscloud.Compute.Datacenter("test_datacenter", new()
{
Name = "vpn_gateway_test",
Location = "de/fra",
});
var testLan = new Ionoscloud.Compute.Lan("test_lan", new()
{
Name = "test_lan",
Public = false,
DatacenterId = testDatacenter.Id,
Ipv6CidrBlock = lanIpv6CidrBlock,
});
var testIpblock = new Ionoscloud.Compute.IPBlock("test_ipblock", new()
{
Name = "test_ipblock",
Location = "de/fra",
Size = 1,
});
var serverImagePassword = new Random.Index.Password("server_image_password", new()
{
Length = 16,
Special = false,
});
var testServer = new Ionoscloud.Compute.Server("test_server", new()
{
Name = "test_server",
DatacenterId = testDatacenter.Id,
Cores = 1,
Ram = 2048,
ImageName = "ubuntu:latest",
ImagePassword = serverImagePassword.Result,
Nic = new Ionoscloud.Compute.Inputs.ServerNicArgs
{
Lan = testLan.Id,
Name = "test_nic",
Dhcp = true,
Dhcpv6 = false,
Ipv6CidrBlock = ipv6CidrBlock,
FirewallActive = false,
},
Volume = new Ionoscloud.Compute.Inputs.ServerVolumeArgs
{
Name = "test_volume",
DiskType = "HDD",
Size = 10,
LicenceType = "OTHER",
},
});
var example = new Ionoscloud.Vpn.IpsecGateway("example", new()
{
Name = "ipsec-gateway",
Location = "de/fra",
GatewayIp = testIpblock.Ips.Apply(ips => ips[0]),
Version = "IKEv2",
Description = "This gateway connects site A to VDC X.",
Connections = new[]
{
new Ionoscloud.Vpn.Inputs.IpsecGatewayConnectionArgs
{
DatacenterId = testDatacenter.Id,
LanId = testLan.Id,
Ipv4Cidr = "ipv4_cidr_block_from_nic",
Ipv6Cidr = "ipv6_cidr_block_from_dc",
},
},
MaintenanceWindow = new Ionoscloud.Vpn.Inputs.IpsecGatewayMaintenanceWindowArgs
{
DayOfTheWeek = "Monday",
Time = "09:00:00",
},
Tier = "STANDARD",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ionoscloud.compute.Datacenter;
import com.pulumi.ionoscloud.compute.DatacenterArgs;
import com.pulumi.ionoscloud.compute.Lan;
import com.pulumi.ionoscloud.compute.LanArgs;
import com.pulumi.ionoscloud.compute.IPBlock;
import com.pulumi.ionoscloud.compute.IPBlockArgs;
import com.pulumi.random.password;
import com.pulumi.random.PasswordArgs;
import com.pulumi.ionoscloud.compute.Server;
import com.pulumi.ionoscloud.compute.ServerArgs;
import com.pulumi.ionoscloud.compute.inputs.ServerNicArgs;
import com.pulumi.ionoscloud.compute.inputs.ServerVolumeArgs;
import com.pulumi.ionoscloud.vpn.IpsecGateway;
import com.pulumi.ionoscloud.vpn.IpsecGatewayArgs;
import com.pulumi.ionoscloud.vpn.inputs.IpsecGatewayConnectionArgs;
import com.pulumi.ionoscloud.vpn.inputs.IpsecGatewayMaintenanceWindowArgs;
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) {
// Complete example
var testDatacenter = new Datacenter("testDatacenter", DatacenterArgs.builder()
.name("vpn_gateway_test")
.location("de/fra")
.build());
var testLan = new Lan("testLan", LanArgs.builder()
.name("test_lan")
.public_(false)
.datacenterId(testDatacenter.id())
.ipv6CidrBlock(lanIpv6CidrBlock)
.build());
var testIpblock = new IPBlock("testIpblock", IPBlockArgs.builder()
.name("test_ipblock")
.location("de/fra")
.size(1)
.build());
var serverImagePassword = new Password("serverImagePassword", PasswordArgs.builder()
.length(16)
.special(false)
.build());
var testServer = new Server("testServer", ServerArgs.builder()
.name("test_server")
.datacenterId(testDatacenter.id())
.cores(1)
.ram(2048)
.imageName("ubuntu:latest")
.imagePassword(serverImagePassword.result())
.nic(ServerNicArgs.builder()
.lan(testLan.id())
.name("test_nic")
.dhcp(true)
.dhcpv6(false)
.ipv6CidrBlock(ipv6CidrBlock)
.firewallActive(false)
.build())
.volume(ServerVolumeArgs.builder()
.name("test_volume")
.diskType("HDD")
.size(10)
.licenceType("OTHER")
.build())
.build());
var example = new IpsecGateway("example", IpsecGatewayArgs.builder()
.name("ipsec-gateway")
.location("de/fra")
.gatewayIp(testIpblock.ips().applyValue(ips -> ips[0]))
.version("IKEv2")
.description("This gateway connects site A to VDC X.")
.connections(IpsecGatewayConnectionArgs.builder()
.datacenterId(testDatacenter.id())
.lanId(testLan.id())
.ipv4Cidr("ipv4_cidr_block_from_nic")
.ipv6Cidr("ipv6_cidr_block_from_dc")
.build())
.maintenanceWindow(IpsecGatewayMaintenanceWindowArgs.builder()
.dayOfTheWeek("Monday")
.time("09:00:00")
.build())
.tier("STANDARD")
.build());
}
}
resources:
# Complete example
testDatacenter:
type: ionoscloud:compute:Datacenter
name: test_datacenter
properties:
name: vpn_gateway_test
location: de/fra
testLan:
type: ionoscloud:compute:Lan
name: test_lan
properties:
name: test_lan
public: false
datacenterId: ${testDatacenter.id}
ipv6CidrBlock: ${lanIpv6CidrBlock}
testIpblock:
type: ionoscloud:compute:IPBlock
name: test_ipblock
properties:
name: test_ipblock
location: de/fra
size: 1
testServer:
type: ionoscloud:compute:Server
name: test_server
properties:
name: test_server
datacenterId: ${testDatacenter.id}
cores: 1
ram: 2048
imageName: ubuntu:latest
imagePassword: ${serverImagePassword.result}
nic:
lan: ${testLan.id}
name: test_nic
dhcp: true
dhcpv6: false
ipv6CidrBlock: ${ipv6CidrBlock}
firewallActive: false
volume:
name: test_volume
diskType: HDD
size: 10
licenceType: OTHER
serverImagePassword:
type: random:password
name: server_image_password
properties:
length: 16
special: false
example:
type: ionoscloud:vpn:IpsecGateway
properties:
name: ipsec-gateway
location: de/fra
gatewayIp: ${testIpblock.ips[0]}
version: IKEv2
description: This gateway connects site A to VDC X.
connections:
- datacenterId: ${testDatacenter.id}
lanId: ${testLan.id}
ipv4Cidr: ipv4_cidr_block_from_nic
ipv6Cidr: ipv6_cidr_block_from_dc
maintenanceWindow:
dayOfTheWeek: Monday
time: 09:00:00
tier: STANDARD
Create IpsecGateway Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new IpsecGateway(name: string, args: IpsecGatewayArgs, opts?: CustomResourceOptions);
@overload
def IpsecGateway(resource_name: str,
args: IpsecGatewayArgs,
opts: Optional[ResourceOptions] = None)
@overload
def IpsecGateway(resource_name: str,
opts: Optional[ResourceOptions] = None,
connections: Optional[Sequence[IpsecGatewayConnectionArgs]] = None,
gateway_ip: Optional[str] = None,
description: Optional[str] = None,
location: Optional[str] = None,
maintenance_window: Optional[IpsecGatewayMaintenanceWindowArgs] = None,
name: Optional[str] = None,
tier: Optional[str] = None,
version: Optional[str] = None)
func NewIpsecGateway(ctx *Context, name string, args IpsecGatewayArgs, opts ...ResourceOption) (*IpsecGateway, error)
public IpsecGateway(string name, IpsecGatewayArgs args, CustomResourceOptions? opts = null)
public IpsecGateway(String name, IpsecGatewayArgs args)
public IpsecGateway(String name, IpsecGatewayArgs args, CustomResourceOptions options)
type: ionoscloud:vpn:IpsecGateway
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 IpsecGatewayArgs
- 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 IpsecGatewayArgs
- 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 IpsecGatewayArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args IpsecGatewayArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args IpsecGatewayArgs
- 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 ipsecGatewayResource = new Ionoscloud.Vpn.IpsecGateway("ipsecGatewayResource", new()
{
Connections = new[]
{
new Ionoscloud.Vpn.Inputs.IpsecGatewayConnectionArgs
{
DatacenterId = "string",
Ipv4Cidr = "string",
LanId = "string",
Ipv6Cidr = "string",
},
},
GatewayIp = "string",
Description = "string",
Location = "string",
MaintenanceWindow = new Ionoscloud.Vpn.Inputs.IpsecGatewayMaintenanceWindowArgs
{
DayOfTheWeek = "string",
Time = "string",
},
Name = "string",
Tier = "string",
Version = "string",
});
example, err := vpn.NewIpsecGateway(ctx, "ipsecGatewayResource", &vpn.IpsecGatewayArgs{
Connections: vpn.IpsecGatewayConnectionArray{
&vpn.IpsecGatewayConnectionArgs{
DatacenterId: pulumi.String("string"),
Ipv4Cidr: pulumi.String("string"),
LanId: pulumi.String("string"),
Ipv6Cidr: pulumi.String("string"),
},
},
GatewayIp: pulumi.String("string"),
Description: pulumi.String("string"),
Location: pulumi.String("string"),
MaintenanceWindow: &vpn.IpsecGatewayMaintenanceWindowArgs{
DayOfTheWeek: pulumi.String("string"),
Time: pulumi.String("string"),
},
Name: pulumi.String("string"),
Tier: pulumi.String("string"),
Version: pulumi.String("string"),
})
var ipsecGatewayResource = new IpsecGateway("ipsecGatewayResource", IpsecGatewayArgs.builder()
.connections(IpsecGatewayConnectionArgs.builder()
.datacenterId("string")
.ipv4Cidr("string")
.lanId("string")
.ipv6Cidr("string")
.build())
.gatewayIp("string")
.description("string")
.location("string")
.maintenanceWindow(IpsecGatewayMaintenanceWindowArgs.builder()
.dayOfTheWeek("string")
.time("string")
.build())
.name("string")
.tier("string")
.version("string")
.build());
ipsec_gateway_resource = ionoscloud.vpn.IpsecGateway("ipsecGatewayResource",
connections=[{
"datacenter_id": "string",
"ipv4_cidr": "string",
"lan_id": "string",
"ipv6_cidr": "string",
}],
gateway_ip="string",
description="string",
location="string",
maintenance_window={
"day_of_the_week": "string",
"time": "string",
},
name="string",
tier="string",
version="string")
const ipsecGatewayResource = new ionoscloud.vpn.IpsecGateway("ipsecGatewayResource", {
connections: [{
datacenterId: "string",
ipv4Cidr: "string",
lanId: "string",
ipv6Cidr: "string",
}],
gatewayIp: "string",
description: "string",
location: "string",
maintenanceWindow: {
dayOfTheWeek: "string",
time: "string",
},
name: "string",
tier: "string",
version: "string",
});
type: ionoscloud:vpn:IpsecGateway
properties:
connections:
- datacenterId: string
ipv4Cidr: string
ipv6Cidr: string
lanId: string
description: string
gatewayIp: string
location: string
maintenanceWindow:
dayOfTheWeek: string
time: string
name: string
tier: string
version: string
IpsecGateway Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The IpsecGateway resource accepts the following input properties:
- Connections
List<Ionoscloud.
Ipsec Gateway Connection> - [list] The network connection for your gateway. Note: all connections must belong to the same datacenter. Minimum items: 1. Maximum items: 10.
- Gateway
Ip string - [string] Public IP address to be assigned to the gateway. Note: This must be an IP address in the same datacenter as the connections.
- Description string
- [string] The human-readable description of the IPSec Gateway.
- Location string
- [string] The location of the IPSec Gateway. Supported locations: de/fra, de/txl, es/vit, gb/bhx, gb/lhr, us/ewr, us/las, us/mci, fr/par.
- Maintenance
Window Ionoscloud.Ipsec Gateway Maintenance Window - (Computed) A weekly 4 hour-long window, during which maintenance might occur.
- Name string
- [string] The name of the IPSec Gateway.
- Tier string
- (Computed)[string] Gateway performance options. See product documentation for full details. Options: STANDARD, STANDARD_HA, ENHANCED, ENHANCED_HA, PREMIUM, PREMIUM_HA.
- Version string
- [string] The IKE version that is permitted for the VPN tunnels. Default:
IKEv2
. Possible values:IKEv2
.
- Connections
[]Ipsec
Gateway Connection Args - [list] The network connection for your gateway. Note: all connections must belong to the same datacenter. Minimum items: 1. Maximum items: 10.
- Gateway
Ip string - [string] Public IP address to be assigned to the gateway. Note: This must be an IP address in the same datacenter as the connections.
- Description string
- [string] The human-readable description of the IPSec Gateway.
- Location string
- [string] The location of the IPSec Gateway. Supported locations: de/fra, de/txl, es/vit, gb/bhx, gb/lhr, us/ewr, us/las, us/mci, fr/par.
- Maintenance
Window IpsecGateway Maintenance Window Args - (Computed) A weekly 4 hour-long window, during which maintenance might occur.
- Name string
- [string] The name of the IPSec Gateway.
- Tier string
- (Computed)[string] Gateway performance options. See product documentation for full details. Options: STANDARD, STANDARD_HA, ENHANCED, ENHANCED_HA, PREMIUM, PREMIUM_HA.
- Version string
- [string] The IKE version that is permitted for the VPN tunnels. Default:
IKEv2
. Possible values:IKEv2
.
- connections
List<Ipsec
Gateway Connection> - [list] The network connection for your gateway. Note: all connections must belong to the same datacenter. Minimum items: 1. Maximum items: 10.
- gateway
Ip String - [string] Public IP address to be assigned to the gateway. Note: This must be an IP address in the same datacenter as the connections.
- description String
- [string] The human-readable description of the IPSec Gateway.
- location String
- [string] The location of the IPSec Gateway. Supported locations: de/fra, de/txl, es/vit, gb/bhx, gb/lhr, us/ewr, us/las, us/mci, fr/par.
- maintenance
Window IpsecGateway Maintenance Window - (Computed) A weekly 4 hour-long window, during which maintenance might occur.
- name String
- [string] The name of the IPSec Gateway.
- tier String
- (Computed)[string] Gateway performance options. See product documentation for full details. Options: STANDARD, STANDARD_HA, ENHANCED, ENHANCED_HA, PREMIUM, PREMIUM_HA.
- version String
- [string] The IKE version that is permitted for the VPN tunnels. Default:
IKEv2
. Possible values:IKEv2
.
- connections
Ipsec
Gateway Connection[] - [list] The network connection for your gateway. Note: all connections must belong to the same datacenter. Minimum items: 1. Maximum items: 10.
- gateway
Ip string - [string] Public IP address to be assigned to the gateway. Note: This must be an IP address in the same datacenter as the connections.
- description string
- [string] The human-readable description of the IPSec Gateway.
- location string
- [string] The location of the IPSec Gateway. Supported locations: de/fra, de/txl, es/vit, gb/bhx, gb/lhr, us/ewr, us/las, us/mci, fr/par.
- maintenance
Window IpsecGateway Maintenance Window - (Computed) A weekly 4 hour-long window, during which maintenance might occur.
- name string
- [string] The name of the IPSec Gateway.
- tier string
- (Computed)[string] Gateway performance options. See product documentation for full details. Options: STANDARD, STANDARD_HA, ENHANCED, ENHANCED_HA, PREMIUM, PREMIUM_HA.
- version string
- [string] The IKE version that is permitted for the VPN tunnels. Default:
IKEv2
. Possible values:IKEv2
.
- connections
Sequence[Ipsec
Gateway Connection Args] - [list] The network connection for your gateway. Note: all connections must belong to the same datacenter. Minimum items: 1. Maximum items: 10.
- gateway_
ip str - [string] Public IP address to be assigned to the gateway. Note: This must be an IP address in the same datacenter as the connections.
- description str
- [string] The human-readable description of the IPSec Gateway.
- location str
- [string] The location of the IPSec Gateway. Supported locations: de/fra, de/txl, es/vit, gb/bhx, gb/lhr, us/ewr, us/las, us/mci, fr/par.
- maintenance_
window IpsecGateway Maintenance Window Args - (Computed) A weekly 4 hour-long window, during which maintenance might occur.
- name str
- [string] The name of the IPSec Gateway.
- tier str
- (Computed)[string] Gateway performance options. See product documentation for full details. Options: STANDARD, STANDARD_HA, ENHANCED, ENHANCED_HA, PREMIUM, PREMIUM_HA.
- version str
- [string] The IKE version that is permitted for the VPN tunnels. Default:
IKEv2
. Possible values:IKEv2
.
- connections List<Property Map>
- [list] The network connection for your gateway. Note: all connections must belong to the same datacenter. Minimum items: 1. Maximum items: 10.
- gateway
Ip String - [string] Public IP address to be assigned to the gateway. Note: This must be an IP address in the same datacenter as the connections.
- description String
- [string] The human-readable description of the IPSec Gateway.
- location String
- [string] The location of the IPSec Gateway. Supported locations: de/fra, de/txl, es/vit, gb/bhx, gb/lhr, us/ewr, us/las, us/mci, fr/par.
- maintenance
Window Property Map - (Computed) A weekly 4 hour-long window, during which maintenance might occur.
- name String
- [string] The name of the IPSec Gateway.
- tier String
- (Computed)[string] Gateway performance options. See product documentation for full details. Options: STANDARD, STANDARD_HA, ENHANCED, ENHANCED_HA, PREMIUM, PREMIUM_HA.
- version String
- [string] The IKE version that is permitted for the VPN tunnels. Default:
IKEv2
. Possible values:IKEv2
.
Outputs
All input properties are implicitly available as output properties. Additionally, the IpsecGateway 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 IpsecGateway Resource
Get an existing IpsecGateway 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?: IpsecGatewayState, opts?: CustomResourceOptions): IpsecGateway
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
connections: Optional[Sequence[IpsecGatewayConnectionArgs]] = None,
description: Optional[str] = None,
gateway_ip: Optional[str] = None,
location: Optional[str] = None,
maintenance_window: Optional[IpsecGatewayMaintenanceWindowArgs] = None,
name: Optional[str] = None,
tier: Optional[str] = None,
version: Optional[str] = None) -> IpsecGateway
func GetIpsecGateway(ctx *Context, name string, id IDInput, state *IpsecGatewayState, opts ...ResourceOption) (*IpsecGateway, error)
public static IpsecGateway Get(string name, Input<string> id, IpsecGatewayState? state, CustomResourceOptions? opts = null)
public static IpsecGateway get(String name, Output<String> id, IpsecGatewayState state, CustomResourceOptions options)
resources: _: type: ionoscloud:vpn:IpsecGateway get: id: ${id}
- 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.
- Connections
List<Ionoscloud.
Ipsec Gateway Connection> - [list] The network connection for your gateway. Note: all connections must belong to the same datacenter. Minimum items: 1. Maximum items: 10.
- Description string
- [string] The human-readable description of the IPSec Gateway.
- Gateway
Ip string - [string] Public IP address to be assigned to the gateway. Note: This must be an IP address in the same datacenter as the connections.
- Location string
- [string] The location of the IPSec Gateway. Supported locations: de/fra, de/txl, es/vit, gb/bhx, gb/lhr, us/ewr, us/las, us/mci, fr/par.
- Maintenance
Window Ionoscloud.Ipsec Gateway Maintenance Window - (Computed) A weekly 4 hour-long window, during which maintenance might occur.
- Name string
- [string] The name of the IPSec Gateway.
- Tier string
- (Computed)[string] Gateway performance options. See product documentation for full details. Options: STANDARD, STANDARD_HA, ENHANCED, ENHANCED_HA, PREMIUM, PREMIUM_HA.
- Version string
- [string] The IKE version that is permitted for the VPN tunnels. Default:
IKEv2
. Possible values:IKEv2
.
- Connections
[]Ipsec
Gateway Connection Args - [list] The network connection for your gateway. Note: all connections must belong to the same datacenter. Minimum items: 1. Maximum items: 10.
- Description string
- [string] The human-readable description of the IPSec Gateway.
- Gateway
Ip string - [string] Public IP address to be assigned to the gateway. Note: This must be an IP address in the same datacenter as the connections.
- Location string
- [string] The location of the IPSec Gateway. Supported locations: de/fra, de/txl, es/vit, gb/bhx, gb/lhr, us/ewr, us/las, us/mci, fr/par.
- Maintenance
Window IpsecGateway Maintenance Window Args - (Computed) A weekly 4 hour-long window, during which maintenance might occur.
- Name string
- [string] The name of the IPSec Gateway.
- Tier string
- (Computed)[string] Gateway performance options. See product documentation for full details. Options: STANDARD, STANDARD_HA, ENHANCED, ENHANCED_HA, PREMIUM, PREMIUM_HA.
- Version string
- [string] The IKE version that is permitted for the VPN tunnels. Default:
IKEv2
. Possible values:IKEv2
.
- connections
List<Ipsec
Gateway Connection> - [list] The network connection for your gateway. Note: all connections must belong to the same datacenter. Minimum items: 1. Maximum items: 10.
- description String
- [string] The human-readable description of the IPSec Gateway.
- gateway
Ip String - [string] Public IP address to be assigned to the gateway. Note: This must be an IP address in the same datacenter as the connections.
- location String
- [string] The location of the IPSec Gateway. Supported locations: de/fra, de/txl, es/vit, gb/bhx, gb/lhr, us/ewr, us/las, us/mci, fr/par.
- maintenance
Window IpsecGateway Maintenance Window - (Computed) A weekly 4 hour-long window, during which maintenance might occur.
- name String
- [string] The name of the IPSec Gateway.
- tier String
- (Computed)[string] Gateway performance options. See product documentation for full details. Options: STANDARD, STANDARD_HA, ENHANCED, ENHANCED_HA, PREMIUM, PREMIUM_HA.
- version String
- [string] The IKE version that is permitted for the VPN tunnels. Default:
IKEv2
. Possible values:IKEv2
.
- connections
Ipsec
Gateway Connection[] - [list] The network connection for your gateway. Note: all connections must belong to the same datacenter. Minimum items: 1. Maximum items: 10.
- description string
- [string] The human-readable description of the IPSec Gateway.
- gateway
Ip string - [string] Public IP address to be assigned to the gateway. Note: This must be an IP address in the same datacenter as the connections.
- location string
- [string] The location of the IPSec Gateway. Supported locations: de/fra, de/txl, es/vit, gb/bhx, gb/lhr, us/ewr, us/las, us/mci, fr/par.
- maintenance
Window IpsecGateway Maintenance Window - (Computed) A weekly 4 hour-long window, during which maintenance might occur.
- name string
- [string] The name of the IPSec Gateway.
- tier string
- (Computed)[string] Gateway performance options. See product documentation for full details. Options: STANDARD, STANDARD_HA, ENHANCED, ENHANCED_HA, PREMIUM, PREMIUM_HA.
- version string
- [string] The IKE version that is permitted for the VPN tunnels. Default:
IKEv2
. Possible values:IKEv2
.
- connections
Sequence[Ipsec
Gateway Connection Args] - [list] The network connection for your gateway. Note: all connections must belong to the same datacenter. Minimum items: 1. Maximum items: 10.
- description str
- [string] The human-readable description of the IPSec Gateway.
- gateway_
ip str - [string] Public IP address to be assigned to the gateway. Note: This must be an IP address in the same datacenter as the connections.
- location str
- [string] The location of the IPSec Gateway. Supported locations: de/fra, de/txl, es/vit, gb/bhx, gb/lhr, us/ewr, us/las, us/mci, fr/par.
- maintenance_
window IpsecGateway Maintenance Window Args - (Computed) A weekly 4 hour-long window, during which maintenance might occur.
- name str
- [string] The name of the IPSec Gateway.
- tier str
- (Computed)[string] Gateway performance options. See product documentation for full details. Options: STANDARD, STANDARD_HA, ENHANCED, ENHANCED_HA, PREMIUM, PREMIUM_HA.
- version str
- [string] The IKE version that is permitted for the VPN tunnels. Default:
IKEv2
. Possible values:IKEv2
.
- connections List<Property Map>
- [list] The network connection for your gateway. Note: all connections must belong to the same datacenter. Minimum items: 1. Maximum items: 10.
- description String
- [string] The human-readable description of the IPSec Gateway.
- gateway
Ip String - [string] Public IP address to be assigned to the gateway. Note: This must be an IP address in the same datacenter as the connections.
- location String
- [string] The location of the IPSec Gateway. Supported locations: de/fra, de/txl, es/vit, gb/bhx, gb/lhr, us/ewr, us/las, us/mci, fr/par.
- maintenance
Window Property Map - (Computed) A weekly 4 hour-long window, during which maintenance might occur.
- name String
- [string] The name of the IPSec Gateway.
- tier String
- (Computed)[string] Gateway performance options. See product documentation for full details. Options: STANDARD, STANDARD_HA, ENHANCED, ENHANCED_HA, PREMIUM, PREMIUM_HA.
- version String
- [string] The IKE version that is permitted for the VPN tunnels. Default:
IKEv2
. Possible values:IKEv2
.
Supporting Types
IpsecGatewayConnection, IpsecGatewayConnectionArgs
- Datacenter
Id string - [string] The datacenter to connect your VPN Gateway to.
- Ipv4Cidr string
- [string] Describes the private ipv4 subnet in your LAN that should be accessible by the VPN Gateway. Note: this should be the subnet already assigned to the LAN
- Lan
Id string - [string] The numeric LAN ID to connect your VPN Gateway to.
- Ipv6Cidr string
- [string] Describes the ipv6 subnet in your LAN that should be accessible by the VPN Gateway. Note: this should be the subnet already assigned to the LAN
- Datacenter
Id string - [string] The datacenter to connect your VPN Gateway to.
- Ipv4Cidr string
- [string] Describes the private ipv4 subnet in your LAN that should be accessible by the VPN Gateway. Note: this should be the subnet already assigned to the LAN
- Lan
Id string - [string] The numeric LAN ID to connect your VPN Gateway to.
- Ipv6Cidr string
- [string] Describes the ipv6 subnet in your LAN that should be accessible by the VPN Gateway. Note: this should be the subnet already assigned to the LAN
- datacenter
Id String - [string] The datacenter to connect your VPN Gateway to.
- ipv4Cidr String
- [string] Describes the private ipv4 subnet in your LAN that should be accessible by the VPN Gateway. Note: this should be the subnet already assigned to the LAN
- lan
Id String - [string] The numeric LAN ID to connect your VPN Gateway to.
- ipv6Cidr String
- [string] Describes the ipv6 subnet in your LAN that should be accessible by the VPN Gateway. Note: this should be the subnet already assigned to the LAN
- datacenter
Id string - [string] The datacenter to connect your VPN Gateway to.
- ipv4Cidr string
- [string] Describes the private ipv4 subnet in your LAN that should be accessible by the VPN Gateway. Note: this should be the subnet already assigned to the LAN
- lan
Id string - [string] The numeric LAN ID to connect your VPN Gateway to.
- ipv6Cidr string
- [string] Describes the ipv6 subnet in your LAN that should be accessible by the VPN Gateway. Note: this should be the subnet already assigned to the LAN
- datacenter_
id str - [string] The datacenter to connect your VPN Gateway to.
- ipv4_
cidr str - [string] Describes the private ipv4 subnet in your LAN that should be accessible by the VPN Gateway. Note: this should be the subnet already assigned to the LAN
- lan_
id str - [string] The numeric LAN ID to connect your VPN Gateway to.
- ipv6_
cidr str - [string] Describes the ipv6 subnet in your LAN that should be accessible by the VPN Gateway. Note: this should be the subnet already assigned to the LAN
- datacenter
Id String - [string] The datacenter to connect your VPN Gateway to.
- ipv4Cidr String
- [string] Describes the private ipv4 subnet in your LAN that should be accessible by the VPN Gateway. Note: this should be the subnet already assigned to the LAN
- lan
Id String - [string] The numeric LAN ID to connect your VPN Gateway to.
- ipv6Cidr String
- [string] Describes the ipv6 subnet in your LAN that should be accessible by the VPN Gateway. Note: this should be the subnet already assigned to the LAN
IpsecGatewayMaintenanceWindow, IpsecGatewayMaintenanceWindowArgs
- Day
Of stringThe Week - [string] The name of the week day.
- Time string
- [string] Start of the maintenance window in UTC time.
- Day
Of stringThe Week - [string] The name of the week day.
- Time string
- [string] Start of the maintenance window in UTC time.
- day
Of StringThe Week - [string] The name of the week day.
- time String
- [string] Start of the maintenance window in UTC time.
- day
Of stringThe Week - [string] The name of the week day.
- time string
- [string] Start of the maintenance window in UTC time.
- day_
of_ strthe_ week - [string] The name of the week day.
- time str
- [string] Start of the maintenance window in UTC time.
- day
Of StringThe Week - [string] The name of the week day.
- time String
- [string] Start of the maintenance window in UTC time.
Import
The resource can be imported using the location
and gateway_id
, for example:
$ pulumi import ionoscloud:vpn/ipsecGateway:IpsecGateway example location:gateway_id
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- ionoscloud ionos-cloud/pulumi-ionoscloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ionoscloud
Terraform Provider.