ionoscloud.getVpnIpsecTunnel
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.getVpnIpsecTunnel({
gatewayId: "gateway_id",
id: "tunnel_id",
location: "gateway_location",
});
import pulumi
import pulumi_ionoscloud as ionoscloud
example = ionoscloud.get_vpn_ipsec_tunnel(gateway_id="gateway_id",
id="tunnel_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.LookupVpnIpsecTunnel(ctx, &ionoscloud.LookupVpnIpsecTunnelArgs{
GatewayId: "gateway_id",
Id: pulumi.StringRef("tunnel_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.GetVpnIpsecTunnel.Invoke(new()
{
GatewayId = "gateway_id",
Id = "tunnel_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.GetVpnIpsecTunnelArgs;
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.getVpnIpsecTunnel(GetVpnIpsecTunnelArgs.builder()
.gatewayId("gateway_id")
.id("tunnel_id")
.location("gateway_location")
.build());
}
}
variables:
example:
fn::invoke:
function: ionoscloud:getVpnIpsecTunnel
arguments:
gatewayId: gateway_id
id: tunnel_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.getVpnIpsecTunnel({
gatewayId: "gateway_id",
location: "gateway_location",
name: "ipsec-tunnel",
});
import pulumi
import pulumi_ionoscloud as ionoscloud
example = ionoscloud.get_vpn_ipsec_tunnel(gateway_id="gateway_id",
location="gateway_location",
name="ipsec-tunnel")
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.LookupVpnIpsecTunnel(ctx, &ionoscloud.LookupVpnIpsecTunnelArgs{
GatewayId: "gateway_id",
Location: pulumi.StringRef("gateway_location"),
Name: pulumi.StringRef("ipsec-tunnel"),
}, 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.GetVpnIpsecTunnel.Invoke(new()
{
GatewayId = "gateway_id",
Location = "gateway_location",
Name = "ipsec-tunnel",
});
});
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.GetVpnIpsecTunnelArgs;
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.getVpnIpsecTunnel(GetVpnIpsecTunnelArgs.builder()
.gatewayId("gateway_id")
.location("gateway_location")
.name("ipsec-tunnel")
.build());
}
}
variables:
example:
fn::invoke:
function: ionoscloud:getVpnIpsecTunnel
arguments:
gatewayId: gateway_id
location: gateway_location
name: ipsec-tunnel
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 getVpnIpsecTunnel
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 getVpnIpsecTunnel(args: GetVpnIpsecTunnelArgs, opts?: InvokeOptions): Promise<GetVpnIpsecTunnelResult>
function getVpnIpsecTunnelOutput(args: GetVpnIpsecTunnelOutputArgs, opts?: InvokeOptions): Output<GetVpnIpsecTunnelResult>
def get_vpn_ipsec_tunnel(gateway_id: Optional[str] = None,
id: Optional[str] = None,
location: Optional[str] = None,
name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetVpnIpsecTunnelResult
def get_vpn_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[GetVpnIpsecTunnelResult]
func LookupVpnIpsecTunnel(ctx *Context, args *LookupVpnIpsecTunnelArgs, opts ...InvokeOption) (*LookupVpnIpsecTunnelResult, error)
func LookupVpnIpsecTunnelOutput(ctx *Context, args *LookupVpnIpsecTunnelOutputArgs, opts ...InvokeOption) LookupVpnIpsecTunnelResultOutput
> Note: This function is named LookupVpnIpsecTunnel
in the Go SDK.
public static class GetVpnIpsecTunnel
{
public static Task<GetVpnIpsecTunnelResult> InvokeAsync(GetVpnIpsecTunnelArgs args, InvokeOptions? opts = null)
public static Output<GetVpnIpsecTunnelResult> Invoke(GetVpnIpsecTunnelInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetVpnIpsecTunnelResult> getVpnIpsecTunnel(GetVpnIpsecTunnelArgs args, InvokeOptions options)
public static Output<GetVpnIpsecTunnelResult> getVpnIpsecTunnel(GetVpnIpsecTunnelArgs args, InvokeOptions options)
fn::invoke:
function: ionoscloud:index/getVpnIpsecTunnel:getVpnIpsecTunnel
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.
getVpnIpsecTunnel Result
The following output properties are available:
- Auths
List<Get
Vpn Ipsec Tunnel Auth> - Cloud
Network List<string>Cidrs - Description string
- Esps
List<Get
Vpn Ipsec Tunnel Esp> - Gateway
Id string - Id string
- Ikes
List<Get
Vpn Ipsec Tunnel Ike> - Name string
- Peer
Network List<string>Cidrs - Remote
Host string - Location string
- Auths
[]Get
Vpn Ipsec Tunnel Auth - Cloud
Network []stringCidrs - Description string
- Esps
[]Get
Vpn Ipsec Tunnel Esp - Gateway
Id string - Id string
- Ikes
[]Get
Vpn Ipsec Tunnel Ike - Name string
- Peer
Network []stringCidrs - Remote
Host string - Location string
- auths
List<Get
Vpn Ipsec Tunnel Auth> - cloud
Network List<String>Cidrs - description String
- esps
List<Get
Vpn Ipsec Tunnel Esp> - gateway
Id String - id String
- ikes
List<Get
Vpn Ipsec Tunnel Ike> - name String
- peer
Network List<String>Cidrs - remote
Host String - location String
- auths
Get
Vpn Ipsec Tunnel Auth[] - cloud
Network string[]Cidrs - description string
- esps
Get
Vpn Ipsec Tunnel Esp[] - gateway
Id string - id string
- ikes
Get
Vpn Ipsec Tunnel Ike[] - name string
- peer
Network string[]Cidrs - remote
Host string - location string
- auths
Sequence[Get
Vpn Ipsec Tunnel Auth] - cloud_
network_ Sequence[str]cidrs - description str
- esps
Sequence[Get
Vpn Ipsec Tunnel Esp] - gateway_
id str - id str
- ikes
Sequence[Get
Vpn 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
GetVpnIpsecTunnelAuth
- Method string
- Method string
- method String
- method string
- method str
- method String
GetVpnIpsecTunnelEsp
- Diffie
Hellman stringGroup - Encryption
Algorithm string - Integrity
Algorithm string - Lifetime double
- Diffie
Hellman stringGroup - Encryption
Algorithm string - Integrity
Algorithm string - Lifetime float64
- diffie
Hellman StringGroup - encryption
Algorithm String - integrity
Algorithm String - lifetime Double
- diffie
Hellman stringGroup - encryption
Algorithm string - integrity
Algorithm string - lifetime number
- diffie_
hellman_ strgroup - encryption_
algorithm str - integrity_
algorithm str - lifetime float
- diffie
Hellman StringGroup - encryption
Algorithm String - integrity
Algorithm String - lifetime Number
GetVpnIpsecTunnelIke
- Diffie
Hellman stringGroup - Encryption
Algorithm string - Integrity
Algorithm string - Lifetime double
- Diffie
Hellman stringGroup - Encryption
Algorithm string - Integrity
Algorithm string - Lifetime float64
- diffie
Hellman StringGroup - encryption
Algorithm String - integrity
Algorithm String - lifetime Double
- diffie
Hellman stringGroup - encryption
Algorithm string - integrity
Algorithm string - lifetime number
- diffie_
hellman_ strgroup - encryption_
algorithm str - integrity_
algorithm str - lifetime float
- diffie
Hellman StringGroup - encryption
Algorithm String - integrity
Algorithm String - lifetime Number
Package Details
- Repository
- ionoscloud ionos-cloud/terraform-provider-ionoscloud
- License
- Notes
- This Pulumi package is based on the
ionoscloud
Terraform Provider.