Router
Manages a V2 router resource within OpenStack.
Example Usage
using Pulumi;
using OpenStack = Pulumi.OpenStack;
class MyStack : Stack
{
public MyStack()
{
var router1 = new OpenStack.Networking.Router("router1", new OpenStack.Networking.RouterArgs
{
AdminStateUp = true,
ExternalNetworkId = "f67f0d72-0ddf-11e4-9d95-e1f29f417e2f",
});
}
}
Coming soon!
import pulumi
import pulumi_openstack as openstack
router1 = openstack.networking.Router("router1",
admin_state_up=True,
external_network_id="f67f0d72-0ddf-11e4-9d95-e1f29f417e2f")import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";
const router1 = new openstack.networking.Router("router_1", {
adminStateUp: true,
externalNetworkId: "f67f0d72-0ddf-11e4-9d95-e1f29f417e2f",
});Create a Router Resource
new Router(name: string, args?: RouterArgs, opts?: CustomResourceOptions);def Router(resource_name, opts=None, admin_state_up=None, availability_zone_hints=None, description=None, distributed=None, enable_snat=None, external_fixed_ips=None, external_gateway=None, external_network_id=None, name=None, region=None, tags=None, tenant_id=None, value_specs=None, vendor_options=None, __props__=None);func NewRouter(ctx *Context, name string, args *RouterArgs, opts ...ResourceOption) (*Router, error)public Router(string name, RouterArgs? args = null, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args RouterArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args RouterArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RouterArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
Router Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The Router resource accepts the following input properties:
- Admin
State boolUp Administrative up/down status for the router (must be “true” or “false” if provided). Changing this updates the
admin_state_upof an existing router.- Availability
Zone List<string>Hints 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.
- Description string
Human-readable description for the router.
- Distributed bool
Indicates whether or not to create a distributed router. The default policy setting in Neutron restricts usage of this property to administrative users only.
- Enable
Snat bool Enable Source NAT for the router. Valid values are “true” or “false”. An
external_network_idhas to be set in order to set this property. Changing this updates theenable_snatof the router. Setting this value requires an ext-gw-mode extension to be enabled in OpenStack Neutron.- External
Fixed List<Pulumi.Ips Open Stack. Networking. Inputs. Router External Fixed Ip Args> An external fixed IP for the router. This can be repeated. The structure is described below. An
external_network_idhas to be set in order to set this property. Changing this updates the external fixed IPs of the router.- External
Gateway string 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 an existing router.
- External
Network stringId 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.
- Name string
A unique name for the router. Changing this updates the
nameof an existing router.- Region string
The region in which to obtain the V2 networking client. A networking client is needed to create a router. If omitted, the
regionargument of the provider is used. Changing this creates a new router.- List<string>
A set of string tags for the router.
- Tenant
Id string The owner of the floating IP. Required if admin wants to create a router for another tenant. Changing this creates a new router.
- Value
Specs Dictionary<string, object> Map of additional driver-specific options.
- Vendor
Options Pulumi.Open Stack. Networking. Inputs. Router Vendor Options Args Map of additional vendor-specific options. Supported options are described below.
- Admin
State boolUp Administrative up/down status for the router (must be “true” or “false” if provided). Changing this updates the
admin_state_upof an existing router.- Availability
Zone []stringHints 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.
- Description string
Human-readable description for the router.
- Distributed bool
Indicates whether or not to create a distributed router. The default policy setting in Neutron restricts usage of this property to administrative users only.
- Enable
Snat bool Enable Source NAT for the router. Valid values are “true” or “false”. An
external_network_idhas to be set in order to set this property. Changing this updates theenable_snatof the router. Setting this value requires an ext-gw-mode extension to be enabled in OpenStack Neutron.- External
Fixed []RouterIps External Fixed Ip An external fixed IP for the router. This can be repeated. The structure is described below. An
external_network_idhas to be set in order to set this property. Changing this updates the external fixed IPs of the router.- External
Gateway string 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 an existing router.
- External
Network stringId 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.
- Name string
A unique name for the router. Changing this updates the
nameof an existing router.- Region string
The region in which to obtain the V2 networking client. A networking client is needed to create a router. If omitted, the
regionargument of the provider is used. Changing this creates a new router.- []string
A set of string tags for the router.
- Tenant
Id string The owner of the floating IP. Required if admin wants to create a router for another tenant. Changing this creates a new router.
- Value
Specs map[string]interface{} Map of additional driver-specific options.
- Vendor
Options RouterVendor Options Map of additional vendor-specific options. Supported options are described below.
- admin
State booleanUp Administrative up/down status for the router (must be “true” or “false” if provided). Changing this updates the
admin_state_upof an existing router.- availability
Zone string[]Hints 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.
- description string
Human-readable description for the router.
- distributed boolean
Indicates whether or not to create a distributed router. The default policy setting in Neutron restricts usage of this property to administrative users only.
- enable
Snat boolean Enable Source NAT for the router. Valid values are “true” or “false”. An
external_network_idhas to be set in order to set this property. Changing this updates theenable_snatof the router. Setting this value requires an ext-gw-mode extension to be enabled in OpenStack Neutron.- external
Fixed RouterIps External Fixed Ip[] An external fixed IP for the router. This can be repeated. The structure is described below. An
external_network_idhas to be set in order to set this property. Changing this updates the external fixed IPs of the router.- external
Gateway string 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 an existing router.
- external
Network stringId 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.
- name string
A unique name for the router. Changing this updates the
nameof an existing router.- region string
The region in which to obtain the V2 networking client. A networking client is needed to create a router. If omitted, the
regionargument of the provider is used. Changing this creates a new router.- string[]
A set of string tags for the router.
- tenant
Id string The owner of the floating IP. Required if admin wants to create a router for another tenant. Changing this creates a new router.
- value
Specs {[key: string]: any} Map of additional driver-specific options.
- vendor
Options RouterVendor Options Map of additional vendor-specific options. Supported options are described below.
- admin_
state_ boolup Administrative up/down status for the router (must be “true” or “false” if provided). Changing this updates the
admin_state_upof an existing router.- availability_
zone_ List[str]hints 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.
- description str
Human-readable description for the router.
- distributed bool
Indicates whether or not to create a distributed router. The default policy setting in Neutron restricts usage of this property to administrative users only.
- enable_
snat bool Enable Source NAT for the router. Valid values are “true” or “false”. An
external_network_idhas to be set in order to set this property. Changing this updates theenable_snatof the router. Setting this value requires an ext-gw-mode extension to be enabled in OpenStack Neutron.- external_
fixed_ List[Routerips External Fixed Ip] An external fixed IP for the router. This can be repeated. The structure is described below. An
external_network_idhas to be set in order to set this property. Changing this updates the external fixed IPs of the router.- external_
gateway str 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 an existing router.
- external_
network_ strid 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.
- name str
A unique name for the router. Changing this updates the
nameof an existing router.- region str
The region in which to obtain the V2 networking client. A networking client is needed to create a router. If omitted, the
regionargument of the provider is used. Changing this creates a new router.- List[str]
A set of string tags for the router.
- tenant_
id str The owner of the floating IP. Required if admin wants to create a router for another tenant. Changing this creates a new router.
- value_
specs Dict[str, Any] Map of additional driver-specific options.
- vendor_
options Dict[RouterVendor Options] Map of additional vendor-specific options. Supported options are described below.
Outputs
All input properties are implicitly available as output properties. Additionally, the Router resource produces the following output properties:
- List<string>
The collection of tags assigned on the router, which have been explicitly and implicitly added.
- Id string
- The provider-assigned unique ID for this managed resource.
Look up an Existing Router Resource
Get an existing Router resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: RouterState, opts?: CustomResourceOptions): Routerstatic get(resource_name, id, opts=None, admin_state_up=None, all_tags=None, availability_zone_hints=None, description=None, distributed=None, enable_snat=None, external_fixed_ips=None, external_gateway=None, external_network_id=None, name=None, region=None, tags=None, tenant_id=None, value_specs=None, vendor_options=None, __props__=None);func GetRouter(ctx *Context, name string, id IDInput, state *RouterState, opts ...ResourceOption) (*Router, error)public static Router Get(string name, Input<string> id, RouterState? state, CustomResourceOptions? opts = null)- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
The following state arguments are supported:
- Admin
State boolUp Administrative up/down status for the router (must be “true” or “false” if provided). Changing this updates the
admin_state_upof an existing router.- List<string>
The collection of tags assigned on the router, which have been explicitly and implicitly added.
- Availability
Zone List<string>Hints 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.
- Description string
Human-readable description for the router.
- Distributed bool
Indicates whether or not to create a distributed router. The default policy setting in Neutron restricts usage of this property to administrative users only.
- Enable
Snat bool Enable Source NAT for the router. Valid values are “true” or “false”. An
external_network_idhas to be set in order to set this property. Changing this updates theenable_snatof the router. Setting this value requires an ext-gw-mode extension to be enabled in OpenStack Neutron.- External
Fixed List<Pulumi.Ips Open Stack. Networking. Inputs. Router External Fixed Ip Args> An external fixed IP for the router. This can be repeated. The structure is described below. An
external_network_idhas to be set in order to set this property. Changing this updates the external fixed IPs of the router.- External
Gateway string 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 an existing router.
- External
Network stringId 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.
- Name string
A unique name for the router. Changing this updates the
nameof an existing router.- Region string
The region in which to obtain the V2 networking client. A networking client is needed to create a router. If omitted, the
regionargument of the provider is used. Changing this creates a new router.- List<string>
A set of string tags for the router.
- Tenant
Id string The owner of the floating IP. Required if admin wants to create a router for another tenant. Changing this creates a new router.
- Value
Specs Dictionary<string, object> Map of additional driver-specific options.
- Vendor
Options Pulumi.Open Stack. Networking. Inputs. Router Vendor Options Args Map of additional vendor-specific options. Supported options are described below.
- Admin
State boolUp Administrative up/down status for the router (must be “true” or “false” if provided). Changing this updates the
admin_state_upof an existing router.- []string
The collection of tags assigned on the router, which have been explicitly and implicitly added.
- Availability
Zone []stringHints 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.
- Description string
Human-readable description for the router.
- Distributed bool
Indicates whether or not to create a distributed router. The default policy setting in Neutron restricts usage of this property to administrative users only.
- Enable
Snat bool Enable Source NAT for the router. Valid values are “true” or “false”. An
external_network_idhas to be set in order to set this property. Changing this updates theenable_snatof the router. Setting this value requires an ext-gw-mode extension to be enabled in OpenStack Neutron.- External
Fixed []RouterIps External Fixed Ip An external fixed IP for the router. This can be repeated. The structure is described below. An
external_network_idhas to be set in order to set this property. Changing this updates the external fixed IPs of the router.- External
Gateway string 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 an existing router.
- External
Network stringId 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.
- Name string
A unique name for the router. Changing this updates the
nameof an existing router.- Region string
The region in which to obtain the V2 networking client. A networking client is needed to create a router. If omitted, the
regionargument of the provider is used. Changing this creates a new router.- []string
A set of string tags for the router.
- Tenant
Id string The owner of the floating IP. Required if admin wants to create a router for another tenant. Changing this creates a new router.
- Value
Specs map[string]interface{} Map of additional driver-specific options.
- Vendor
Options RouterVendor Options Map of additional vendor-specific options. Supported options are described below.
- admin
State booleanUp Administrative up/down status for the router (must be “true” or “false” if provided). Changing this updates the
admin_state_upof an existing router.- string[]
The collection of tags assigned on the router, which have been explicitly and implicitly added.
- availability
Zone string[]Hints 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.
- description string
Human-readable description for the router.
- distributed boolean
Indicates whether or not to create a distributed router. The default policy setting in Neutron restricts usage of this property to administrative users only.
- enable
Snat boolean Enable Source NAT for the router. Valid values are “true” or “false”. An
external_network_idhas to be set in order to set this property. Changing this updates theenable_snatof the router. Setting this value requires an ext-gw-mode extension to be enabled in OpenStack Neutron.- external
Fixed RouterIps External Fixed Ip[] An external fixed IP for the router. This can be repeated. The structure is described below. An
external_network_idhas to be set in order to set this property. Changing this updates the external fixed IPs of the router.- external
Gateway string 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 an existing router.
- external
Network stringId 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.
- name string
A unique name for the router. Changing this updates the
nameof an existing router.- region string
The region in which to obtain the V2 networking client. A networking client is needed to create a router. If omitted, the
regionargument of the provider is used. Changing this creates a new router.- string[]
A set of string tags for the router.
- tenant
Id string The owner of the floating IP. Required if admin wants to create a router for another tenant. Changing this creates a new router.
- value
Specs {[key: string]: any} Map of additional driver-specific options.
- vendor
Options RouterVendor Options Map of additional vendor-specific options. Supported options are described below.
- admin_
state_ boolup Administrative up/down status for the router (must be “true” or “false” if provided). Changing this updates the
admin_state_upof an existing router.- List[str]
The collection of tags assigned on the router, which have been explicitly and implicitly added.
- availability_
zone_ List[str]hints 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.
- description str
Human-readable description for the router.
- distributed bool
Indicates whether or not to create a distributed router. The default policy setting in Neutron restricts usage of this property to administrative users only.
- enable_
snat bool Enable Source NAT for the router. Valid values are “true” or “false”. An
external_network_idhas to be set in order to set this property. Changing this updates theenable_snatof the router. Setting this value requires an ext-gw-mode extension to be enabled in OpenStack Neutron.- external_
fixed_ List[Routerips External Fixed Ip] An external fixed IP for the router. This can be repeated. The structure is described below. An
external_network_idhas to be set in order to set this property. Changing this updates the external fixed IPs of the router.- external_
gateway str 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 an existing router.
- external_
network_ strid 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.
- name str
A unique name for the router. Changing this updates the
nameof an existing router.- region str
The region in which to obtain the V2 networking client. A networking client is needed to create a router. If omitted, the
regionargument of the provider is used. Changing this creates a new router.- List[str]
A set of string tags for the router.
- tenant_
id str The owner of the floating IP. Required if admin wants to create a router for another tenant. Changing this creates a new router.
- value_
specs Dict[str, Any] Map of additional driver-specific options.
- vendor_
options Dict[RouterVendor Options] Map of additional vendor-specific options. Supported options are described below.
Supporting Types
RouterExternalFixedIp
- ip_
address str The IP address to set on the router.
- subnet_
id str Subnet in which the fixed IP belongs to.
RouterVendorOptions
- Set
Router boolGateway After Create Boolean to control whether the Router gateway is assigned during creation or updated after creation.
- Set
Router boolGateway After Create Boolean to control whether the Router gateway is assigned during creation or updated after creation.
- set
Router booleanGateway After Create Boolean to control whether the Router gateway is assigned during creation or updated after creation.
- set
Router boolGateway After Create Boolean to control whether the Router gateway is assigned during creation or updated after creation.
Package Details
- Repository
- https://github.com/pulumi/pulumi-openstack
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
openstackTerraform Provider.