1. Packages
  2. Ionoscloud
  3. API Docs
  4. vpn
  5. getIpsecGateway
IonosCloud v0.2.2 published on Monday, May 12, 2025 by ionos-cloud

ionoscloud.vpn.getIpsecGateway

Explore with Pulumi AI

ionoscloud logo
IonosCloud v0.2.2 published on Monday, May 12, 2025 by ionos-cloud

    The VPN IPSec Gateway data source can be used to search for and return an existing IPSec Gateway. You can provide a string for the name parameter which will be compared with provisioned IPSec Gateways. If a single match is found, it will be returned. If your search results in multiple matches, an error will be returned. When this happens, please refine your search string so that it is specific enough to return only one result.

    Example Usage

    By ID

    import * as pulumi from "@pulumi/pulumi";
    import * as ionoscloud from "@pulumi/ionoscloud";
    
    const example = ionoscloud.vpn.getIpsecGateway({
        id: "gateway_id",
        location: "gateway_location",
    });
    
    import pulumi
    import pulumi_ionoscloud as ionoscloud
    
    example = ionoscloud.vpn.get_ipsec_gateway(id="gateway_id",
        location="gateway_location")
    
    package main
    
    import (
    	"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 {
    		_, err := vpn.LookupIpsecGateway(ctx, &vpn.LookupIpsecGatewayArgs{
    			Id:       pulumi.StringRef("gateway_id"),
    			Location: pulumi.StringRef("gateway_location"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ionoscloud = Pulumi.Ionoscloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Ionoscloud.Vpn.GetIpsecGateway.Invoke(new()
        {
            Id = "gateway_id",
            Location = "gateway_location",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ionoscloud.vpn.VpnFunctions;
    import com.pulumi.ionoscloud.vpn.inputs.GetIpsecGatewayArgs;
    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 example = VpnFunctions.getIpsecGateway(GetIpsecGatewayArgs.builder()
                .id("gateway_id")
                .location("gateway_location")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: ionoscloud:vpn:getIpsecGateway
          arguments:
            id: gateway_id
            location: gateway_location
    

    By Name

    Needs to have the resource be previously created, or a depends_on clause to ensure that the resource is created before this data source is called.

    import * as pulumi from "@pulumi/pulumi";
    import * as ionoscloud from "@pulumi/ionoscloud";
    
    const example = ionoscloud.vpn.getIpsecGateway({
        name: "ipsec-gateway",
        location: "gateway_location",
    });
    
    import pulumi
    import pulumi_ionoscloud as ionoscloud
    
    example = ionoscloud.vpn.get_ipsec_gateway(name="ipsec-gateway",
        location="gateway_location")
    
    package main
    
    import (
    	"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 {
    		_, err := vpn.LookupIpsecGateway(ctx, &vpn.LookupIpsecGatewayArgs{
    			Name:     pulumi.StringRef("ipsec-gateway"),
    			Location: pulumi.StringRef("gateway_location"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ionoscloud = Pulumi.Ionoscloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Ionoscloud.Vpn.GetIpsecGateway.Invoke(new()
        {
            Name = "ipsec-gateway",
            Location = "gateway_location",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ionoscloud.vpn.VpnFunctions;
    import com.pulumi.ionoscloud.vpn.inputs.GetIpsecGatewayArgs;
    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 example = VpnFunctions.getIpsecGateway(GetIpsecGatewayArgs.builder()
                .name("ipsec-gateway")
                .location("gateway_location")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: ionoscloud:vpn:getIpsecGateway
          arguments:
            name: ipsec-gateway
            location: gateway_location
    

    Using getIpsecGateway

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getIpsecGateway(args: GetIpsecGatewayArgs, opts?: InvokeOptions): Promise<GetIpsecGatewayResult>
    function getIpsecGatewayOutput(args: GetIpsecGatewayOutputArgs, opts?: InvokeOptions): Output<GetIpsecGatewayResult>
    def get_ipsec_gateway(id: Optional[str] = None,
                          location: Optional[str] = None,
                          name: Optional[str] = None,
                          version: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetIpsecGatewayResult
    def get_ipsec_gateway_output(id: Optional[pulumi.Input[str]] = None,
                          location: Optional[pulumi.Input[str]] = None,
                          name: Optional[pulumi.Input[str]] = None,
                          version: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetIpsecGatewayResult]
    func LookupIpsecGateway(ctx *Context, args *LookupIpsecGatewayArgs, opts ...InvokeOption) (*LookupIpsecGatewayResult, error)
    func LookupIpsecGatewayOutput(ctx *Context, args *LookupIpsecGatewayOutputArgs, opts ...InvokeOption) LookupIpsecGatewayResultOutput

    > Note: This function is named LookupIpsecGateway in the Go SDK.

    public static class GetIpsecGateway 
    {
        public static Task<GetIpsecGatewayResult> InvokeAsync(GetIpsecGatewayArgs args, InvokeOptions? opts = null)
        public static Output<GetIpsecGatewayResult> Invoke(GetIpsecGatewayInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetIpsecGatewayResult> getIpsecGateway(GetIpsecGatewayArgs args, InvokeOptions options)
    public static Output<GetIpsecGatewayResult> getIpsecGateway(GetIpsecGatewayArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ionoscloud:vpn/getIpsecGateway:getIpsecGateway
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    ID of an existing IPSec Gateway that you want to search for.
    Location string
    The location of the IPSec Gateway.
    Name string
    Name of an existing IPSec Gateway that you want to search for.
    Version string
    The IKE version that is permitted for the VPN tunnels.
    Id string
    ID of an existing IPSec Gateway that you want to search for.
    Location string
    The location of the IPSec Gateway.
    Name string
    Name of an existing IPSec Gateway that you want to search for.
    Version string
    The IKE version that is permitted for the VPN tunnels.
    id String
    ID of an existing IPSec Gateway that you want to search for.
    location String
    The location of the IPSec Gateway.
    name String
    Name of an existing IPSec Gateway that you want to search for.
    version String
    The IKE version that is permitted for the VPN tunnels.
    id string
    ID of an existing IPSec Gateway that you want to search for.
    location string
    The location of the IPSec Gateway.
    name string
    Name of an existing IPSec Gateway that you want to search for.
    version string
    The IKE version that is permitted for the VPN tunnels.
    id str
    ID of an existing IPSec Gateway that you want to search for.
    location str
    The location of the IPSec Gateway.
    name str
    Name of an existing IPSec Gateway that you want to search for.
    version str
    The IKE version that is permitted for the VPN tunnels.
    id String
    ID of an existing IPSec Gateway that you want to search for.
    location String
    The location of the IPSec Gateway.
    name String
    Name of an existing IPSec Gateway that you want to search for.
    version String
    The IKE version that is permitted for the VPN tunnels.

    getIpsecGateway Result

    The following output properties are available:

    Connections List<Ionoscloud.GetIpsecGatewayConnection>
    The network connection for your gateway.
    Description string
    (Optional)[string] The human-readable description of the IPSec Gateway.
    GatewayIp string
    Public IP address to be assigned to the gateway.
    Id string
    The unique ID of the IPSec Gateway.
    MaintenanceWindows List<Ionoscloud.GetIpsecGatewayMaintenanceWindow>
    A weekly 4 hour-long window, during which maintenance might occur.
    Name string
    The name of the IPSec Gateway.
    Tier string
    Gateway performance options.
    Version string
    The IKE version that is permitted for the VPN tunnels.
    Location string
    Connections []GetIpsecGatewayConnection
    The network connection for your gateway.
    Description string
    (Optional)[string] The human-readable description of the IPSec Gateway.
    GatewayIp string
    Public IP address to be assigned to the gateway.
    Id string
    The unique ID of the IPSec Gateway.
    MaintenanceWindows []GetIpsecGatewayMaintenanceWindow
    A weekly 4 hour-long window, during which maintenance might occur.
    Name string
    The name of the IPSec Gateway.
    Tier string
    Gateway performance options.
    Version string
    The IKE version that is permitted for the VPN tunnels.
    Location string
    connections List<GetIpsecGatewayConnection>
    The network connection for your gateway.
    description String
    (Optional)[string] The human-readable description of the IPSec Gateway.
    gatewayIp String
    Public IP address to be assigned to the gateway.
    id String
    The unique ID of the IPSec Gateway.
    maintenanceWindows List<GetIpsecGatewayMaintenanceWindow>
    A weekly 4 hour-long window, during which maintenance might occur.
    name String
    The name of the IPSec Gateway.
    tier String
    Gateway performance options.
    version String
    The IKE version that is permitted for the VPN tunnels.
    location String
    connections GetIpsecGatewayConnection[]
    The network connection for your gateway.
    description string
    (Optional)[string] The human-readable description of the IPSec Gateway.
    gatewayIp string
    Public IP address to be assigned to the gateway.
    id string
    The unique ID of the IPSec Gateway.
    maintenanceWindows GetIpsecGatewayMaintenanceWindow[]
    A weekly 4 hour-long window, during which maintenance might occur.
    name string
    The name of the IPSec Gateway.
    tier string
    Gateway performance options.
    version string
    The IKE version that is permitted for the VPN tunnels.
    location string
    connections Sequence[GetIpsecGatewayConnection]
    The network connection for your gateway.
    description str
    (Optional)[string] The human-readable description of the IPSec Gateway.
    gateway_ip str
    Public IP address to be assigned to the gateway.
    id str
    The unique ID of the IPSec Gateway.
    maintenance_windows Sequence[GetIpsecGatewayMaintenanceWindow]
    A weekly 4 hour-long window, during which maintenance might occur.
    name str
    The name of the IPSec Gateway.
    tier str
    Gateway performance options.
    version str
    The IKE version that is permitted for the VPN tunnels.
    location str
    connections List<Property Map>
    The network connection for your gateway.
    description String
    (Optional)[string] The human-readable description of the IPSec Gateway.
    gatewayIp String
    Public IP address to be assigned to the gateway.
    id String
    The unique ID of the IPSec Gateway.
    maintenanceWindows List<Property Map>
    A weekly 4 hour-long window, during which maintenance might occur.
    name String
    The name of the IPSec Gateway.
    tier String
    Gateway performance options.
    version String
    The IKE version that is permitted for the VPN tunnels.
    location String

    Supporting Types

    GetIpsecGatewayConnection

    DatacenterId string
    The datacenter to connect your VPN Gateway to.
    Ipv4Cidr string
    Describes the private ipv4 subnet in your LAN that should be accessible by the VPN Gateway.
    Ipv6Cidr string
    Describes the ipv6 subnet in your LAN that should be accessible by the VPN Gateway.
    LanId string
    The numeric LAN ID to connect your VPN Gateway to.
    DatacenterId string
    The datacenter to connect your VPN Gateway to.
    Ipv4Cidr string
    Describes the private ipv4 subnet in your LAN that should be accessible by the VPN Gateway.
    Ipv6Cidr string
    Describes the ipv6 subnet in your LAN that should be accessible by the VPN Gateway.
    LanId string
    The numeric LAN ID to connect your VPN Gateway to.
    datacenterId String
    The datacenter to connect your VPN Gateway to.
    ipv4Cidr String
    Describes the private ipv4 subnet in your LAN that should be accessible by the VPN Gateway.
    ipv6Cidr String
    Describes the ipv6 subnet in your LAN that should be accessible by the VPN Gateway.
    lanId String
    The numeric LAN ID to connect your VPN Gateway to.
    datacenterId string
    The datacenter to connect your VPN Gateway to.
    ipv4Cidr string
    Describes the private ipv4 subnet in your LAN that should be accessible by the VPN Gateway.
    ipv6Cidr string
    Describes the ipv6 subnet in your LAN that should be accessible by the VPN Gateway.
    lanId string
    The numeric LAN ID to connect your VPN Gateway to.
    datacenter_id str
    The datacenter to connect your VPN Gateway to.
    ipv4_cidr str
    Describes the private ipv4 subnet in your LAN that should be accessible by the VPN Gateway.
    ipv6_cidr str
    Describes the ipv6 subnet in your LAN that should be accessible by the VPN Gateway.
    lan_id str
    The numeric LAN ID to connect your VPN Gateway to.
    datacenterId String
    The datacenter to connect your VPN Gateway to.
    ipv4Cidr String
    Describes the private ipv4 subnet in your LAN that should be accessible by the VPN Gateway.
    ipv6Cidr String
    Describes the ipv6 subnet in your LAN that should be accessible by the VPN Gateway.
    lanId String
    The numeric LAN ID to connect your VPN Gateway to.

    GetIpsecGatewayMaintenanceWindow

    DayOfTheWeek string
    The name of the week day.
    Time string
    Start of the maintenance window in UTC time.
    DayOfTheWeek string
    The name of the week day.
    Time string
    Start of the maintenance window in UTC time.
    dayOfTheWeek String
    The name of the week day.
    time String
    Start of the maintenance window in UTC time.
    dayOfTheWeek string
    The name of the week day.
    time string
    Start of the maintenance window in UTC time.
    day_of_the_week str
    The name of the week day.
    time str
    Start of the maintenance window in UTC time.
    dayOfTheWeek String
    The name of the week day.
    time String
    Start of the maintenance window in UTC time.

    Package Details

    Repository
    ionoscloud ionos-cloud/pulumi-ionoscloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ionoscloud Terraform Provider.
    ionoscloud logo
    IonosCloud v0.2.2 published on Monday, May 12, 2025 by ionos-cloud