ionoscloud.vpn.getIpsecTunnel
Explore with Pulumi AI
The VPN IPSec Gateway Tunnel data source can be used to search for and return an existing IPSec Gateway Tunnel. You can provide a string for the name parameter which will be compared with provisioned IPSec Gateway Tunnels. 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.getIpsecTunnel({
id: "tunnel_id",
gatewayId: "gateway_id",
location: "gateway_location",
});
import pulumi
import pulumi_ionoscloud as ionoscloud
example = ionoscloud.vpn.get_ipsec_tunnel(id="tunnel_id",
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.LookupIpsecTunnel(ctx, &vpn.LookupIpsecTunnelArgs{
Id: pulumi.StringRef("tunnel_id"),
GatewayId: "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.GetIpsecTunnel.Invoke(new()
{
Id = "tunnel_id",
GatewayId = "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.GetIpsecTunnelArgs;
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.getIpsecTunnel(GetIpsecTunnelArgs.builder()
.id("tunnel_id")
.gatewayId("gateway_id")
.location("gateway_location")
.build());
}
}
variables:
example:
fn::invoke:
function: ionoscloud:vpn:getIpsecTunnel
arguments:
id: tunnel_id
gatewayId: 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.getIpsecTunnel({
name: "ipsec-tunnel",
gatewayId: "gateway_id",
location: "gateway_location",
});
import pulumi
import pulumi_ionoscloud as ionoscloud
example = ionoscloud.vpn.get_ipsec_tunnel(name="ipsec-tunnel",
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.LookupIpsecTunnel(ctx, &vpn.LookupIpsecTunnelArgs{
Name: pulumi.StringRef("ipsec-tunnel"),
GatewayId: "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.GetIpsecTunnel.Invoke(new()
{
Name = "ipsec-tunnel",
GatewayId = "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.GetIpsecTunnelArgs;
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.getIpsecTunnel(GetIpsecTunnelArgs.builder()
.name("ipsec-tunnel")
.gatewayId("gateway_id")
.location("gateway_location")
.build());
}
}
variables:
example:
fn::invoke:
function: ionoscloud:vpn:getIpsecTunnel
arguments:
name: ipsec-tunnel
gatewayId: gateway_id
location: gateway_location
Attributes reference
The following attributes are returned by the datasource:
id
- The unique ID of the IPSec Gateway Tunnel.name
- The name of the IPSec Gateway Tunnel.description
- The human-readable description of your IPSec Gateway Tunnel.remote_host
- The remote peer host fully qualified domain name or public IPV4 IP to connect to.ike
- Settings for the initial security exchange phase.diffie_hellman_group
- The Diffie-Hellman Group to use for IPSec Encryption.encryption_algorithm
- The encryption algorithm to use for IPSec Encryption.integrity_algorithm
- The integrity algorithm to use for IPSec Encryption.lifetime
- The phase lifetime in seconds.
esp
- Settings for the IPSec SA (ESP) phase.diffie_hellman_group
- The Diffie-Hellman Group to use for IPSec Encryption.encryption_algorithm
- The encryption algorithm to use for IPSec Encryption.integrity_algorithm
- The integrity algorithm to use for IPSec Encryption.lifetime
- The phase lifetime in seconds.
auth
- Properties with all data needed to define IPSec Authentication.method
- The authentication method to use for IPSec Authentication.
cloud_network_cidrs
- The network CIDRs on the “Left” side that are allowed to connect to the IPSec tunnel, i.e. the CIDRs within your IONOS Cloud LAN. Specify “0.0.0.0/0” or “::/0” for all addresses.peer_network_cidrs
- The network CIDRs on the “Right” side that are allowed to connect to the IPSec tunnel. Specify “0.0.0.0/0” or “::/0” for all addresses.
Using getIpsecTunnel
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 getIpsecTunnel(args: GetIpsecTunnelArgs, opts?: InvokeOptions): Promise<GetIpsecTunnelResult>
function getIpsecTunnelOutput(args: GetIpsecTunnelOutputArgs, opts?: InvokeOptions): Output<GetIpsecTunnelResult>
def get_ipsec_tunnel(gateway_id: Optional[str] = None,
id: Optional[str] = None,
location: Optional[str] = None,
name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetIpsecTunnelResult
def get_ipsec_tunnel_output(gateway_id: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
location: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetIpsecTunnelResult]
func LookupIpsecTunnel(ctx *Context, args *LookupIpsecTunnelArgs, opts ...InvokeOption) (*LookupIpsecTunnelResult, error)
func LookupIpsecTunnelOutput(ctx *Context, args *LookupIpsecTunnelOutputArgs, opts ...InvokeOption) LookupIpsecTunnelResultOutput
> Note: This function is named LookupIpsecTunnel
in the Go SDK.
public static class GetIpsecTunnel
{
public static Task<GetIpsecTunnelResult> InvokeAsync(GetIpsecTunnelArgs args, InvokeOptions? opts = null)
public static Output<GetIpsecTunnelResult> Invoke(GetIpsecTunnelInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetIpsecTunnelResult> getIpsecTunnel(GetIpsecTunnelArgs args, InvokeOptions options)
public static Output<GetIpsecTunnelResult> getIpsecTunnel(GetIpsecTunnelArgs args, InvokeOptions options)
fn::invoke:
function: ionoscloud:vpn/getIpsecTunnel:getIpsecTunnel
arguments:
# arguments dictionary
The following arguments are supported:
- gateway_
id str - The ID of the IPSec Gateway that the tunnel belongs to.
- id str
- ID of an existing IPSec Gateway Tunnel that you want to search for.
- location str
- The location of the IPSec Gateway Tunnel.
- name str
- Name of an existing IPSec Gateway Tunnel that you want to search for.
getIpsecTunnel Result
The following output properties are available:
- Auths
List<Ionoscloud.
Get Ipsec Tunnel Auth> - Cloud
Network List<string>Cidrs - Description string
- Esps
List<Ionoscloud.
Get Ipsec Tunnel Esp> - Gateway
Id string - Id string
- Ikes
List<Ionoscloud.
Get Ipsec Tunnel Ike> - Name string
- Peer
Network List<string>Cidrs - Remote
Host string - Location string
- Auths
[]Get
Ipsec Tunnel Auth - Cloud
Network []stringCidrs - Description string
- Esps
[]Get
Ipsec Tunnel Esp - Gateway
Id string - Id string
- Ikes
[]Get
Ipsec Tunnel Ike - Name string
- Peer
Network []stringCidrs - Remote
Host string - Location string
- auths
List<Get
Ipsec Tunnel Auth> - cloud
Network List<String>Cidrs - description String
- esps
List<Get
Ipsec Tunnel Esp> - gateway
Id String - id String
- ikes
List<Get
Ipsec Tunnel Ike> - name String
- peer
Network List<String>Cidrs - remote
Host String - location String
- auths
Get
Ipsec Tunnel Auth[] - cloud
Network string[]Cidrs - description string
- esps
Get
Ipsec Tunnel Esp[] - gateway
Id string - id string
- ikes
Get
Ipsec Tunnel Ike[] - name string
- peer
Network string[]Cidrs - remote
Host string - location string
- auths
Sequence[Get
Ipsec Tunnel Auth] - cloud_
network_ Sequence[str]cidrs - description str
- esps
Sequence[Get
Ipsec Tunnel Esp] - gateway_
id str - id str
- ikes
Sequence[Get
Ipsec Tunnel Ike] - name str
- peer_
network_ Sequence[str]cidrs - remote_
host str - location str
- auths List<Property Map>
- cloud
Network List<String>Cidrs - description String
- esps List<Property Map>
- gateway
Id String - id String
- ikes List<Property Map>
- name String
- peer
Network List<String>Cidrs - remote
Host String - location String
Supporting Types
GetIpsecTunnelAuth
- Method string
- The Authentication Method to use for IPSec Authentication.
- Method string
- The Authentication Method to use for IPSec Authentication.
- method String
- The Authentication Method to use for IPSec Authentication.
- method string
- The Authentication Method to use for IPSec Authentication.
- method str
- The Authentication Method to use for IPSec Authentication.
- method String
- The Authentication Method to use for IPSec Authentication.
GetIpsecTunnelEsp
- Diffie
Hellman stringGroup - The Diffie-Hellman Group to use for IPSec Encryption.
- Encryption
Algorithm string - The encryption algorithm to use for IPSec Encryption.
- Integrity
Algorithm string - The integrity algorithm to use for IPSec Encryption.
- Lifetime int
- The phase lifetime in seconds.
- Diffie
Hellman stringGroup - The Diffie-Hellman Group to use for IPSec Encryption.
- Encryption
Algorithm string - The encryption algorithm to use for IPSec Encryption.
- Integrity
Algorithm string - The integrity algorithm to use for IPSec Encryption.
- Lifetime int
- The phase lifetime in seconds.
- diffie
Hellman StringGroup - The Diffie-Hellman Group to use for IPSec Encryption.
- encryption
Algorithm String - The encryption algorithm to use for IPSec Encryption.
- integrity
Algorithm String - The integrity algorithm to use for IPSec Encryption.
- lifetime Integer
- The phase lifetime in seconds.
- diffie
Hellman stringGroup - The Diffie-Hellman Group to use for IPSec Encryption.
- encryption
Algorithm string - The encryption algorithm to use for IPSec Encryption.
- integrity
Algorithm string - The integrity algorithm to use for IPSec Encryption.
- lifetime number
- The phase lifetime in seconds.
- diffie_
hellman_ strgroup - The Diffie-Hellman Group to use for IPSec Encryption.
- encryption_
algorithm str - The encryption algorithm to use for IPSec Encryption.
- integrity_
algorithm str - The integrity algorithm to use for IPSec Encryption.
- lifetime int
- The phase lifetime in seconds.
- diffie
Hellman StringGroup - The Diffie-Hellman Group to use for IPSec Encryption.
- encryption
Algorithm String - The encryption algorithm to use for IPSec Encryption.
- integrity
Algorithm String - The integrity algorithm to use for IPSec Encryption.
- lifetime Number
- The phase lifetime in seconds.
GetIpsecTunnelIke
- Diffie
Hellman stringGroup - The Diffie-Hellman Group to use for IPSec Encryption.
- Encryption
Algorithm string - The encryption algorithm to use for IPSec Encryption.
- Integrity
Algorithm string - The integrity algorithm to use for IPSec Encryption.
- Lifetime int
- The phase lifetime in seconds.
- Diffie
Hellman stringGroup - The Diffie-Hellman Group to use for IPSec Encryption.
- Encryption
Algorithm string - The encryption algorithm to use for IPSec Encryption.
- Integrity
Algorithm string - The integrity algorithm to use for IPSec Encryption.
- Lifetime int
- The phase lifetime in seconds.
- diffie
Hellman StringGroup - The Diffie-Hellman Group to use for IPSec Encryption.
- encryption
Algorithm String - The encryption algorithm to use for IPSec Encryption.
- integrity
Algorithm String - The integrity algorithm to use for IPSec Encryption.
- lifetime Integer
- The phase lifetime in seconds.
- diffie
Hellman stringGroup - The Diffie-Hellman Group to use for IPSec Encryption.
- encryption
Algorithm string - The encryption algorithm to use for IPSec Encryption.
- integrity
Algorithm string - The integrity algorithm to use for IPSec Encryption.
- lifetime number
- The phase lifetime in seconds.
- diffie_
hellman_ strgroup - The Diffie-Hellman Group to use for IPSec Encryption.
- encryption_
algorithm str - The encryption algorithm to use for IPSec Encryption.
- integrity_
algorithm str - The integrity algorithm to use for IPSec Encryption.
- lifetime int
- The phase lifetime in seconds.
- diffie
Hellman StringGroup - The Diffie-Hellman Group to use for IPSec Encryption.
- encryption
Algorithm String - The encryption algorithm to use for IPSec Encryption.
- integrity
Algorithm String - The integrity algorithm to use for IPSec Encryption.
- lifetime Number
- The phase lifetime in seconds.
Package Details
- Repository
- ionoscloud ionos-cloud/pulumi-ionoscloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ionoscloud
Terraform Provider.