ionoscloud.VpnWireguardPeer
Explore with Pulumi AI
This page provides an overview of the ionoscloud.VpnWireguardPeer
resource, which allows you to manage a WireGuard Peer in your cloud infrastructure.
This resource enables the creation, management, and deletion of a WireGuard VPN Peer, facilitating secure connections between your network resources.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ionoscloud from "@pulumi/ionoscloud";
const example = new ionoscloud.VpnWireguardPeer("example", {
allowedIps: [
"10.0.0.0/8",
"192.168.1.0/24",
],
description: "An example WireGuard peer",
endpoint: {
host: "1.2.3.4",
port: 51820,
},
gatewayId: "your gateway id here",
location: "de/fra",
publicKey: "examplePublicKey==",
});
import pulumi
import pulumi_ionoscloud as ionoscloud
example = ionoscloud.VpnWireguardPeer("example",
allowed_ips=[
"10.0.0.0/8",
"192.168.1.0/24",
],
description="An example WireGuard peer",
endpoint={
"host": "1.2.3.4",
"port": 51820,
},
gateway_id="your gateway id here",
location="de/fra",
public_key="examplePublicKey==")
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.NewVpnWireguardPeer(ctx, "example", &ionoscloud.VpnWireguardPeerArgs{
AllowedIps: pulumi.StringArray{
pulumi.String("10.0.0.0/8"),
pulumi.String("192.168.1.0/24"),
},
Description: pulumi.String("An example WireGuard peer"),
Endpoint: &ionoscloud.VpnWireguardPeerEndpointArgs{
Host: pulumi.String("1.2.3.4"),
Port: pulumi.Float64(51820),
},
GatewayId: pulumi.String("your gateway id here"),
Location: pulumi.String("de/fra"),
PublicKey: pulumi.String("examplePublicKey=="),
})
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 = new Ionoscloud.VpnWireguardPeer("example", new()
{
AllowedIps = new[]
{
"10.0.0.0/8",
"192.168.1.0/24",
},
Description = "An example WireGuard peer",
Endpoint = new Ionoscloud.Inputs.VpnWireguardPeerEndpointArgs
{
Host = "1.2.3.4",
Port = 51820,
},
GatewayId = "your gateway id here",
Location = "de/fra",
PublicKey = "examplePublicKey==",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ionoscloud.VpnWireguardPeer;
import com.pulumi.ionoscloud.VpnWireguardPeerArgs;
import com.pulumi.ionoscloud.inputs.VpnWireguardPeerEndpointArgs;
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) {
var example = new VpnWireguardPeer("example", VpnWireguardPeerArgs.builder()
.allowedIps(
"10.0.0.0/8",
"192.168.1.0/24")
.description("An example WireGuard peer")
.endpoint(VpnWireguardPeerEndpointArgs.builder()
.host("1.2.3.4")
.port(51820)
.build())
.gatewayId("your gateway id here")
.location("de/fra")
.publicKey("examplePublicKey==")
.build());
}
}
resources:
example:
type: ionoscloud:VpnWireguardPeer
properties:
allowedIps:
- 10.0.0.0/8
- 192.168.1.0/24
description: An example WireGuard peer
endpoint:
host: 1.2.3.4
port: 51820
gatewayId: your gateway id here
location: de/fra
publicKey: examplePublicKey==
Create VpnWireguardPeer Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new VpnWireguardPeer(name: string, args: VpnWireguardPeerArgs, opts?: CustomResourceOptions);
@overload
def VpnWireguardPeer(resource_name: str,
args: VpnWireguardPeerArgs,
opts: Optional[ResourceOptions] = None)
@overload
def VpnWireguardPeer(resource_name: str,
opts: Optional[ResourceOptions] = None,
allowed_ips: Optional[Sequence[str]] = None,
gateway_id: Optional[str] = None,
public_key: Optional[str] = None,
description: Optional[str] = None,
endpoint: Optional[VpnWireguardPeerEndpointArgs] = None,
location: Optional[str] = None,
name: Optional[str] = None,
timeouts: Optional[VpnWireguardPeerTimeoutsArgs] = None,
vpn_wireguard_peer_id: Optional[str] = None)
func NewVpnWireguardPeer(ctx *Context, name string, args VpnWireguardPeerArgs, opts ...ResourceOption) (*VpnWireguardPeer, error)
public VpnWireguardPeer(string name, VpnWireguardPeerArgs args, CustomResourceOptions? opts = null)
public VpnWireguardPeer(String name, VpnWireguardPeerArgs args)
public VpnWireguardPeer(String name, VpnWireguardPeerArgs args, CustomResourceOptions options)
type: ionoscloud:VpnWireguardPeer
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args VpnWireguardPeerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args VpnWireguardPeerArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args VpnWireguardPeerArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args VpnWireguardPeerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args VpnWireguardPeerArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var vpnWireguardPeerResource = new Ionoscloud.VpnWireguardPeer("vpnWireguardPeerResource", new()
{
AllowedIps = new[]
{
"string",
},
GatewayId = "string",
PublicKey = "string",
Description = "string",
Endpoint = new Ionoscloud.Inputs.VpnWireguardPeerEndpointArgs
{
Host = "string",
Port = 0,
},
Location = "string",
Name = "string",
Timeouts = new Ionoscloud.Inputs.VpnWireguardPeerTimeoutsArgs
{
Create = "string",
Default = "string",
Delete = "string",
Update = "string",
},
VpnWireguardPeerId = "string",
});
example, err := ionoscloud.NewVpnWireguardPeer(ctx, "vpnWireguardPeerResource", &ionoscloud.VpnWireguardPeerArgs{
AllowedIps: pulumi.StringArray{
pulumi.String("string"),
},
GatewayId: pulumi.String("string"),
PublicKey: pulumi.String("string"),
Description: pulumi.String("string"),
Endpoint: &ionoscloud.VpnWireguardPeerEndpointArgs{
Host: pulumi.String("string"),
Port: pulumi.Float64(0),
},
Location: pulumi.String("string"),
Name: pulumi.String("string"),
Timeouts: &ionoscloud.VpnWireguardPeerTimeoutsArgs{
Create: pulumi.String("string"),
Default: pulumi.String("string"),
Delete: pulumi.String("string"),
Update: pulumi.String("string"),
},
VpnWireguardPeerId: pulumi.String("string"),
})
var vpnWireguardPeerResource = new VpnWireguardPeer("vpnWireguardPeerResource", VpnWireguardPeerArgs.builder()
.allowedIps("string")
.gatewayId("string")
.publicKey("string")
.description("string")
.endpoint(VpnWireguardPeerEndpointArgs.builder()
.host("string")
.port(0)
.build())
.location("string")
.name("string")
.timeouts(VpnWireguardPeerTimeoutsArgs.builder()
.create("string")
.default_("string")
.delete("string")
.update("string")
.build())
.vpnWireguardPeerId("string")
.build());
vpn_wireguard_peer_resource = ionoscloud.VpnWireguardPeer("vpnWireguardPeerResource",
allowed_ips=["string"],
gateway_id="string",
public_key="string",
description="string",
endpoint={
"host": "string",
"port": 0,
},
location="string",
name="string",
timeouts={
"create": "string",
"default": "string",
"delete": "string",
"update": "string",
},
vpn_wireguard_peer_id="string")
const vpnWireguardPeerResource = new ionoscloud.VpnWireguardPeer("vpnWireguardPeerResource", {
allowedIps: ["string"],
gatewayId: "string",
publicKey: "string",
description: "string",
endpoint: {
host: "string",
port: 0,
},
location: "string",
name: "string",
timeouts: {
create: "string",
"default": "string",
"delete": "string",
update: "string",
},
vpnWireguardPeerId: "string",
});
type: ionoscloud:VpnWireguardPeer
properties:
allowedIps:
- string
description: string
endpoint:
host: string
port: 0
gatewayId: string
location: string
name: string
publicKey: string
timeouts:
create: string
default: string
delete: string
update: string
vpnWireguardPeerId: string
VpnWireguardPeer Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The VpnWireguardPeer resource accepts the following input properties:
- Allowed
Ips List<string> - [list, string] A list of subnet CIDRs that are allowed to connect to the WireGuard Gateway.
- Gateway
Id string - [string] The ID of the WireGuard Gateway that the Peer will connect to.
- Public
Key string - [string] The public key for the WireGuard Gateway.
- Description string
- [string] A description of the WireGuard Gateway.
- Endpoint
Vpn
Wireguard Peer Endpoint - [block] An endpoint configuration block for the WireGuard Gateway. The structure of this block is as follows:
- Location string
- [string] The location of the WireGuard Gateway.
- Name string
- [string] The human-readable name of the WireGuard Gateway.
- Timeouts
Vpn
Wireguard Peer Timeouts - Vpn
Wireguard stringPeer Id
- Allowed
Ips []string - [list, string] A list of subnet CIDRs that are allowed to connect to the WireGuard Gateway.
- Gateway
Id string - [string] The ID of the WireGuard Gateway that the Peer will connect to.
- Public
Key string - [string] The public key for the WireGuard Gateway.
- Description string
- [string] A description of the WireGuard Gateway.
- Endpoint
Vpn
Wireguard Peer Endpoint Args - [block] An endpoint configuration block for the WireGuard Gateway. The structure of this block is as follows:
- Location string
- [string] The location of the WireGuard Gateway.
- Name string
- [string] The human-readable name of the WireGuard Gateway.
- Timeouts
Vpn
Wireguard Peer Timeouts Args - Vpn
Wireguard stringPeer Id
- allowed
Ips List<String> - [list, string] A list of subnet CIDRs that are allowed to connect to the WireGuard Gateway.
- gateway
Id String - [string] The ID of the WireGuard Gateway that the Peer will connect to.
- public
Key String - [string] The public key for the WireGuard Gateway.
- description String
- [string] A description of the WireGuard Gateway.
- endpoint
Vpn
Wireguard Peer Endpoint - [block] An endpoint configuration block for the WireGuard Gateway. The structure of this block is as follows:
- location String
- [string] The location of the WireGuard Gateway.
- name String
- [string] The human-readable name of the WireGuard Gateway.
- timeouts
Vpn
Wireguard Peer Timeouts - vpn
Wireguard StringPeer Id
- allowed
Ips string[] - [list, string] A list of subnet CIDRs that are allowed to connect to the WireGuard Gateway.
- gateway
Id string - [string] The ID of the WireGuard Gateway that the Peer will connect to.
- public
Key string - [string] The public key for the WireGuard Gateway.
- description string
- [string] A description of the WireGuard Gateway.
- endpoint
Vpn
Wireguard Peer Endpoint - [block] An endpoint configuration block for the WireGuard Gateway. The structure of this block is as follows:
- location string
- [string] The location of the WireGuard Gateway.
- name string
- [string] The human-readable name of the WireGuard Gateway.
- timeouts
Vpn
Wireguard Peer Timeouts - vpn
Wireguard stringPeer Id
- allowed_
ips Sequence[str] - [list, string] A list of subnet CIDRs that are allowed to connect to the WireGuard Gateway.
- gateway_
id str - [string] The ID of the WireGuard Gateway that the Peer will connect to.
- public_
key str - [string] The public key for the WireGuard Gateway.
- description str
- [string] A description of the WireGuard Gateway.
- endpoint
Vpn
Wireguard Peer Endpoint Args - [block] An endpoint configuration block for the WireGuard Gateway. The structure of this block is as follows:
- location str
- [string] The location of the WireGuard Gateway.
- name str
- [string] The human-readable name of the WireGuard Gateway.
- timeouts
Vpn
Wireguard Peer Timeouts Args - vpn_
wireguard_ strpeer_ id
- allowed
Ips List<String> - [list, string] A list of subnet CIDRs that are allowed to connect to the WireGuard Gateway.
- gateway
Id String - [string] The ID of the WireGuard Gateway that the Peer will connect to.
- public
Key String - [string] The public key for the WireGuard Gateway.
- description String
- [string] A description of the WireGuard Gateway.
- endpoint Property Map
- [block] An endpoint configuration block for the WireGuard Gateway. The structure of this block is as follows:
- location String
- [string] The location of the WireGuard Gateway.
- name String
- [string] The human-readable name of the WireGuard Gateway.
- timeouts Property Map
- vpn
Wireguard StringPeer Id
Outputs
All input properties are implicitly available as output properties. Additionally, the VpnWireguardPeer resource produces the following output properties:
Look up Existing VpnWireguardPeer Resource
Get an existing VpnWireguardPeer resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: VpnWireguardPeerState, opts?: CustomResourceOptions): VpnWireguardPeer
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
allowed_ips: Optional[Sequence[str]] = None,
description: Optional[str] = None,
endpoint: Optional[VpnWireguardPeerEndpointArgs] = None,
gateway_id: Optional[str] = None,
location: Optional[str] = None,
name: Optional[str] = None,
public_key: Optional[str] = None,
status: Optional[str] = None,
timeouts: Optional[VpnWireguardPeerTimeoutsArgs] = None,
vpn_wireguard_peer_id: Optional[str] = None) -> VpnWireguardPeer
func GetVpnWireguardPeer(ctx *Context, name string, id IDInput, state *VpnWireguardPeerState, opts ...ResourceOption) (*VpnWireguardPeer, error)
public static VpnWireguardPeer Get(string name, Input<string> id, VpnWireguardPeerState? state, CustomResourceOptions? opts = null)
public static VpnWireguardPeer get(String name, Output<String> id, VpnWireguardPeerState state, CustomResourceOptions options)
resources: _: type: ionoscloud:VpnWireguardPeer get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Allowed
Ips List<string> - [list, string] A list of subnet CIDRs that are allowed to connect to the WireGuard Gateway.
- Description string
- [string] A description of the WireGuard Gateway.
- Endpoint
Vpn
Wireguard Peer Endpoint - [block] An endpoint configuration block for the WireGuard Gateway. The structure of this block is as follows:
- Gateway
Id string - [string] The ID of the WireGuard Gateway that the Peer will connect to.
- Location string
- [string] The location of the WireGuard Gateway.
- Name string
- [string] The human-readable name of the WireGuard Gateway.
- Public
Key string - [string] The public key for the WireGuard Gateway.
- Status string
- The current status of the WireGuard Gateway Peer.
- Timeouts
Vpn
Wireguard Peer Timeouts - Vpn
Wireguard stringPeer Id
- Allowed
Ips []string - [list, string] A list of subnet CIDRs that are allowed to connect to the WireGuard Gateway.
- Description string
- [string] A description of the WireGuard Gateway.
- Endpoint
Vpn
Wireguard Peer Endpoint Args - [block] An endpoint configuration block for the WireGuard Gateway. The structure of this block is as follows:
- Gateway
Id string - [string] The ID of the WireGuard Gateway that the Peer will connect to.
- Location string
- [string] The location of the WireGuard Gateway.
- Name string
- [string] The human-readable name of the WireGuard Gateway.
- Public
Key string - [string] The public key for the WireGuard Gateway.
- Status string
- The current status of the WireGuard Gateway Peer.
- Timeouts
Vpn
Wireguard Peer Timeouts Args - Vpn
Wireguard stringPeer Id
- allowed
Ips List<String> - [list, string] A list of subnet CIDRs that are allowed to connect to the WireGuard Gateway.
- description String
- [string] A description of the WireGuard Gateway.
- endpoint
Vpn
Wireguard Peer Endpoint - [block] An endpoint configuration block for the WireGuard Gateway. The structure of this block is as follows:
- gateway
Id String - [string] The ID of the WireGuard Gateway that the Peer will connect to.
- location String
- [string] The location of the WireGuard Gateway.
- name String
- [string] The human-readable name of the WireGuard Gateway.
- public
Key String - [string] The public key for the WireGuard Gateway.
- status String
- The current status of the WireGuard Gateway Peer.
- timeouts
Vpn
Wireguard Peer Timeouts - vpn
Wireguard StringPeer Id
- allowed
Ips string[] - [list, string] A list of subnet CIDRs that are allowed to connect to the WireGuard Gateway.
- description string
- [string] A description of the WireGuard Gateway.
- endpoint
Vpn
Wireguard Peer Endpoint - [block] An endpoint configuration block for the WireGuard Gateway. The structure of this block is as follows:
- gateway
Id string - [string] The ID of the WireGuard Gateway that the Peer will connect to.
- location string
- [string] The location of the WireGuard Gateway.
- name string
- [string] The human-readable name of the WireGuard Gateway.
- public
Key string - [string] The public key for the WireGuard Gateway.
- status string
- The current status of the WireGuard Gateway Peer.
- timeouts
Vpn
Wireguard Peer Timeouts - vpn
Wireguard stringPeer Id
- allowed_
ips Sequence[str] - [list, string] A list of subnet CIDRs that are allowed to connect to the WireGuard Gateway.
- description str
- [string] A description of the WireGuard Gateway.
- endpoint
Vpn
Wireguard Peer Endpoint Args - [block] An endpoint configuration block for the WireGuard Gateway. The structure of this block is as follows:
- gateway_
id str - [string] The ID of the WireGuard Gateway that the Peer will connect to.
- location str
- [string] The location of the WireGuard Gateway.
- name str
- [string] The human-readable name of the WireGuard Gateway.
- public_
key str - [string] The public key for the WireGuard Gateway.
- status str
- The current status of the WireGuard Gateway Peer.
- timeouts
Vpn
Wireguard Peer Timeouts Args - vpn_
wireguard_ strpeer_ id
- allowed
Ips List<String> - [list, string] A list of subnet CIDRs that are allowed to connect to the WireGuard Gateway.
- description String
- [string] A description of the WireGuard Gateway.
- endpoint Property Map
- [block] An endpoint configuration block for the WireGuard Gateway. The structure of this block is as follows:
- gateway
Id String - [string] The ID of the WireGuard Gateway that the Peer will connect to.
- location String
- [string] The location of the WireGuard Gateway.
- name String
- [string] The human-readable name of the WireGuard Gateway.
- public
Key String - [string] The public key for the WireGuard Gateway.
- status String
- The current status of the WireGuard Gateway Peer.
- timeouts Property Map
- vpn
Wireguard StringPeer Id
Supporting Types
VpnWireguardPeerEndpoint, VpnWireguardPeerEndpointArgs
VpnWireguardPeerTimeouts, VpnWireguardPeerTimeoutsArgs
Import
WireGuard Peers can be imported using the gateway_id
and id
, e.g.,
$ pulumi import ionoscloud:index/vpnWireguardPeer:VpnWireguardPeer example gateway_id:peer_id
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- ionoscloud ionos-cloud/terraform-provider-ionoscloud
- License
- Notes
- This Pulumi package is based on the
ionoscloud
Terraform Provider.