1. Packages
  2. Ionoscloud
  3. API Docs
  4. vpn
  5. getWireguardGateway
IonosCloud v0.2.3 published on Tuesday, May 13, 2025 by ionos-cloud

ionoscloud.vpn.getWireguardGateway

Explore with Pulumi AI

ionoscloud logo
IonosCloud v0.2.3 published on Tuesday, May 13, 2025 by ionos-cloud

    The ionoscloud.vpn.WireguardGateway data source provides information about a specific IonosCloud VPN WireGuard Gateway. You can use this data source to retrieve details of a WireGuard Gateway for use in other resources and configurations.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ionoscloud from "@pulumi/ionoscloud";
    
    const example = ionoscloud.vpn.getWireguardGateway({
        location: "de/fra",
        name: "example-gateway",
    });
    export const vpnWireguardGatewayPublicKey = exampleVpnWireguardGateway.publicKey;
    
    import pulumi
    import pulumi_ionoscloud as ionoscloud
    
    example = ionoscloud.vpn.get_wireguard_gateway(location="de/fra",
        name="example-gateway")
    pulumi.export("vpnWireguardGatewayPublicKey", example_vpn_wireguard_gateway["publicKey"])
    
    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.LookupWireguardGateway(ctx, &vpn.LookupWireguardGatewayArgs{
    			Location: pulumi.StringRef("de/fra"),
    			Name:     pulumi.StringRef("example-gateway"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("vpnWireguardGatewayPublicKey", exampleVpnWireguardGateway.PublicKey)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ionoscloud = Pulumi.Ionoscloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Ionoscloud.Vpn.GetWireguardGateway.Invoke(new()
        {
            Location = "de/fra",
            Name = "example-gateway",
        });
    
        return new Dictionary<string, object?>
        {
            ["vpnWireguardGatewayPublicKey"] = exampleVpnWireguardGateway.PublicKey,
        };
    });
    
    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.GetWireguardGatewayArgs;
    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.getWireguardGateway(GetWireguardGatewayArgs.builder()
                .location("de/fra")
                .name("example-gateway")
                .build());
    
            ctx.export("vpnWireguardGatewayPublicKey", exampleVpnWireguardGateway.publicKey());
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: ionoscloud:vpn:getWireguardGateway
          arguments:
            location: de/fra
            name: example-gateway
    outputs:
      vpnWireguardGatewayPublicKey: ${exampleVpnWireguardGateway.publicKey}
    

    Using getWireguardGateway

    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 getWireguardGateway(args: GetWireguardGatewayArgs, opts?: InvokeOptions): Promise<GetWireguardGatewayResult>
    function getWireguardGatewayOutput(args: GetWireguardGatewayOutputArgs, opts?: InvokeOptions): Output<GetWireguardGatewayResult>
    def get_wireguard_gateway(description: Optional[str] = None,
                              id: Optional[str] = None,
                              location: Optional[str] = None,
                              name: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetWireguardGatewayResult
    def get_wireguard_gateway_output(description: 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[GetWireguardGatewayResult]
    func LookupWireguardGateway(ctx *Context, args *LookupWireguardGatewayArgs, opts ...InvokeOption) (*LookupWireguardGatewayResult, error)
    func LookupWireguardGatewayOutput(ctx *Context, args *LookupWireguardGatewayOutputArgs, opts ...InvokeOption) LookupWireguardGatewayResultOutput

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

    public static class GetWireguardGateway 
    {
        public static Task<GetWireguardGatewayResult> InvokeAsync(GetWireguardGatewayArgs args, InvokeOptions? opts = null)
        public static Output<GetWireguardGatewayResult> Invoke(GetWireguardGatewayInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetWireguardGatewayResult> getWireguardGateway(GetWireguardGatewayArgs args, InvokeOptions options)
    public static Output<GetWireguardGatewayResult> getWireguardGateway(GetWireguardGatewayArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ionoscloud:vpn/getWireguardGateway:getWireguardGateway
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Description string
    The description of the WireGuard Gateway.
    Id string
    [String] The ID of the WireGuard Gateway.
    Location string
    [String] The location of the WireGuard Gateway.
    Name string
    [String] The name of the WireGuard Gateway.
    Description string
    The description of the WireGuard Gateway.
    Id string
    [String] The ID of the WireGuard Gateway.
    Location string
    [String] The location of the WireGuard Gateway.
    Name string
    [String] The name of the WireGuard Gateway.
    description String
    The description of the WireGuard Gateway.
    id String
    [String] The ID of the WireGuard Gateway.
    location String
    [String] The location of the WireGuard Gateway.
    name String
    [String] The name of the WireGuard Gateway.
    description string
    The description of the WireGuard Gateway.
    id string
    [String] The ID of the WireGuard Gateway.
    location string
    [String] The location of the WireGuard Gateway.
    name string
    [String] The name of the WireGuard Gateway.
    description str
    The description of the WireGuard Gateway.
    id str
    [String] The ID of the WireGuard Gateway.
    location str
    [String] The location of the WireGuard Gateway.
    name str
    [String] The name of the WireGuard Gateway.
    description String
    The description of the WireGuard Gateway.
    id String
    [String] The ID of the WireGuard Gateway.
    location String
    [String] The location of the WireGuard Gateway.
    name String
    [String] The name of the WireGuard Gateway.

    getWireguardGateway Result

    The following output properties are available:

    Connections List<Ionoscloud.GetWireguardGatewayConnection>
    A list of connection configurations for the WireGuard Gateway. Each connections block contains:
    GatewayIp string
    The IP address of the WireGuard Gateway.
    Id string
    InterfaceIpv4Cidr string
    The IPv4 CIDR for the WireGuard Gateway interface.
    InterfaceIpv6Cidr string
    The IPv6 CIDR for the WireGuard Gateway interface.
    ListenPort int
    MaintenanceWindows List<Ionoscloud.GetWireguardGatewayMaintenanceWindow>
    A weekly 4 hour-long window, during which maintenance might occur.
    Name string
    PublicKey string
    The public key for the WireGuard Gateway.
    Status string
    The current status of the WireGuard Gateway.
    Tier string
    Gateway performance options.
    Description string
    The description of the WireGuard Gateway.
    Location string
    Connections []GetWireguardGatewayConnection
    A list of connection configurations for the WireGuard Gateway. Each connections block contains:
    GatewayIp string
    The IP address of the WireGuard Gateway.
    Id string
    InterfaceIpv4Cidr string
    The IPv4 CIDR for the WireGuard Gateway interface.
    InterfaceIpv6Cidr string
    The IPv6 CIDR for the WireGuard Gateway interface.
    ListenPort int
    MaintenanceWindows []GetWireguardGatewayMaintenanceWindow
    A weekly 4 hour-long window, during which maintenance might occur.
    Name string
    PublicKey string
    The public key for the WireGuard Gateway.
    Status string
    The current status of the WireGuard Gateway.
    Tier string
    Gateway performance options.
    Description string
    The description of the WireGuard Gateway.
    Location string
    connections List<GetWireguardGatewayConnection>
    A list of connection configurations for the WireGuard Gateway. Each connections block contains:
    gatewayIp String
    The IP address of the WireGuard Gateway.
    id String
    interfaceIpv4Cidr String
    The IPv4 CIDR for the WireGuard Gateway interface.
    interfaceIpv6Cidr String
    The IPv6 CIDR for the WireGuard Gateway interface.
    listenPort Integer
    maintenanceWindows List<GetWireguardGatewayMaintenanceWindow>
    A weekly 4 hour-long window, during which maintenance might occur.
    name String
    publicKey String
    The public key for the WireGuard Gateway.
    status String
    The current status of the WireGuard Gateway.
    tier String
    Gateway performance options.
    description String
    The description of the WireGuard Gateway.
    location String
    connections GetWireguardGatewayConnection[]
    A list of connection configurations for the WireGuard Gateway. Each connections block contains:
    gatewayIp string
    The IP address of the WireGuard Gateway.
    id string
    interfaceIpv4Cidr string
    The IPv4 CIDR for the WireGuard Gateway interface.
    interfaceIpv6Cidr string
    The IPv6 CIDR for the WireGuard Gateway interface.
    listenPort number
    maintenanceWindows GetWireguardGatewayMaintenanceWindow[]
    A weekly 4 hour-long window, during which maintenance might occur.
    name string
    publicKey string
    The public key for the WireGuard Gateway.
    status string
    The current status of the WireGuard Gateway.
    tier string
    Gateway performance options.
    description string
    The description of the WireGuard Gateway.
    location string
    connections Sequence[GetWireguardGatewayConnection]
    A list of connection configurations for the WireGuard Gateway. Each connections block contains:
    gateway_ip str
    The IP address of the WireGuard Gateway.
    id str
    interface_ipv4_cidr str
    The IPv4 CIDR for the WireGuard Gateway interface.
    interface_ipv6_cidr str
    The IPv6 CIDR for the WireGuard Gateway interface.
    listen_port int
    maintenance_windows Sequence[GetWireguardGatewayMaintenanceWindow]
    A weekly 4 hour-long window, during which maintenance might occur.
    name str
    public_key str
    The public key for the WireGuard Gateway.
    status str
    The current status of the WireGuard Gateway.
    tier str
    Gateway performance options.
    description str
    The description of the WireGuard Gateway.
    location str
    connections List<Property Map>
    A list of connection configurations for the WireGuard Gateway. Each connections block contains:
    gatewayIp String
    The IP address of the WireGuard Gateway.
    id String
    interfaceIpv4Cidr String
    The IPv4 CIDR for the WireGuard Gateway interface.
    interfaceIpv6Cidr String
    The IPv6 CIDR for the WireGuard Gateway interface.
    listenPort Number
    maintenanceWindows List<Property Map>
    A weekly 4 hour-long window, during which maintenance might occur.
    name String
    publicKey String
    The public key for the WireGuard Gateway.
    status String
    The current status of the WireGuard Gateway.
    tier String
    Gateway performance options.
    description String
    The description of the WireGuard Gateway.
    location String

    Supporting Types

    GetWireguardGatewayConnection

    DatacenterId string
    The ID of the datacenter where the WireGuard Gateway is located.
    Ipv4Cidr string
    The IPv4 CIDR for the WireGuard Gateway connection.
    Ipv6Cidr string
    The IPv6 CIDR for the WireGuard Gateway connection.
    LanId string
    The ID of the LAN where the WireGuard Gateway is connected.
    DatacenterId string
    The ID of the datacenter where the WireGuard Gateway is located.
    Ipv4Cidr string
    The IPv4 CIDR for the WireGuard Gateway connection.
    Ipv6Cidr string
    The IPv6 CIDR for the WireGuard Gateway connection.
    LanId string
    The ID of the LAN where the WireGuard Gateway is connected.
    datacenterId String
    The ID of the datacenter where the WireGuard Gateway is located.
    ipv4Cidr String
    The IPv4 CIDR for the WireGuard Gateway connection.
    ipv6Cidr String
    The IPv6 CIDR for the WireGuard Gateway connection.
    lanId String
    The ID of the LAN where the WireGuard Gateway is connected.
    datacenterId string
    The ID of the datacenter where the WireGuard Gateway is located.
    ipv4Cidr string
    The IPv4 CIDR for the WireGuard Gateway connection.
    ipv6Cidr string
    The IPv6 CIDR for the WireGuard Gateway connection.
    lanId string
    The ID of the LAN where the WireGuard Gateway is connected.
    datacenter_id str
    The ID of the datacenter where the WireGuard Gateway is located.
    ipv4_cidr str
    The IPv4 CIDR for the WireGuard Gateway connection.
    ipv6_cidr str
    The IPv6 CIDR for the WireGuard Gateway connection.
    lan_id str
    The ID of the LAN where the WireGuard Gateway is connected.
    datacenterId String
    The ID of the datacenter where the WireGuard Gateway is located.
    ipv4Cidr String
    The IPv4 CIDR for the WireGuard Gateway connection.
    ipv6Cidr String
    The IPv6 CIDR for the WireGuard Gateway connection.
    lanId String
    The ID of the LAN where the WireGuard Gateway is connected.

    GetWireguardGatewayMaintenanceWindow

    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.3 published on Tuesday, May 13, 2025 by ionos-cloud