@upcloud/pulumi-upcloud
Version:
A Pulumi package for creating and managing UpCloud resources.
209 lines (208 loc) • 7.58 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
/**
* Network gateways connect SDN Private Networks to external IP networks.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as upcloud from "@upcloud/pulumi-upcloud";
*
* // Create router for the gateway
* const _this = new upcloud.Router("this", {name: "gateway-example-router"});
* // Create network for the gateway
* const thisNetwork = new upcloud.Network("this", {
* name: "gateway-example-net",
* zone: "pl-waw1",
* ipNetwork: {
* address: "172.16.2.0/24",
* dhcp: true,
* family: "IPv4",
* },
* router: _this.id,
* });
* const thisGateway = new upcloud.Gateway("this", {
* name: "gateway-example-gw",
* zone: "pl-waw1",
* features: ["nat"],
* router: {
* id: _this.id,
* },
* labels: {
* "managed-by": "terraform",
* },
* });
* ```
*/
export declare class Gateway extends pulumi.CustomResource {
/**
* Get an existing Gateway 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?: GatewayState, opts?: pulumi.CustomResourceOptions): Gateway;
/**
* Returns true if the given object is an instance of Gateway. 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 Gateway;
/**
* IP addresses assigned to the gateway.
*/
readonly address: pulumi.Output<outputs.GatewayAddress>;
/**
* IP addresses assigned to the gateway.
*
* @deprecated Use 'address' attribute instead. This attribute will be removed in the next major version of the provider
*/
readonly addresses: pulumi.Output<outputs.GatewayAddress[]>;
/**
* The service configured status indicates the service's current intended status. Managed by the customer.
*/
readonly configuredStatus: pulumi.Output<string | undefined>;
/**
* Names of connections attached to the gateway. Note that this field can have outdated information as connections are
* created by a separate resource. To make sure that you have the most recent data run 'terrafrom refresh'.
*/
readonly connections: pulumi.Output<string[]>;
/**
* Features enabled for the gateway. Note that VPN feature is currently in beta, for more details see
* https://upcloud.com/resources/docs/networking#nat-and-vpn-gateways.
*/
readonly features: pulumi.Output<string[]>;
/**
* User defined key-value pairs to classify the network gateway.
*/
readonly labels: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* Gateway name. Needs to be unique within the account.
*/
readonly name: pulumi.Output<string>;
/**
* The service operational state indicates the service's current operational, effective state. Managed by the system.
*/
readonly operationalState: pulumi.Output<string>;
/**
* Gateway pricing plan.
*/
readonly plan: pulumi.Output<string>;
/**
* Attached Router from where traffic is routed towards the network gateway service.
*/
readonly router: pulumi.Output<outputs.GatewayRouter>;
/**
* Zone in which the gateway will be hosted, e.g. `de-fra1`.
*/
readonly zone: pulumi.Output<string>;
/**
* Create a Gateway 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: GatewayArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Gateway resources.
*/
export interface GatewayState {
/**
* IP addresses assigned to the gateway.
*/
address?: pulumi.Input<inputs.GatewayAddress>;
/**
* IP addresses assigned to the gateway.
*
* @deprecated Use 'address' attribute instead. This attribute will be removed in the next major version of the provider
*/
addresses?: pulumi.Input<pulumi.Input<inputs.GatewayAddress>[]>;
/**
* The service configured status indicates the service's current intended status. Managed by the customer.
*/
configuredStatus?: pulumi.Input<string>;
/**
* Names of connections attached to the gateway. Note that this field can have outdated information as connections are
* created by a separate resource. To make sure that you have the most recent data run 'terrafrom refresh'.
*/
connections?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Features enabled for the gateway. Note that VPN feature is currently in beta, for more details see
* https://upcloud.com/resources/docs/networking#nat-and-vpn-gateways.
*/
features?: pulumi.Input<pulumi.Input<string>[]>;
/**
* User defined key-value pairs to classify the network gateway.
*/
labels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Gateway name. Needs to be unique within the account.
*/
name?: pulumi.Input<string>;
/**
* The service operational state indicates the service's current operational, effective state. Managed by the system.
*/
operationalState?: pulumi.Input<string>;
/**
* Gateway pricing plan.
*/
plan?: pulumi.Input<string>;
/**
* Attached Router from where traffic is routed towards the network gateway service.
*/
router?: pulumi.Input<inputs.GatewayRouter>;
/**
* Zone in which the gateway will be hosted, e.g. `de-fra1`.
*/
zone?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Gateway resource.
*/
export interface GatewayArgs {
/**
* IP addresses assigned to the gateway.
*/
address?: pulumi.Input<inputs.GatewayAddress>;
/**
* The service configured status indicates the service's current intended status. Managed by the customer.
*/
configuredStatus?: pulumi.Input<string>;
/**
* Features enabled for the gateway. Note that VPN feature is currently in beta, for more details see
* https://upcloud.com/resources/docs/networking#nat-and-vpn-gateways.
*/
features: pulumi.Input<pulumi.Input<string>[]>;
/**
* User defined key-value pairs to classify the network gateway.
*/
labels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Gateway name. Needs to be unique within the account.
*/
name?: pulumi.Input<string>;
/**
* Gateway pricing plan.
*/
plan?: pulumi.Input<string>;
/**
* Attached Router from where traffic is routed towards the network gateway service.
*/
router: pulumi.Input<inputs.GatewayRouter>;
/**
* Zone in which the gateway will be hosted, e.g. `de-fra1`.
*/
zone: pulumi.Input<string>;
}