1. Packages
  2. Ionoscloud Provider
  3. API Docs
  4. getVpnWireguardPeer
ionoscloud 6.7.6 published on Monday, Apr 14, 2025 by ionos-cloud

ionoscloud.getVpnWireguardPeer

Explore with Pulumi AI

ionoscloud logo
ionoscloud 6.7.6 published on Monday, Apr 14, 2025 by ionos-cloud

    The ionoscloud.VpnWireguardGateway 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.getVpnWireguardPeer({
        location: "de/fra",
        gatewayId: "example-gateway",
        name: "example-peer",
    });
    export const vpnWireguardPeerPublicKey = data.vpn_wireguard_peer.example.public_key;
    
    import pulumi
    import pulumi_ionoscloud as ionoscloud
    
    example = ionoscloud.get_vpn_wireguard_peer(location="de/fra",
        gateway_id="example-gateway",
        name="example-peer")
    pulumi.export("vpnWireguardPeerPublicKey", data["vpn_wireguard_peer"]["example"]["public_key"])
    
    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.LookupVpnWireguardPeer(ctx, &ionoscloud.LookupVpnWireguardPeerArgs{
    			Location:  pulumi.StringRef("de/fra"),
    			GatewayId: "example-gateway",
    			Name:      pulumi.StringRef("example-peer"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("vpnWireguardPeerPublicKey", data.Vpn_wireguard_peer.Example.Public_key)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ionoscloud = Pulumi.Ionoscloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Ionoscloud.GetVpnWireguardPeer.Invoke(new()
        {
            Location = "de/fra",
            GatewayId = "example-gateway",
            Name = "example-peer",
        });
    
        return new Dictionary<string, object?>
        {
            ["vpnWireguardPeerPublicKey"] = data.Vpn_wireguard_peer.Example.Public_key,
        };
    });
    
    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.GetVpnWireguardPeerArgs;
    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.getVpnWireguardPeer(GetVpnWireguardPeerArgs.builder()
                .location("de/fra")
                .gatewayId("example-gateway")
                .name("example-peer")
                .build());
    
            ctx.export("vpnWireguardPeerPublicKey", data.vpn_wireguard_peer().example().public_key());
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: ionoscloud:getVpnWireguardPeer
          arguments:
            location: de/fra
            gatewayId: example-gateway
            name: example-peer
    outputs:
      vpnWireguardPeerPublicKey: ${data.vpn_wireguard_peer.example.public_key}
    

    Using getVpnWireguardPeer

    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 getVpnWireguardPeer(args: GetVpnWireguardPeerArgs, opts?: InvokeOptions): Promise<GetVpnWireguardPeerResult>
    function getVpnWireguardPeerOutput(args: GetVpnWireguardPeerOutputArgs, opts?: InvokeOptions): Output<GetVpnWireguardPeerResult>
    def get_vpn_wireguard_peer(gateway_id: Optional[str] = None,
                               id: Optional[str] = None,
                               location: Optional[str] = None,
                               name: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetVpnWireguardPeerResult
    def get_vpn_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[GetVpnWireguardPeerResult]
    func LookupVpnWireguardPeer(ctx *Context, args *LookupVpnWireguardPeerArgs, opts ...InvokeOption) (*LookupVpnWireguardPeerResult, error)
    func LookupVpnWireguardPeerOutput(ctx *Context, args *LookupVpnWireguardPeerOutputArgs, opts ...InvokeOption) LookupVpnWireguardPeerResultOutput

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

    public static class GetVpnWireguardPeer 
    {
        public static Task<GetVpnWireguardPeerResult> InvokeAsync(GetVpnWireguardPeerArgs args, InvokeOptions? opts = null)
        public static Output<GetVpnWireguardPeerResult> Invoke(GetVpnWireguardPeerInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetVpnWireguardPeerResult> getVpnWireguardPeer(GetVpnWireguardPeerArgs args, InvokeOptions options)
    public static Output<GetVpnWireguardPeerResult> getVpnWireguardPeer(GetVpnWireguardPeerArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ionoscloud:index/getVpnWireguardPeer:getVpnWireguardPeer
      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.

    getVpnWireguardPeer 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<GetVpnWireguardPeerEndpoint>
    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 []GetVpnWireguardPeerEndpoint
    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<GetVpnWireguardPeerEndpoint>
    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 GetVpnWireguardPeerEndpoint[]
    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[GetVpnWireguardPeerEndpoint]
    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

    GetVpnWireguardPeerEndpoint

    Host string
    Hostname or IPV4 address that the WireGuard Server will connect to.
    Port double
    Port that the WireGuard Server will connect to. Default: 51820
    Host string
    Hostname or IPV4 address that the WireGuard Server will connect to.
    Port float64
    Port that the WireGuard Server will connect to. Default: 51820
    host String
    Hostname or IPV4 address that the WireGuard Server will connect to.
    port Double
    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 float
    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/terraform-provider-ionoscloud
    License
    Notes
    This Pulumi package is based on the ionoscloud Terraform Provider.
    ionoscloud logo
    ionoscloud 6.7.6 published on Monday, Apr 14, 2025 by ionos-cloud