ionoscloud.vpn.getIpsecGateway
Explore with Pulumi AI
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:
getIpsecGateway Result
The following output properties are available:
- Connections
List<Ionoscloud.
Get Ipsec Gateway Connection> - The network connection for your gateway.
- Description string
- (Optional)[string] The human-readable description of the IPSec Gateway.
- Gateway
Ip string - Public IP address to be assigned to the gateway.
- Id string
- The unique ID of the IPSec Gateway.
- Maintenance
Windows List<Ionoscloud.Get Ipsec Gateway Maintenance Window> - 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
[]Get
Ipsec Gateway Connection - The network connection for your gateway.
- Description string
- (Optional)[string] The human-readable description of the IPSec Gateway.
- Gateway
Ip string - Public IP address to be assigned to the gateway.
- Id string
- The unique ID of the IPSec Gateway.
- Maintenance
Windows []GetIpsec Gateway Maintenance Window - 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<Get
Ipsec Gateway Connection> - The network connection for your gateway.
- description String
- (Optional)[string] The human-readable description of the IPSec Gateway.
- gateway
Ip String - Public IP address to be assigned to the gateway.
- id String
- The unique ID of the IPSec Gateway.
- maintenance
Windows List<GetIpsec Gateway Maintenance Window> - 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
Get
Ipsec Gateway Connection[] - The network connection for your gateway.
- description string
- (Optional)[string] The human-readable description of the IPSec Gateway.
- gateway
Ip string - Public IP address to be assigned to the gateway.
- id string
- The unique ID of the IPSec Gateway.
- maintenance
Windows GetIpsec Gateway Maintenance Window[] - 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[Get
Ipsec Gateway Connection] - 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[GetIpsec Gateway Maintenance Window] - 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.
- gateway
Ip String - Public IP address to be assigned to the gateway.
- id String
- The unique ID of the IPSec Gateway.
- maintenance
Windows 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
- Datacenter
Id 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.
- Lan
Id string - The numeric LAN ID to connect your VPN Gateway to.
- Datacenter
Id 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.
- Lan
Id string - The numeric LAN ID to connect your VPN Gateway to.
- datacenter
Id 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.
- lan
Id String - The numeric LAN ID to connect your VPN Gateway to.
- datacenter
Id 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.
- lan
Id 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.
- datacenter
Id 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.
- lan
Id String - The numeric LAN ID to connect your VPN Gateway to.
GetIpsecGatewayMaintenanceWindow
- Day
Of stringThe Week - The name of the week day.
- Time string
- Start of the maintenance window in UTC time.
- Day
Of stringThe Week - The name of the week day.
- Time string
- Start of the maintenance window in UTC time.
- day
Of StringThe Week - The name of the week day.
- time String
- Start of the maintenance window in UTC time.
- day
Of stringThe Week - The name of the week day.
- time string
- Start of the maintenance window in UTC time.
- day_
of_ strthe_ week - The name of the week day.
- time str
- Start of the maintenance window in UTC time.
- day
Of StringThe Week - 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.