1. Packages
  2. Ionoscloud Provider
  3. API Docs
  4. getVpnIpsecGateway
ionoscloud 6.7.6 published on Monday, Apr 14, 2025 by ionos-cloud

ionoscloud.getVpnIpsecGateway

Explore with Pulumi AI

ionoscloud logo
ionoscloud 6.7.6 published on Monday, Apr 14, 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.getVpnIpsecGateway({
        id: "gateway_id",
        location: "gateway_location",
    });
    
    import pulumi
    import pulumi_ionoscloud as ionoscloud
    
    example = ionoscloud.get_vpn_ipsec_gateway(id="gateway_id",
        location="gateway_location")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ionoscloud/v6/ionoscloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ionoscloud.LookupVpnIpsecGateway(ctx, &ionoscloud.LookupVpnIpsecGatewayArgs{
    			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.GetVpnIpsecGateway.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.IonoscloudFunctions;
    import com.pulumi.ionoscloud.inputs.GetVpnIpsecGatewayArgs;
    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 = IonoscloudFunctions.getVpnIpsecGateway(GetVpnIpsecGatewayArgs.builder()
                .id("gateway_id")
                .location("gateway_location")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: ionoscloud:getVpnIpsecGateway
          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.getVpnIpsecGateway({
        location: "gateway_location",
        name: "ipsec-gateway",
    });
    
    import pulumi
    import pulumi_ionoscloud as ionoscloud
    
    example = ionoscloud.get_vpn_ipsec_gateway(location="gateway_location",
        name="ipsec-gateway")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ionoscloud/v6/ionoscloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ionoscloud.LookupVpnIpsecGateway(ctx, &ionoscloud.LookupVpnIpsecGatewayArgs{
    			Location: pulumi.StringRef("gateway_location"),
    			Name:     pulumi.StringRef("ipsec-gateway"),
    		}, 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.GetVpnIpsecGateway.Invoke(new()
        {
            Location = "gateway_location",
            Name = "ipsec-gateway",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ionoscloud.IonoscloudFunctions;
    import com.pulumi.ionoscloud.inputs.GetVpnIpsecGatewayArgs;
    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 = IonoscloudFunctions.getVpnIpsecGateway(GetVpnIpsecGatewayArgs.builder()
                .location("gateway_location")
                .name("ipsec-gateway")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: ionoscloud:getVpnIpsecGateway
          arguments:
            location: gateway_location
            name: ipsec-gateway
    

    Using getVpnIpsecGateway

    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 getVpnIpsecGateway(args: GetVpnIpsecGatewayArgs, opts?: InvokeOptions): Promise<GetVpnIpsecGatewayResult>
    function getVpnIpsecGatewayOutput(args: GetVpnIpsecGatewayOutputArgs, opts?: InvokeOptions): Output<GetVpnIpsecGatewayResult>
    def get_vpn_ipsec_gateway(id: Optional[str] = None,
                              location: Optional[str] = None,
                              name: Optional[str] = None,
                              version: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetVpnIpsecGatewayResult
    def get_vpn_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[GetVpnIpsecGatewayResult]
    func LookupVpnIpsecGateway(ctx *Context, args *LookupVpnIpsecGatewayArgs, opts ...InvokeOption) (*LookupVpnIpsecGatewayResult, error)
    func LookupVpnIpsecGatewayOutput(ctx *Context, args *LookupVpnIpsecGatewayOutputArgs, opts ...InvokeOption) LookupVpnIpsecGatewayResultOutput

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

    public static class GetVpnIpsecGateway 
    {
        public static Task<GetVpnIpsecGatewayResult> InvokeAsync(GetVpnIpsecGatewayArgs args, InvokeOptions? opts = null)
        public static Output<GetVpnIpsecGatewayResult> Invoke(GetVpnIpsecGatewayInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetVpnIpsecGatewayResult> getVpnIpsecGateway(GetVpnIpsecGatewayArgs args, InvokeOptions options)
    public static Output<GetVpnIpsecGatewayResult> getVpnIpsecGateway(GetVpnIpsecGatewayArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ionoscloud:index/getVpnIpsecGateway:getVpnIpsecGateway
      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.

    getVpnIpsecGateway Result

    The following output properties are available:

    Connections List<GetVpnIpsecGatewayConnection>
    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<GetVpnIpsecGatewayMaintenanceWindow>
    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 []GetVpnIpsecGatewayConnection
    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 []GetVpnIpsecGatewayMaintenanceWindow
    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<GetVpnIpsecGatewayConnection>
    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<GetVpnIpsecGatewayMaintenanceWindow>
    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 GetVpnIpsecGatewayConnection[]
    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 GetVpnIpsecGatewayMaintenanceWindow[]
    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[GetVpnIpsecGatewayConnection]
    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[GetVpnIpsecGatewayMaintenanceWindow]
    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

    GetVpnIpsecGatewayConnection

    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.

    GetVpnIpsecGatewayMaintenanceWindow

    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/terraform-provider-ionoscloud
    License
    Notes
    This Pulumi package is based on the ionoscloud Terraform Provider.
    ionoscloud logo
    ionoscloud 6.7.6 published on Monday, Apr 14, 2025 by ionos-cloud