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

ionoscloud.vpn.getWireguardPeer

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.getWireguardPeer({
        location: "de/fra",
        gatewayId: "example-gateway",
        name: "example-peer",
    });
    export const vpnWireguardPeerPublicKey = exampleVpnWireguardPeer.publicKey;
    
    import pulumi
    import pulumi_ionoscloud as ionoscloud
    
    example = ionoscloud.vpn.get_wireguard_peer(location="de/fra",
        gateway_id="example-gateway",
        name="example-peer")
    pulumi.export("vpnWireguardPeerPublicKey", example_vpn_wireguard_peer["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.LookupWireguardPeer(ctx, &vpn.LookupWireguardPeerArgs{
    			Location:  pulumi.StringRef("de/fra"),
    			GatewayId: "example-gateway",
    			Name:      pulumi.StringRef("example-peer"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("vpnWireguardPeerPublicKey", exampleVpnWireguardPeer.PublicKey)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ionoscloud = Pulumi.Ionoscloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Ionoscloud.Vpn.GetWireguardPeer.Invoke(new()
        {
            Location = "de/fra",
            GatewayId = "example-gateway",
            Name = "example-peer",
        });
    
        return new Dictionary<string, object?>
        {
            ["vpnWireguardPeerPublicKey"] = exampleVpnWireguardPeer.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.GetWireguardPeerArgs;
    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.getWireguardPeer(GetWireguardPeerArgs.builder()
                .location("de/fra")
                .gatewayId("example-gateway")
                .name("example-peer")
                .build());
    
            ctx.export("vpnWireguardPeerPublicKey", exampleVpnWireguardPeer.publicKey());
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: ionoscloud:vpn:getWireguardPeer
          arguments:
            location: de/fra
            gatewayId: example-gateway
            name: example-peer
    outputs:
      vpnWireguardPeerPublicKey: ${exampleVpnWireguardPeer.publicKey}
    

    Using getWireguardPeer

    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 getWireguardPeer(args: GetWireguardPeerArgs, opts?: InvokeOptions): Promise<GetWireguardPeerResult>
    function getWireguardPeerOutput(args: GetWireguardPeerOutputArgs, opts?: InvokeOptions): Output<GetWireguardPeerResult>
    def get_wireguard_peer(gateway_id: Optional[str] = None,
                           id: Optional[str] = None,
                           location: Optional[str] = None,
                           name: Optional[str] = None,
                           opts: Optional[InvokeOptions] = None) -> GetWireguardPeerResult
    def get_wireguard_peer_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[GetWireguardPeerResult]
    func LookupWireguardPeer(ctx *Context, args *LookupWireguardPeerArgs, opts ...InvokeOption) (*LookupWireguardPeerResult, error)
    func LookupWireguardPeerOutput(ctx *Context, args *LookupWireguardPeerOutputArgs, opts ...InvokeOption) LookupWireguardPeerResultOutput

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

    public static class GetWireguardPeer 
    {
        public static Task<GetWireguardPeerResult> InvokeAsync(GetWireguardPeerArgs args, InvokeOptions? opts = null)
        public static Output<GetWireguardPeerResult> Invoke(GetWireguardPeerInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetWireguardPeerResult> getWireguardPeer(GetWireguardPeerArgs args, InvokeOptions options)
    public static Output<GetWireguardPeerResult> getWireguardPeer(GetWireguardPeerArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ionoscloud:vpn/getWireguardPeer:getWireguardPeer
      arguments:
        # arguments dictionary

    The following arguments are supported:

    GatewayId string
    [String] The ID of the WireGuard Gateway.
    Id string
    [String] The ID of the WireGuard Peer.
    Location string
    [String] The location of the WireGuard Gateway.
    Name string
    [String] The name of the WireGuard Peer.
    GatewayId string
    [String] The ID of the WireGuard Gateway.
    Id string
    [String] The ID of the WireGuard Peer.
    Location string
    [String] The location of the WireGuard Gateway.
    Name string
    [String] The name of the WireGuard Peer.
    gatewayId String
    [String] The ID of the WireGuard Gateway.
    id String
    [String] The ID of the WireGuard Peer.
    location String
    [String] The location of the WireGuard Gateway.
    name String
    [String] The name of the WireGuard Peer.
    gatewayId string
    [String] The ID of the WireGuard Gateway.
    id string
    [String] The ID of the WireGuard Peer.
    location string
    [String] The location of the WireGuard Gateway.
    name string
    [String] The name of the WireGuard Peer.
    gateway_id str
    [String] The ID of the WireGuard Gateway.
    id str
    [String] The ID of the WireGuard Peer.
    location str
    [String] The location of the WireGuard Gateway.
    name str
    [String] The name of the WireGuard Peer.
    gatewayId String
    [String] The ID of the WireGuard Gateway.
    id String
    [String] The ID of the WireGuard Peer.
    location String
    [String] The location of the WireGuard Gateway.
    name String
    [String] The name of the WireGuard Peer.

    getWireguardPeer Result

    The following output properties are available:

    AllowedIps List<string>
    The subnet CIDRs that are allowed to connect to the WireGuard Gateway.
    Description string
    The description of the WireGuard Peer.
    Endpoints List<Ionoscloud.GetWireguardPeerEndpoint>
    The endpoint of the WireGuard Peer.
    GatewayId string
    Id string
    The unique ID of the WireGuard Peer.
    Name string
    The name of the WireGuard Peer.
    PublicKey string
    WireGuard public key of the connecting peer.
    Status string
    The current status of the WireGuard Peer.
    Location string
    AllowedIps []string
    The subnet CIDRs that are allowed to connect to the WireGuard Gateway.
    Description string
    The description of the WireGuard Peer.
    Endpoints []GetWireguardPeerEndpoint
    The endpoint of the WireGuard Peer.
    GatewayId string
    Id string
    The unique ID of the WireGuard Peer.
    Name string
    The name of the WireGuard Peer.
    PublicKey string
    WireGuard public key of the connecting peer.
    Status string
    The current status of the WireGuard Peer.
    Location string
    allowedIps List<String>
    The subnet CIDRs that are allowed to connect to the WireGuard Gateway.
    description String
    The description of the WireGuard Peer.
    endpoints List<GetWireguardPeerEndpoint>
    The endpoint of the WireGuard Peer.
    gatewayId String
    id String
    The unique ID of the WireGuard Peer.
    name String
    The name of the WireGuard Peer.
    publicKey String
    WireGuard public key of the connecting peer.
    status String
    The current status of the WireGuard Peer.
    location String
    allowedIps string[]
    The subnet CIDRs that are allowed to connect to the WireGuard Gateway.
    description string
    The description of the WireGuard Peer.
    endpoints GetWireguardPeerEndpoint[]
    The endpoint of the WireGuard Peer.
    gatewayId string
    id string
    The unique ID of the WireGuard Peer.
    name string
    The name of the WireGuard Peer.
    publicKey string
    WireGuard public key of the connecting peer.
    status string
    The current status of the WireGuard Peer.
    location string
    allowed_ips Sequence[str]
    The subnet CIDRs that are allowed to connect to the WireGuard Gateway.
    description str
    The description of the WireGuard Peer.
    endpoints Sequence[GetWireguardPeerEndpoint]
    The endpoint of the WireGuard Peer.
    gateway_id str
    id str
    The unique ID of the WireGuard Peer.
    name str
    The name of the WireGuard Peer.
    public_key str
    WireGuard public key of the connecting peer.
    status str
    The current status of the WireGuard Peer.
    location str
    allowedIps List<String>
    The subnet CIDRs that are allowed to connect to the WireGuard Gateway.
    description String
    The description of the WireGuard Peer.
    endpoints List<Property Map>
    The endpoint of the WireGuard Peer.
    gatewayId String
    id String
    The unique ID of the WireGuard Peer.
    name String
    The name of the WireGuard Peer.
    publicKey String
    WireGuard public key of the connecting peer.
    status String
    The current status of the WireGuard Peer.
    location String

    Supporting Types

    GetWireguardPeerEndpoint

    Host string
    Hostname or IPV4 address that the WireGuard Server will connect to.
    Port int
    Port that the WireGuard Server will connect to. Default: 51820
    Host string
    Hostname or IPV4 address that the WireGuard Server will connect to.
    Port int
    Port that the WireGuard Server will connect to. Default: 51820
    host String
    Hostname or IPV4 address that the WireGuard Server will connect to.
    port Integer
    Port that the WireGuard Server will connect to. Default: 51820
    host string
    Hostname or IPV4 address that the WireGuard Server will connect to.
    port number
    Port that the WireGuard Server will connect to. Default: 51820
    host str
    Hostname or IPV4 address that the WireGuard Server will connect to.
    port int
    Port that the WireGuard Server will connect to. Default: 51820
    host String
    Hostname or IPV4 address that the WireGuard Server will connect to.
    port Number
    Port that the WireGuard Server will connect to. Default: 51820

    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