IonosCloud v0.2.3 published on Tuesday, May 13, 2025 by ionos-cloud
ionoscloud.vpn.getWireguardPeer
Explore with Pulumi AI
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:
- 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.
getWireguardPeer Result
The following output properties are available:
- Allowed
Ips 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.
Get Wireguard Peer Endpoint> - The endpoint of the WireGuard Peer.
- Gateway
Id string - Id string
- The unique ID of the WireGuard Peer.
- Name string
- The name of the WireGuard Peer.
- Public
Key string - WireGuard public key of the connecting peer.
- Status string
- The current status of the WireGuard Peer.
- Location string
- Allowed
Ips []string - The subnet CIDRs that are allowed to connect to the WireGuard Gateway.
- Description string
- The description of the WireGuard Peer.
- Endpoints
[]Get
Wireguard Peer Endpoint - The endpoint of the WireGuard Peer.
- Gateway
Id string - Id string
- The unique ID of the WireGuard Peer.
- Name string
- The name of the WireGuard Peer.
- Public
Key string - WireGuard public key of the connecting peer.
- Status string
- The current status of the WireGuard Peer.
- Location string
- allowed
Ips List<String> - The subnet CIDRs that are allowed to connect to the WireGuard Gateway.
- description String
- The description of the WireGuard Peer.
- endpoints
List<Get
Wireguard Peer Endpoint> - The endpoint of the WireGuard Peer.
- gateway
Id String - id String
- The unique ID of the WireGuard Peer.
- name String
- The name of the WireGuard Peer.
- public
Key String - WireGuard public key of the connecting peer.
- status String
- The current status of the WireGuard Peer.
- location String
- allowed
Ips string[] - The subnet CIDRs that are allowed to connect to the WireGuard Gateway.
- description string
- The description of the WireGuard Peer.
- endpoints
Get
Wireguard Peer Endpoint[] - The endpoint of the WireGuard Peer.
- gateway
Id string - id string
- The unique ID of the WireGuard Peer.
- name string
- The name of the WireGuard Peer.
- public
Key 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[Get
Wireguard Peer Endpoint] - 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
- allowed
Ips 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.
- gateway
Id String - id String
- The unique ID of the WireGuard Peer.
- name String
- The name of the WireGuard Peer.
- public
Key String - WireGuard public key of the connecting peer.
- status String
- The current status of the WireGuard Peer.
- location String
Supporting Types
GetWireguardPeerEndpoint
Package Details
- Repository
- ionoscloud ionos-cloud/pulumi-ionoscloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ionoscloud
Terraform Provider.