@pulumi/openstack
Version:
A Pulumi package for creating and managing OpenStack cloud resources.
148 lines (147 loc) • 5.54 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* Creates routing entries on a OpenStack V2 router.
*
* > **Note:** This resource uses the OpenStack Neutron `extraroute-atomic`
* extension. If your environment does not have this extension, you should use the
* `openstack.networking.RouterRoute` resource to add routes instead.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as openstack from "@pulumi/openstack";
*
* const router1 = new openstack.networking.Router("router_1", {
* name: "router_1",
* adminStateUp: true,
* });
* const network1 = new openstack.networking.Network("network_1", {
* name: "network_1",
* adminStateUp: true,
* });
* const subnet1 = new openstack.networking.Subnet("subnet_1", {
* networkId: network1.id,
* cidr: "192.168.199.0/24",
* ipVersion: 4,
* });
* const int1 = new openstack.networking.RouterInterface("int_1", {
* routerId: router1.id,
* subnetId: subnet1.id,
* });
* const routerRoutes1 = new openstack.networking.RouterRoutesV2("router_routes_1", {
* routerId: int1.routerId,
* routes: [
* {
* destinationCidr: "10.0.1.0/24",
* nextHop: "192.168.199.254",
* },
* {
* destinationCidr: "10.0.2.0/24",
* nextHop: "192.168.199.254",
* },
* ],
* });
* ```
*
* ## Notes
*
* The `nextHop` IP address must be directly reachable from the router at the
* ``openstack.networking.RouterRoutesV2`` resource creation time. You can
* ensure that by explicitly specifying a dependency on the
* ``openstack.networking.RouterInterface`` resource that connects the next
* hop to the router, as in the example above.
*
* ## Import
*
* Routing entries can be imported using a router `id`:
*
* ```sh
* $ pulumi import openstack:networking/routerRoutesV2:RouterRoutesV2 router_routes_1 686fe248-386c-4f70-9f6c-281607dad079
* ```
*/
export declare class RouterRoutesV2 extends pulumi.CustomResource {
/**
* Get an existing RouterRoutesV2 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?: RouterRoutesV2State, opts?: pulumi.CustomResourceOptions): RouterRoutesV2;
/**
* Returns true if the given object is an instance of RouterRoutesV2. 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 RouterRoutesV2;
/**
* The region in which to obtain the V2 networking client.
* A networking client is needed to configure routing entres on a router. If
* omitted, the `region` argument of the provider is used. Changing this creates
* new routing entries.
*/
readonly region: pulumi.Output<string>;
/**
* ID of the router these routing entries belong to.
* Changing this creates new routing entries.
*/
readonly routerId: pulumi.Output<string>;
/**
* A set of routing entries to add to the router.
*/
readonly routes: pulumi.Output<outputs.networking.RouterRoutesV2Route[] | undefined>;
/**
* Create a RouterRoutesV2 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: RouterRoutesV2Args, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering RouterRoutesV2 resources.
*/
export interface RouterRoutesV2State {
/**
* The region in which to obtain the V2 networking client.
* A networking client is needed to configure routing entres on a router. If
* omitted, the `region` argument of the provider is used. Changing this creates
* new routing entries.
*/
region?: pulumi.Input<string>;
/**
* ID of the router these routing entries belong to.
* Changing this creates new routing entries.
*/
routerId?: pulumi.Input<string>;
/**
* A set of routing entries to add to the router.
*/
routes?: pulumi.Input<pulumi.Input<inputs.networking.RouterRoutesV2Route>[]>;
}
/**
* The set of arguments for constructing a RouterRoutesV2 resource.
*/
export interface RouterRoutesV2Args {
/**
* The region in which to obtain the V2 networking client.
* A networking client is needed to configure routing entres on a router. If
* omitted, the `region` argument of the provider is used. Changing this creates
* new routing entries.
*/
region?: pulumi.Input<string>;
/**
* ID of the router these routing entries belong to.
* Changing this creates new routing entries.
*/
routerId: pulumi.Input<string>;
/**
* A set of routing entries to add to the router.
*/
routes?: pulumi.Input<pulumi.Input<inputs.networking.RouterRoutesV2Route>[]>;
}