@pulumi/openstack
Version:
A Pulumi package for creating and managing OpenStack cloud resources.
346 lines (345 loc) • 13.7 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* Manages a V2 router resource within OpenStack.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as openstack from "@pulumi/openstack";
*
* const router1 = new openstack.networking.Router("router_1", {
* name: "my_router",
* adminStateUp: true,
* externalNetworkId: "f67f0d72-0ddf-11e4-9d95-e1f29f417e2f",
* });
* ```
*
* ## Import
*
* Routers can be imported using the `id`, e.g.
*
* ```sh
* $ pulumi import openstack:networking/router:Router router_1 014395cd-89fc-4c9b-96b7-13d1ee79dad2
* ```
*/
export declare class Router extends pulumi.CustomResource {
/**
* Get an existing Router 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?: RouterState, opts?: pulumi.CustomResourceOptions): Router;
/**
* Returns true if the given object is an instance of Router. 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 Router;
/**
* Administrative up/down status for the router
* (must be "true" or "false" if provided). Changing this updates the
* `adminStateUp` of an existing router.
*/
readonly adminStateUp: pulumi.Output<boolean>;
/**
* The collection of tags assigned on the router, which have been
* explicitly and implicitly added.
*/
readonly allTags: pulumi.Output<string[]>;
/**
* An availability zone is used to make
* network resources highly available. Used for resources with high availability
* so that they are scheduled on different availability zones. Changing this
* creates a new router.
*/
readonly availabilityZoneHints: pulumi.Output<string[]>;
/**
* Human-readable description for the router.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* Indicates whether or not to create a
* distributed router. The default policy setting in Neutron restricts
* usage of this property to administrative users only.
*/
readonly distributed: pulumi.Output<boolean>;
/**
* Enable Source NAT for the router. Valid values are
* "true" or "false". An `externalNetworkId` has to be set in order to
* set this property. Changing this updates the `enableSnat` of the router.
* Setting this value **requires** an **ext-gw-mode** extension to be enabled
* in OpenStack Neutron.
*/
readonly enableSnat: pulumi.Output<boolean>;
/**
* An external fixed IP for the router. This
* can be repeated. The structure is described below. An `externalNetworkId`
* has to be set in order to set this property. Changing this updates the
* external fixed IPs of the router.
*/
readonly externalFixedIps: pulumi.Output<outputs.networking.RouterExternalFixedIp[]>;
/**
* The network UUID of an external gateway
* for the router. A router with an external gateway is required if any
* compute instances or load balancers will be using floating IPs. Changing
* this updates the external gateway of the router.
*/
readonly externalNetworkId: pulumi.Output<string>;
/**
* The QoS policy UUID that will be applied
* on the external gateway for the router. Changing this updates the external
* gateway of the router.
*/
readonly externalQosPolicyId: pulumi.Output<string>;
/**
* A list of external subnet IDs to try over
* each to obtain a fixed IP for the router. If a subnet ID in a list has
* exhausted floating IP pool, the next subnet ID will be tried. This argument is
* used only during the router creation and allows to set only one external fixed
* IP. Conflicts with an `externalFixedIp` argument.
*/
readonly externalSubnetIds: pulumi.Output<string[] | undefined>;
/**
* A unique name for the router. Changing this
* updates the `name` of an existing router.
*/
readonly name: pulumi.Output<string>;
/**
* The region in which to obtain the V2 networking client.
* A networking client is needed to create a router. If omitted, the
* `region` argument of the provider is used. Changing this creates a new
* router.
*/
readonly region: pulumi.Output<string>;
/**
* A set of string tags for the router.
*/
readonly tags: pulumi.Output<string[] | undefined>;
/**
* The owner of the floating IP. Required if admin wants
* to create a router for another tenant. Changing this creates a new router.
*/
readonly tenantId: pulumi.Output<string>;
/**
* Map of additional driver-specific options.
*/
readonly valueSpecs: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* Map of additional vendor-specific options.
* Supported options are described below.
*/
readonly vendorOptions: pulumi.Output<outputs.networking.RouterVendorOptions | undefined>;
/**
* Create a Router 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?: RouterArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Router resources.
*/
export interface RouterState {
/**
* Administrative up/down status for the router
* (must be "true" or "false" if provided). Changing this updates the
* `adminStateUp` of an existing router.
*/
adminStateUp?: pulumi.Input<boolean>;
/**
* The collection of tags assigned on the router, which have been
* explicitly and implicitly added.
*/
allTags?: pulumi.Input<pulumi.Input<string>[]>;
/**
* An availability zone is used to make
* network resources highly available. Used for resources with high availability
* so that they are scheduled on different availability zones. Changing this
* creates a new router.
*/
availabilityZoneHints?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Human-readable description for the router.
*/
description?: pulumi.Input<string>;
/**
* Indicates whether or not to create a
* distributed router. The default policy setting in Neutron restricts
* usage of this property to administrative users only.
*/
distributed?: pulumi.Input<boolean>;
/**
* Enable Source NAT for the router. Valid values are
* "true" or "false". An `externalNetworkId` has to be set in order to
* set this property. Changing this updates the `enableSnat` of the router.
* Setting this value **requires** an **ext-gw-mode** extension to be enabled
* in OpenStack Neutron.
*/
enableSnat?: pulumi.Input<boolean>;
/**
* An external fixed IP for the router. This
* can be repeated. The structure is described below. An `externalNetworkId`
* has to be set in order to set this property. Changing this updates the
* external fixed IPs of the router.
*/
externalFixedIps?: pulumi.Input<pulumi.Input<inputs.networking.RouterExternalFixedIp>[]>;
/**
* The network UUID of an external gateway
* for the router. A router with an external gateway is required if any
* compute instances or load balancers will be using floating IPs. Changing
* this updates the external gateway of the router.
*/
externalNetworkId?: pulumi.Input<string>;
/**
* The QoS policy UUID that will be applied
* on the external gateway for the router. Changing this updates the external
* gateway of the router.
*/
externalQosPolicyId?: pulumi.Input<string>;
/**
* A list of external subnet IDs to try over
* each to obtain a fixed IP for the router. If a subnet ID in a list has
* exhausted floating IP pool, the next subnet ID will be tried. This argument is
* used only during the router creation and allows to set only one external fixed
* IP. Conflicts with an `externalFixedIp` argument.
*/
externalSubnetIds?: pulumi.Input<pulumi.Input<string>[]>;
/**
* A unique name for the router. Changing this
* updates the `name` of an existing router.
*/
name?: pulumi.Input<string>;
/**
* The region in which to obtain the V2 networking client.
* A networking client is needed to create a router. If omitted, the
* `region` argument of the provider is used. Changing this creates a new
* router.
*/
region?: pulumi.Input<string>;
/**
* A set of string tags for the router.
*/
tags?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The owner of the floating IP. Required if admin wants
* to create a router for another tenant. Changing this creates a new router.
*/
tenantId?: pulumi.Input<string>;
/**
* Map of additional driver-specific options.
*/
valueSpecs?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Map of additional vendor-specific options.
* Supported options are described below.
*/
vendorOptions?: pulumi.Input<inputs.networking.RouterVendorOptions>;
}
/**
* The set of arguments for constructing a Router resource.
*/
export interface RouterArgs {
/**
* Administrative up/down status for the router
* (must be "true" or "false" if provided). Changing this updates the
* `adminStateUp` of an existing router.
*/
adminStateUp?: pulumi.Input<boolean>;
/**
* An availability zone is used to make
* network resources highly available. Used for resources with high availability
* so that they are scheduled on different availability zones. Changing this
* creates a new router.
*/
availabilityZoneHints?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Human-readable description for the router.
*/
description?: pulumi.Input<string>;
/**
* Indicates whether or not to create a
* distributed router. The default policy setting in Neutron restricts
* usage of this property to administrative users only.
*/
distributed?: pulumi.Input<boolean>;
/**
* Enable Source NAT for the router. Valid values are
* "true" or "false". An `externalNetworkId` has to be set in order to
* set this property. Changing this updates the `enableSnat` of the router.
* Setting this value **requires** an **ext-gw-mode** extension to be enabled
* in OpenStack Neutron.
*/
enableSnat?: pulumi.Input<boolean>;
/**
* An external fixed IP for the router. This
* can be repeated. The structure is described below. An `externalNetworkId`
* has to be set in order to set this property. Changing this updates the
* external fixed IPs of the router.
*/
externalFixedIps?: pulumi.Input<pulumi.Input<inputs.networking.RouterExternalFixedIp>[]>;
/**
* The network UUID of an external gateway
* for the router. A router with an external gateway is required if any
* compute instances or load balancers will be using floating IPs. Changing
* this updates the external gateway of the router.
*/
externalNetworkId?: pulumi.Input<string>;
/**
* The QoS policy UUID that will be applied
* on the external gateway for the router. Changing this updates the external
* gateway of the router.
*/
externalQosPolicyId?: pulumi.Input<string>;
/**
* A list of external subnet IDs to try over
* each to obtain a fixed IP for the router. If a subnet ID in a list has
* exhausted floating IP pool, the next subnet ID will be tried. This argument is
* used only during the router creation and allows to set only one external fixed
* IP. Conflicts with an `externalFixedIp` argument.
*/
externalSubnetIds?: pulumi.Input<pulumi.Input<string>[]>;
/**
* A unique name for the router. Changing this
* updates the `name` of an existing router.
*/
name?: pulumi.Input<string>;
/**
* The region in which to obtain the V2 networking client.
* A networking client is needed to create a router. If omitted, the
* `region` argument of the provider is used. Changing this creates a new
* router.
*/
region?: pulumi.Input<string>;
/**
* A set of string tags for the router.
*/
tags?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The owner of the floating IP. Required if admin wants
* to create a router for another tenant. Changing this creates a new router.
*/
tenantId?: pulumi.Input<string>;
/**
* Map of additional driver-specific options.
*/
valueSpecs?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Map of additional vendor-specific options.
* Supported options are described below.
*/
vendorOptions?: pulumi.Input<inputs.networking.RouterVendorOptions>;
}