edgecenter.Router
Explore with Pulumi AI
Represent router. Router enables you to dynamically exchange routes between networks
Example Usage
Coming soon!
Coming soon!
Coming soon!
Coming soon!
Coming soon!
resources:
router:
type: edgecenter:Router
properties:
dynamic:
- iterator: ${egi}
forEach: ${var.external_gateway_info}
content:
- type: ${egi.value.type}
networkId: ${egi.value.network_id}
- iterator: ${ifaces}
forEach: ${var.interfaces}
content:
- type: ${ifaces.value.type}
subnetId: ${ifaces.value.subnet_id}
- iterator: ${rs}
forEach: ${var.routes}
content:
- destination: ${rs.value.destination}
nexthop: ${rs.value.nexthop}
regionId: 1
projectId: 1
Create Router Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Router(name: string, args?: RouterArgs, opts?: CustomResourceOptions);
@overload
def Router(resource_name: str,
args: Optional[RouterArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Router(resource_name: str,
opts: Optional[ResourceOptions] = None,
external_gateway_info: Optional[RouterExternalGatewayInfoArgs] = None,
interfaces: Optional[Sequence[RouterInterfaceArgs]] = None,
last_updated: Optional[str] = None,
name: Optional[str] = None,
project_id: Optional[float] = None,
project_name: Optional[str] = None,
region_id: Optional[float] = None,
region_name: Optional[str] = None,
router_id: Optional[str] = None,
routes: Optional[Sequence[RouterRouteArgs]] = None)
func NewRouter(ctx *Context, name string, args *RouterArgs, opts ...ResourceOption) (*Router, error)
public Router(string name, RouterArgs? args = null, CustomResourceOptions? opts = null)
public Router(String name, RouterArgs args)
public Router(String name, RouterArgs args, CustomResourceOptions options)
type: edgecenter:Router
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- 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.
- args RouterArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control 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.
- name String
- The unique name of the resource.
- args RouterArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var routerResource = new Edgecenter.Router("routerResource", new()
{
ExternalGatewayInfo = new Edgecenter.Inputs.RouterExternalGatewayInfoArgs
{
ExternalFixedIps = new[]
{
new Edgecenter.Inputs.RouterExternalGatewayInfoExternalFixedIpArgs
{
IpAddress = "string",
SubnetId = "string",
},
},
NetworkId = "string",
Type = "string",
},
Interfaces = new[]
{
new Edgecenter.Inputs.RouterInterfaceArgs
{
SubnetId = "string",
Type = "string",
IpAddress = "string",
MacAddress = "string",
NetworkId = "string",
PortId = "string",
},
},
LastUpdated = "string",
Name = "string",
ProjectId = 0,
ProjectName = "string",
RegionId = 0,
RegionName = "string",
RouterId = "string",
Routes = new[]
{
new Edgecenter.Inputs.RouterRouteArgs
{
Destination = "string",
Nexthop = "string",
},
},
});
example, err := edgecenter.NewRouter(ctx, "routerResource", &edgecenter.RouterArgs{
ExternalGatewayInfo: &edgecenter.RouterExternalGatewayInfoArgs{
ExternalFixedIps: edgecenter.RouterExternalGatewayInfoExternalFixedIpArray{
&edgecenter.RouterExternalGatewayInfoExternalFixedIpArgs{
IpAddress: pulumi.String("string"),
SubnetId: pulumi.String("string"),
},
},
NetworkId: pulumi.String("string"),
Type: pulumi.String("string"),
},
Interfaces: edgecenter.RouterInterfaceArray{
&edgecenter.RouterInterfaceArgs{
SubnetId: pulumi.String("string"),
Type: pulumi.String("string"),
IpAddress: pulumi.String("string"),
MacAddress: pulumi.String("string"),
NetworkId: pulumi.String("string"),
PortId: pulumi.String("string"),
},
},
LastUpdated: pulumi.String("string"),
Name: pulumi.String("string"),
ProjectId: pulumi.Float64(0),
ProjectName: pulumi.String("string"),
RegionId: pulumi.Float64(0),
RegionName: pulumi.String("string"),
RouterId: pulumi.String("string"),
Routes: edgecenter.RouterRouteArray{
&edgecenter.RouterRouteArgs{
Destination: pulumi.String("string"),
Nexthop: pulumi.String("string"),
},
},
})
var routerResource = new Router("routerResource", RouterArgs.builder()
.externalGatewayInfo(RouterExternalGatewayInfoArgs.builder()
.externalFixedIps(RouterExternalGatewayInfoExternalFixedIpArgs.builder()
.ipAddress("string")
.subnetId("string")
.build())
.networkId("string")
.type("string")
.build())
.interfaces(RouterInterfaceArgs.builder()
.subnetId("string")
.type("string")
.ipAddress("string")
.macAddress("string")
.networkId("string")
.portId("string")
.build())
.lastUpdated("string")
.name("string")
.projectId(0)
.projectName("string")
.regionId(0)
.regionName("string")
.routerId("string")
.routes(RouterRouteArgs.builder()
.destination("string")
.nexthop("string")
.build())
.build());
router_resource = edgecenter.Router("routerResource",
external_gateway_info={
"external_fixed_ips": [{
"ip_address": "string",
"subnet_id": "string",
}],
"network_id": "string",
"type": "string",
},
interfaces=[{
"subnet_id": "string",
"type": "string",
"ip_address": "string",
"mac_address": "string",
"network_id": "string",
"port_id": "string",
}],
last_updated="string",
name="string",
project_id=0,
project_name="string",
region_id=0,
region_name="string",
router_id="string",
routes=[{
"destination": "string",
"nexthop": "string",
}])
const routerResource = new edgecenter.Router("routerResource", {
externalGatewayInfo: {
externalFixedIps: [{
ipAddress: "string",
subnetId: "string",
}],
networkId: "string",
type: "string",
},
interfaces: [{
subnetId: "string",
type: "string",
ipAddress: "string",
macAddress: "string",
networkId: "string",
portId: "string",
}],
lastUpdated: "string",
name: "string",
projectId: 0,
projectName: "string",
regionId: 0,
regionName: "string",
routerId: "string",
routes: [{
destination: "string",
nexthop: "string",
}],
});
type: edgecenter:Router
properties:
externalGatewayInfo:
externalFixedIps:
- ipAddress: string
subnetId: string
networkId: string
type: string
interfaces:
- ipAddress: string
macAddress: string
networkId: string
portId: string
subnetId: string
type: string
lastUpdated: string
name: string
projectId: 0
projectName: string
regionId: 0
regionName: string
routerId: string
routes:
- destination: string
nexthop: string
Router Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Router resource accepts the following input properties:
- External
Gateway RouterInfo External Gateway Info - Information related to the external gateway. If not set SNAT is disabled.
- Interfaces
List<Router
Interface> - Set of interfaces associated with the router.
- Last
Updated string - The timestamp of the last update (use with update context).
- Name string
- The name of the router.
- Project
Id double - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- Project
Name string - The name of the project. Either 'projectid' or 'projectname' must be specified.
- Region
Id double - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- Region
Name string - The name of the region. Either 'regionid' or 'regionname' must be specified.
- Router
Id string - The ID of this resource.
- Routes
List<Router
Route> - List of static routes to be applied to the router.
- External
Gateway RouterInfo External Gateway Info Args - Information related to the external gateway. If not set SNAT is disabled.
- Interfaces
[]Router
Interface Args - Set of interfaces associated with the router.
- Last
Updated string - The timestamp of the last update (use with update context).
- Name string
- The name of the router.
- Project
Id float64 - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- Project
Name string - The name of the project. Either 'projectid' or 'projectname' must be specified.
- Region
Id float64 - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- Region
Name string - The name of the region. Either 'regionid' or 'regionname' must be specified.
- Router
Id string - The ID of this resource.
- Routes
[]Router
Route Args - List of static routes to be applied to the router.
- external
Gateway RouterInfo External Gateway Info - Information related to the external gateway. If not set SNAT is disabled.
- interfaces
List<Router
Interface> - Set of interfaces associated with the router.
- last
Updated String - The timestamp of the last update (use with update context).
- name String
- The name of the router.
- project
Id Double - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project
Name String - The name of the project. Either 'projectid' or 'projectname' must be specified.
- region
Id Double - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- region
Name String - The name of the region. Either 'regionid' or 'regionname' must be specified.
- router
Id String - The ID of this resource.
- routes
List<Router
Route> - List of static routes to be applied to the router.
- external
Gateway RouterInfo External Gateway Info - Information related to the external gateway. If not set SNAT is disabled.
- interfaces
Router
Interface[] - Set of interfaces associated with the router.
- last
Updated string - The timestamp of the last update (use with update context).
- name string
- The name of the router.
- project
Id number - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project
Name string - The name of the project. Either 'projectid' or 'projectname' must be specified.
- region
Id number - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- region
Name string - The name of the region. Either 'regionid' or 'regionname' must be specified.
- router
Id string - The ID of this resource.
- routes
Router
Route[] - List of static routes to be applied to the router.
- external_
gateway_ Routerinfo External Gateway Info Args - Information related to the external gateway. If not set SNAT is disabled.
- interfaces
Sequence[Router
Interface Args] - Set of interfaces associated with the router.
- last_
updated str - The timestamp of the last update (use with update context).
- name str
- The name of the router.
- project_
id float - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project_
name str - The name of the project. Either 'projectid' or 'projectname' must be specified.
- region_
id float - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- region_
name str - The name of the region. Either 'regionid' or 'regionname' must be specified.
- router_
id str - The ID of this resource.
- routes
Sequence[Router
Route Args] - List of static routes to be applied to the router.
- external
Gateway Property MapInfo - Information related to the external gateway. If not set SNAT is disabled.
- interfaces List<Property Map>
- Set of interfaces associated with the router.
- last
Updated String - The timestamp of the last update (use with update context).
- name String
- The name of the router.
- project
Id Number - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project
Name String - The name of the project. Either 'projectid' or 'projectname' must be specified.
- region
Id Number - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- region
Name String - The name of the region. Either 'regionid' or 'regionname' must be specified.
- router
Id String - The ID of this resource.
- routes List<Property Map>
- List of static routes to be applied to the router.
Outputs
All input properties are implicitly available as output properties. Additionally, the Router resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up 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): Router
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
external_gateway_info: Optional[RouterExternalGatewayInfoArgs] = None,
interfaces: Optional[Sequence[RouterInterfaceArgs]] = None,
last_updated: Optional[str] = None,
name: Optional[str] = None,
project_id: Optional[float] = None,
project_name: Optional[str] = None,
region_id: Optional[float] = None,
region_name: Optional[str] = None,
router_id: Optional[str] = None,
routes: Optional[Sequence[RouterRouteArgs]] = None) -> Router
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)
public static Router get(String name, Output<String> id, RouterState state, CustomResourceOptions options)
resources: _: type: edgecenter:Router get: id: ${id}
- 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.
- 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.
- External
Gateway RouterInfo External Gateway Info - Information related to the external gateway. If not set SNAT is disabled.
- Interfaces
List<Router
Interface> - Set of interfaces associated with the router.
- Last
Updated string - The timestamp of the last update (use with update context).
- Name string
- The name of the router.
- Project
Id double - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- Project
Name string - The name of the project. Either 'projectid' or 'projectname' must be specified.
- Region
Id double - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- Region
Name string - The name of the region. Either 'regionid' or 'regionname' must be specified.
- Router
Id string - The ID of this resource.
- Routes
List<Router
Route> - List of static routes to be applied to the router.
- External
Gateway RouterInfo External Gateway Info Args - Information related to the external gateway. If not set SNAT is disabled.
- Interfaces
[]Router
Interface Args - Set of interfaces associated with the router.
- Last
Updated string - The timestamp of the last update (use with update context).
- Name string
- The name of the router.
- Project
Id float64 - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- Project
Name string - The name of the project. Either 'projectid' or 'projectname' must be specified.
- Region
Id float64 - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- Region
Name string - The name of the region. Either 'regionid' or 'regionname' must be specified.
- Router
Id string - The ID of this resource.
- Routes
[]Router
Route Args - List of static routes to be applied to the router.
- external
Gateway RouterInfo External Gateway Info - Information related to the external gateway. If not set SNAT is disabled.
- interfaces
List<Router
Interface> - Set of interfaces associated with the router.
- last
Updated String - The timestamp of the last update (use with update context).
- name String
- The name of the router.
- project
Id Double - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project
Name String - The name of the project. Either 'projectid' or 'projectname' must be specified.
- region
Id Double - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- region
Name String - The name of the region. Either 'regionid' or 'regionname' must be specified.
- router
Id String - The ID of this resource.
- routes
List<Router
Route> - List of static routes to be applied to the router.
- external
Gateway RouterInfo External Gateway Info - Information related to the external gateway. If not set SNAT is disabled.
- interfaces
Router
Interface[] - Set of interfaces associated with the router.
- last
Updated string - The timestamp of the last update (use with update context).
- name string
- The name of the router.
- project
Id number - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project
Name string - The name of the project. Either 'projectid' or 'projectname' must be specified.
- region
Id number - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- region
Name string - The name of the region. Either 'regionid' or 'regionname' must be specified.
- router
Id string - The ID of this resource.
- routes
Router
Route[] - List of static routes to be applied to the router.
- external_
gateway_ Routerinfo External Gateway Info Args - Information related to the external gateway. If not set SNAT is disabled.
- interfaces
Sequence[Router
Interface Args] - Set of interfaces associated with the router.
- last_
updated str - The timestamp of the last update (use with update context).
- name str
- The name of the router.
- project_
id float - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project_
name str - The name of the project. Either 'projectid' or 'projectname' must be specified.
- region_
id float - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- region_
name str - The name of the region. Either 'regionid' or 'regionname' must be specified.
- router_
id str - The ID of this resource.
- routes
Sequence[Router
Route Args] - List of static routes to be applied to the router.
- external
Gateway Property MapInfo - Information related to the external gateway. If not set SNAT is disabled.
- interfaces List<Property Map>
- Set of interfaces associated with the router.
- last
Updated String - The timestamp of the last update (use with update context).
- name String
- The name of the router.
- project
Id Number - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project
Name String - The name of the project. Either 'projectid' or 'projectname' must be specified.
- region
Id Number - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- region
Name String - The name of the region. Either 'regionid' or 'regionname' must be specified.
- router
Id String - The ID of this resource.
- routes List<Property Map>
- List of static routes to be applied to the router.
Supporting Types
RouterExternalGatewayInfo, RouterExternalGatewayInfoArgs
- Enable
Snat bool - External
Fixed List<RouterIps External Gateway Info External Fixed Ip> - Network
Id string - Id of the external network
- Type string
- Must be 'manual' or 'default'
- Enable
Snat bool - External
Fixed []RouterIps External Gateway Info External Fixed Ip - Network
Id string - Id of the external network
- Type string
- Must be 'manual' or 'default'
- enable
Snat Boolean - external
Fixed List<RouterIps External Gateway Info External Fixed Ip> - network
Id String - Id of the external network
- type String
- Must be 'manual' or 'default'
- enable
Snat boolean - external
Fixed RouterIps External Gateway Info External Fixed Ip[] - network
Id string - Id of the external network
- type string
- Must be 'manual' or 'default'
- enable_
snat bool - external_
fixed_ Sequence[Routerips External Gateway Info External Fixed Ip] - network_
id str - Id of the external network
- type str
- Must be 'manual' or 'default'
- enable
Snat Boolean - external
Fixed List<Property Map>Ips - network
Id String - Id of the external network
- type String
- Must be 'manual' or 'default'
RouterExternalGatewayInfoExternalFixedIp, RouterExternalGatewayInfoExternalFixedIpArgs
- ip_
address str - subnet_
id str
RouterInterface, RouterInterfaceArgs
- subnet_
id str - Subnet for router interface must have a gateway IP
- type str
- must be 'subnet'
- ip_
address str - mac_
address str - network_
id str - port_
id str
RouterRoute, RouterRouteArgs
- Destination string
- Nexthop string
- IPv4 address to forward traffic to if it's destination IP matches 'destination' CIDR
- Destination string
- Nexthop string
- IPv4 address to forward traffic to if it's destination IP matches 'destination' CIDR
- destination String
- nexthop String
- IPv4 address to forward traffic to if it's destination IP matches 'destination' CIDR
- destination string
- nexthop string
- IPv4 address to forward traffic to if it's destination IP matches 'destination' CIDR
- destination str
- nexthop str
- IPv4 address to forward traffic to if it's destination IP matches 'destination' CIDR
- destination String
- nexthop String
- IPv4 address to forward traffic to if it's destination IP matches 'destination' CIDR
Import
import using <project_id>:<region_id>:<router_id> format
$ pulumi import edgecenter:index/router:Router router1 1:6:447d2959-8ae0-4ca0-8d47-9f050a3637d7
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- edgecenter edge-center/terraform-provider-edgecenter
- License
- Notes
- This Pulumi package is based on the
edgecenter
Terraform Provider.