@upcloud/pulumi-upcloud
Version:
A Pulumi package for creating and managing UpCloud resources.
140 lines (139 loc) • 4.78 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
/**
* Network peerings can be used to connect networks across accounts. For the network peering to become active, the peering must be made from both directions.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as upcloud from "@upcloud/pulumi-upcloud";
*
* // Network peering requires the networks to have routers attached to them.
* const _this = new upcloud.Router("this", {name: "network-peering-example-router"});
* const example = new upcloud.Network("example", {
* name: "network-peering-example-net",
* zone: "nl-ams1",
* router: exampleUpcloudRouter.id,
* ipNetwork: {
* address: "10.0.0.0/24",
* dhcp: true,
* family: "IPv4",
* },
* });
* const thisNetworkPeering: upcloud.NetworkPeering[] = [];
* for (const range = {value: 0}; range.value < 1; range.value++) {
* thisNetworkPeering.push(new upcloud.NetworkPeering(`this-${range.value}`, {
* name: "network-peering-example-peering",
* network: {
* uuid: example.id,
* },
* peerNetwork: {
* uuid: "0305723a-e5cb-4ef6-985d-e36ed44d133a",
* },
* }));
* }
* ```
*/
export declare class NetworkPeering extends pulumi.CustomResource {
/**
* Get an existing NetworkPeering resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: NetworkPeeringState, opts?: pulumi.CustomResourceOptions): NetworkPeering;
/**
* Returns true if the given object is an instance of NetworkPeering. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is NetworkPeering;
/**
* Configured status of the network peering.
*/
readonly configuredStatus: pulumi.Output<string>;
/**
* User defined key-value pairs to classify the network peering.
*/
readonly labels: pulumi.Output<{
[key: string]: string;
}>;
/**
* Name of the network peering.
*/
readonly name: pulumi.Output<string>;
/**
* Local network of the network peering.
*/
readonly network: pulumi.Output<outputs.NetworkPeeringNetwork>;
/**
* Peer network of the network peering.
*/
readonly peerNetwork: pulumi.Output<outputs.NetworkPeeringPeerNetwork>;
/**
* Create a NetworkPeering resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: NetworkPeeringArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering NetworkPeering resources.
*/
export interface NetworkPeeringState {
/**
* Configured status of the network peering.
*/
configuredStatus?: pulumi.Input<string>;
/**
* User defined key-value pairs to classify the network peering.
*/
labels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Name of the network peering.
*/
name?: pulumi.Input<string>;
/**
* Local network of the network peering.
*/
network?: pulumi.Input<inputs.NetworkPeeringNetwork>;
/**
* Peer network of the network peering.
*/
peerNetwork?: pulumi.Input<inputs.NetworkPeeringPeerNetwork>;
}
/**
* The set of arguments for constructing a NetworkPeering resource.
*/
export interface NetworkPeeringArgs {
/**
* Configured status of the network peering.
*/
configuredStatus?: pulumi.Input<string>;
/**
* User defined key-value pairs to classify the network peering.
*/
labels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Name of the network peering.
*/
name?: pulumi.Input<string>;
/**
* Local network of the network peering.
*/
network: pulumi.Input<inputs.NetworkPeeringNetwork>;
/**
* Peer network of the network peering.
*/
peerNetwork: pulumi.Input<inputs.NetworkPeeringPeerNetwork>;
}