@upcloud/pulumi-upcloud
Version:
A Pulumi package for creating and managing UpCloud resources.
180 lines (179 loc) • 6.11 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
/**
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as upcloud from "@upcloud/pulumi-upcloud";
*
* const _this = new upcloud.Router("this", {name: "gateway-example-router"});
* 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: ["vpn"],
* plan: "advanced",
* router: {
* id: _this.id,
* },
* });
* const thisGatewayConnection = new upcloud.GatewayConnection("this", {
* gateway: thisGateway.id,
* name: "test-connection",
* type: "ipsec",
* localRoutes: [{
* name: "local-route",
* type: "static",
* staticNetwork: "10.123.123.0/24",
* }],
* remoteRoutes: [{
* name: "remote-route",
* type: "static",
* staticNetwork: "100.123.123.0/24",
* }],
* });
* const thisGatewayConnectionTunnel = new upcloud.GatewayConnectionTunnel("this", {
* connectionId: thisGatewayConnection.id,
* name: "test-tunnel",
* localAddressName: thisGateway.address[0].name,
* remoteAddress: "100.123.123.10",
* ipsecAuthPsk: {
* psk: "you_probably_want_to_use_env_vars_here",
* },
* });
* ```
*/
export declare class GatewayConnectionTunnel extends pulumi.CustomResource {
/**
* Get an existing GatewayConnectionTunnel 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?: GatewayConnectionTunnelState, opts?: pulumi.CustomResourceOptions): GatewayConnectionTunnel;
/**
* Returns true if the given object is an instance of GatewayConnectionTunnel. 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 GatewayConnectionTunnel;
/**
* ID of the upcloud.GatewayConnection resource to which the tunnel belongs
*/
readonly connectionId: pulumi.Output<string>;
/**
* Configuration for authenticating with pre-shared key
*/
readonly ipsecAuthPsk: pulumi.Output<outputs.GatewayConnectionTunnelIpsecAuthPsk>;
/**
* IPsec configuration for the tunnel
*/
readonly ipsecProperties: pulumi.Output<outputs.GatewayConnectionTunnelIpsecProperties>;
/**
* Public (UpCloud) endpoint address of this tunnel
*/
readonly localAddressName: pulumi.Output<string>;
/**
* The name of the tunnel, should be unique within the connection
*/
readonly name: pulumi.Output<string>;
/**
* Tunnel's current operational, effective state
*/
readonly operationalState: pulumi.Output<string>;
/**
* Remote public IP address of the tunnel
*/
readonly remoteAddress: pulumi.Output<string>;
/**
* The UUID of the tunnel
*/
readonly uuid: pulumi.Output<string>;
/**
* Create a GatewayConnectionTunnel 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: GatewayConnectionTunnelArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering GatewayConnectionTunnel resources.
*/
export interface GatewayConnectionTunnelState {
/**
* ID of the upcloud.GatewayConnection resource to which the tunnel belongs
*/
connectionId?: pulumi.Input<string>;
/**
* Configuration for authenticating with pre-shared key
*/
ipsecAuthPsk?: pulumi.Input<inputs.GatewayConnectionTunnelIpsecAuthPsk>;
/**
* IPsec configuration for the tunnel
*/
ipsecProperties?: pulumi.Input<inputs.GatewayConnectionTunnelIpsecProperties>;
/**
* Public (UpCloud) endpoint address of this tunnel
*/
localAddressName?: pulumi.Input<string>;
/**
* The name of the tunnel, should be unique within the connection
*/
name?: pulumi.Input<string>;
/**
* Tunnel's current operational, effective state
*/
operationalState?: pulumi.Input<string>;
/**
* Remote public IP address of the tunnel
*/
remoteAddress?: pulumi.Input<string>;
/**
* The UUID of the tunnel
*/
uuid?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a GatewayConnectionTunnel resource.
*/
export interface GatewayConnectionTunnelArgs {
/**
* ID of the upcloud.GatewayConnection resource to which the tunnel belongs
*/
connectionId: pulumi.Input<string>;
/**
* Configuration for authenticating with pre-shared key
*/
ipsecAuthPsk: pulumi.Input<inputs.GatewayConnectionTunnelIpsecAuthPsk>;
/**
* IPsec configuration for the tunnel
*/
ipsecProperties?: pulumi.Input<inputs.GatewayConnectionTunnelIpsecProperties>;
/**
* Public (UpCloud) endpoint address of this tunnel
*/
localAddressName: pulumi.Input<string>;
/**
* The name of the tunnel, should be unique within the connection
*/
name?: pulumi.Input<string>;
/**
* Remote public IP address of the tunnel
*/
remoteAddress: pulumi.Input<string>;
}