1. Packages
  2. Lxd Provider
  3. API Docs
  4. NetworkPeer
lxd 2.5.0 published on Thursday, Mar 13, 2025 by terraform-lxd

lxd.NetworkPeer

Explore with Pulumi AI

Create NetworkPeer Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new NetworkPeer(name: string, args: NetworkPeerArgs, opts?: CustomResourceOptions);
@overload
def NetworkPeer(resource_name: str,
                args: NetworkPeerArgs,
                opts: Optional[ResourceOptions] = None)

@overload
def NetworkPeer(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                source_network: Optional[str] = None,
                target_network: Optional[str] = None,
                config: Optional[Mapping[str, str]] = None,
                description: Optional[str] = None,
                name: Optional[str] = None,
                remote: Optional[str] = None,
                source_project: Optional[str] = None,
                target_project: Optional[str] = None)
func NewNetworkPeer(ctx *Context, name string, args NetworkPeerArgs, opts ...ResourceOption) (*NetworkPeer, error)
public NetworkPeer(string name, NetworkPeerArgs args, CustomResourceOptions? opts = null)
public NetworkPeer(String name, NetworkPeerArgs args)
public NetworkPeer(String name, NetworkPeerArgs args, CustomResourceOptions options)
type: lxd:NetworkPeer
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. NetworkPeerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. NetworkPeerArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. NetworkPeerArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. NetworkPeerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. NetworkPeerArgs
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 networkPeerResource = new Lxd.NetworkPeer("networkPeerResource", new()
{
    SourceNetwork = "string",
    TargetNetwork = "string",
    Config = 
    {
        { "string", "string" },
    },
    Description = "string",
    Name = "string",
    Remote = "string",
    SourceProject = "string",
    TargetProject = "string",
});
Copy
example, err := lxd.NewNetworkPeer(ctx, "networkPeerResource", &lxd.NetworkPeerArgs{
SourceNetwork: pulumi.String("string"),
TargetNetwork: pulumi.String("string"),
Config: pulumi.StringMap{
"string": pulumi.String("string"),
},
Description: pulumi.String("string"),
Name: pulumi.String("string"),
Remote: pulumi.String("string"),
SourceProject: pulumi.String("string"),
TargetProject: pulumi.String("string"),
})
Copy
var networkPeerResource = new NetworkPeer("networkPeerResource", NetworkPeerArgs.builder()
    .sourceNetwork("string")
    .targetNetwork("string")
    .config(Map.of("string", "string"))
    .description("string")
    .name("string")
    .remote("string")
    .sourceProject("string")
    .targetProject("string")
    .build());
Copy
network_peer_resource = lxd.NetworkPeer("networkPeerResource",
    source_network="string",
    target_network="string",
    config={
        "string": "string",
    },
    description="string",
    name="string",
    remote="string",
    source_project="string",
    target_project="string")
Copy
const networkPeerResource = new lxd.NetworkPeer("networkPeerResource", {
    sourceNetwork: "string",
    targetNetwork: "string",
    config: {
        string: "string",
    },
    description: "string",
    name: "string",
    remote: "string",
    sourceProject: "string",
    targetProject: "string",
});
Copy
type: lxd:NetworkPeer
properties:
    config:
        string: string
    description: string
    name: string
    remote: string
    sourceNetwork: string
    sourceProject: string
    targetNetwork: string
    targetProject: string
Copy

NetworkPeer 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 NetworkPeer resource accepts the following input properties:

SourceNetwork This property is required. string
Required - Name of the source network.
TargetNetwork This property is required. string
Required - Name of the target network.
Config Dictionary<string, string>
Optional - Map of key/value pairs of network peer config settings.
Description string
Optional - Description of the network peer.
Name string
Required - Name of the network peer.
Remote string
Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
SourceProject string
Optional - Name of the source network project. Defaults to default.
TargetProject string
Optional - Name of the target network project. Defaults to value of the source_project field.
SourceNetwork This property is required. string
Required - Name of the source network.
TargetNetwork This property is required. string
Required - Name of the target network.
Config map[string]string
Optional - Map of key/value pairs of network peer config settings.
Description string
Optional - Description of the network peer.
Name string
Required - Name of the network peer.
Remote string
Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
SourceProject string
Optional - Name of the source network project. Defaults to default.
TargetProject string
Optional - Name of the target network project. Defaults to value of the source_project field.
sourceNetwork This property is required. String
Required - Name of the source network.
targetNetwork This property is required. String
Required - Name of the target network.
config Map<String,String>
Optional - Map of key/value pairs of network peer config settings.
description String
Optional - Description of the network peer.
name String
Required - Name of the network peer.
remote String
Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
sourceProject String
Optional - Name of the source network project. Defaults to default.
targetProject String
Optional - Name of the target network project. Defaults to value of the source_project field.
sourceNetwork This property is required. string
Required - Name of the source network.
targetNetwork This property is required. string
Required - Name of the target network.
config {[key: string]: string}
Optional - Map of key/value pairs of network peer config settings.
description string
Optional - Description of the network peer.
name string
Required - Name of the network peer.
remote string
Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
sourceProject string
Optional - Name of the source network project. Defaults to default.
targetProject string
Optional - Name of the target network project. Defaults to value of the source_project field.
source_network This property is required. str
Required - Name of the source network.
target_network This property is required. str
Required - Name of the target network.
config Mapping[str, str]
Optional - Map of key/value pairs of network peer config settings.
description str
Optional - Description of the network peer.
name str
Required - Name of the network peer.
remote str
Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
source_project str
Optional - Name of the source network project. Defaults to default.
target_project str
Optional - Name of the target network project. Defaults to value of the source_project field.
sourceNetwork This property is required. String
Required - Name of the source network.
targetNetwork This property is required. String
Required - Name of the target network.
config Map<String>
Optional - Map of key/value pairs of network peer config settings.
description String
Optional - Description of the network peer.
name String
Required - Name of the network peer.
remote String
Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
sourceProject String
Optional - Name of the source network project. Defaults to default.
targetProject String
Optional - Name of the target network project. Defaults to value of the source_project field.

Outputs

All input properties are implicitly available as output properties. Additionally, the NetworkPeer resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Status string
Network peer status
Id string
The provider-assigned unique ID for this managed resource.
Status string
Network peer status
id String
The provider-assigned unique ID for this managed resource.
status String
Network peer status
id string
The provider-assigned unique ID for this managed resource.
status string
Network peer status
id str
The provider-assigned unique ID for this managed resource.
status str
Network peer status
id String
The provider-assigned unique ID for this managed resource.
status String
Network peer status

Look up Existing NetworkPeer Resource

Get an existing NetworkPeer 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?: NetworkPeerState, opts?: CustomResourceOptions): NetworkPeer
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        config: Optional[Mapping[str, str]] = None,
        description: Optional[str] = None,
        name: Optional[str] = None,
        remote: Optional[str] = None,
        source_network: Optional[str] = None,
        source_project: Optional[str] = None,
        status: Optional[str] = None,
        target_network: Optional[str] = None,
        target_project: Optional[str] = None) -> NetworkPeer
func GetNetworkPeer(ctx *Context, name string, id IDInput, state *NetworkPeerState, opts ...ResourceOption) (*NetworkPeer, error)
public static NetworkPeer Get(string name, Input<string> id, NetworkPeerState? state, CustomResourceOptions? opts = null)
public static NetworkPeer get(String name, Output<String> id, NetworkPeerState state, CustomResourceOptions options)
resources:  _:    type: lxd:NetworkPeer    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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.
The following state arguments are supported:
Config Dictionary<string, string>
Optional - Map of key/value pairs of network peer config settings.
Description string
Optional - Description of the network peer.
Name string
Required - Name of the network peer.
Remote string
Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
SourceNetwork string
Required - Name of the source network.
SourceProject string
Optional - Name of the source network project. Defaults to default.
Status string
Network peer status
TargetNetwork string
Required - Name of the target network.
TargetProject string
Optional - Name of the target network project. Defaults to value of the source_project field.
Config map[string]string
Optional - Map of key/value pairs of network peer config settings.
Description string
Optional - Description of the network peer.
Name string
Required - Name of the network peer.
Remote string
Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
SourceNetwork string
Required - Name of the source network.
SourceProject string
Optional - Name of the source network project. Defaults to default.
Status string
Network peer status
TargetNetwork string
Required - Name of the target network.
TargetProject string
Optional - Name of the target network project. Defaults to value of the source_project field.
config Map<String,String>
Optional - Map of key/value pairs of network peer config settings.
description String
Optional - Description of the network peer.
name String
Required - Name of the network peer.
remote String
Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
sourceNetwork String
Required - Name of the source network.
sourceProject String
Optional - Name of the source network project. Defaults to default.
status String
Network peer status
targetNetwork String
Required - Name of the target network.
targetProject String
Optional - Name of the target network project. Defaults to value of the source_project field.
config {[key: string]: string}
Optional - Map of key/value pairs of network peer config settings.
description string
Optional - Description of the network peer.
name string
Required - Name of the network peer.
remote string
Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
sourceNetwork string
Required - Name of the source network.
sourceProject string
Optional - Name of the source network project. Defaults to default.
status string
Network peer status
targetNetwork string
Required - Name of the target network.
targetProject string
Optional - Name of the target network project. Defaults to value of the source_project field.
config Mapping[str, str]
Optional - Map of key/value pairs of network peer config settings.
description str
Optional - Description of the network peer.
name str
Required - Name of the network peer.
remote str
Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
source_network str
Required - Name of the source network.
source_project str
Optional - Name of the source network project. Defaults to default.
status str
Network peer status
target_network str
Required - Name of the target network.
target_project str
Optional - Name of the target network project. Defaults to value of the source_project field.
config Map<String>
Optional - Map of key/value pairs of network peer config settings.
description String
Optional - Description of the network peer.
name String
Required - Name of the network peer.
remote String
Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
sourceNetwork String
Required - Name of the source network.
sourceProject String
Optional - Name of the source network project. Defaults to default.
status String
Network peer status
targetNetwork String
Required - Name of the target network.
targetProject String
Optional - Name of the target network project. Defaults to value of the source_project field.

Package Details

Repository
lxd terraform-lxd/terraform-provider-lxd
License
Notes
This Pulumi package is based on the lxd Terraform Provider.