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.0)
    .projectName("string")
    .regionId(0.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:
- ExternalGateway RouterInfo External Gateway Info 
- Information related to the external gateway. If not set SNAT is disabled.
- Interfaces
List<RouterInterface> 
- Set of interfaces associated with the router.
- LastUpdated string
- The timestamp of the last update (use with update context).
- Name string
- The name of the router.
- ProjectId double
- The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- ProjectName string
- The name of the project. Either 'projectid' or 'projectname' must be specified.
- RegionId double
- The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- RegionName string
- The name of the region. Either 'regionid' or 'regionname' must be specified.
- RouterId string
- The ID of this resource.
- Routes
List<RouterRoute> 
- List of static routes to be applied to the router.
- ExternalGateway RouterInfo External Gateway Info Args 
- Information related to the external gateway. If not set SNAT is disabled.
- Interfaces
[]RouterInterface Args 
- Set of interfaces associated with the router.
- LastUpdated string
- The timestamp of the last update (use with update context).
- Name string
- The name of the router.
- ProjectId float64
- The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- ProjectName string
- The name of the project. Either 'projectid' or 'projectname' must be specified.
- RegionId float64
- The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- RegionName string
- The name of the region. Either 'regionid' or 'regionname' must be specified.
- RouterId string
- The ID of this resource.
- Routes
[]RouterRoute Args 
- List of static routes to be applied to the router.
- externalGateway RouterInfo External Gateway Info 
- Information related to the external gateway. If not set SNAT is disabled.
- interfaces
List<RouterInterface> 
- Set of interfaces associated with the router.
- lastUpdated String
- The timestamp of the last update (use with update context).
- name String
- The name of the router.
- projectId Double
- The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- projectName String
- The name of the project. Either 'projectid' or 'projectname' must be specified.
- regionId Double
- The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- regionName String
- The name of the region. Either 'regionid' or 'regionname' must be specified.
- routerId String
- The ID of this resource.
- routes
List<RouterRoute> 
- List of static routes to be applied to the router.
- externalGateway RouterInfo External Gateway Info 
- Information related to the external gateway. If not set SNAT is disabled.
- interfaces
RouterInterface[] 
- Set of interfaces associated with the router.
- lastUpdated string
- The timestamp of the last update (use with update context).
- name string
- The name of the router.
- projectId number
- The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- projectName string
- The name of the project. Either 'projectid' or 'projectname' must be specified.
- regionId number
- The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- regionName string
- The name of the region. Either 'regionid' or 'regionname' must be specified.
- routerId string
- The ID of this resource.
- routes
RouterRoute[] 
- 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[RouterInterface 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[RouterRoute Args] 
- List of static routes to be applied to the router.
- externalGateway 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.
- lastUpdated String
- The timestamp of the last update (use with update context).
- name String
- The name of the router.
- projectId Number
- The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- projectName String
- The name of the project. Either 'projectid' or 'projectname' must be specified.
- regionId Number
- The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- regionName String
- The name of the region. Either 'regionid' or 'regionname' must be specified.
- routerId 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) -> Routerfunc 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.
- ExternalGateway RouterInfo External Gateway Info 
- Information related to the external gateway. If not set SNAT is disabled.
- Interfaces
List<RouterInterface> 
- Set of interfaces associated with the router.
- LastUpdated string
- The timestamp of the last update (use with update context).
- Name string
- The name of the router.
- ProjectId double
- The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- ProjectName string
- The name of the project. Either 'projectid' or 'projectname' must be specified.
- RegionId double
- The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- RegionName string
- The name of the region. Either 'regionid' or 'regionname' must be specified.
- RouterId string
- The ID of this resource.
- Routes
List<RouterRoute> 
- List of static routes to be applied to the router.
- ExternalGateway RouterInfo External Gateway Info Args 
- Information related to the external gateway. If not set SNAT is disabled.
- Interfaces
[]RouterInterface Args 
- Set of interfaces associated with the router.
- LastUpdated string
- The timestamp of the last update (use with update context).
- Name string
- The name of the router.
- ProjectId float64
- The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- ProjectName string
- The name of the project. Either 'projectid' or 'projectname' must be specified.
- RegionId float64
- The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- RegionName string
- The name of the region. Either 'regionid' or 'regionname' must be specified.
- RouterId string
- The ID of this resource.
- Routes
[]RouterRoute Args 
- List of static routes to be applied to the router.
- externalGateway RouterInfo External Gateway Info 
- Information related to the external gateway. If not set SNAT is disabled.
- interfaces
List<RouterInterface> 
- Set of interfaces associated with the router.
- lastUpdated String
- The timestamp of the last update (use with update context).
- name String
- The name of the router.
- projectId Double
- The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- projectName String
- The name of the project. Either 'projectid' or 'projectname' must be specified.
- regionId Double
- The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- regionName String
- The name of the region. Either 'regionid' or 'regionname' must be specified.
- routerId String
- The ID of this resource.
- routes
List<RouterRoute> 
- List of static routes to be applied to the router.
- externalGateway RouterInfo External Gateway Info 
- Information related to the external gateway. If not set SNAT is disabled.
- interfaces
RouterInterface[] 
- Set of interfaces associated with the router.
- lastUpdated string
- The timestamp of the last update (use with update context).
- name string
- The name of the router.
- projectId number
- The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- projectName string
- The name of the project. Either 'projectid' or 'projectname' must be specified.
- regionId number
- The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- regionName string
- The name of the region. Either 'regionid' or 'regionname' must be specified.
- routerId string
- The ID of this resource.
- routes
RouterRoute[] 
- 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[RouterInterface 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[RouterRoute Args] 
- List of static routes to be applied to the router.
- externalGateway 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.
- lastUpdated String
- The timestamp of the last update (use with update context).
- name String
- The name of the router.
- projectId Number
- The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- projectName String
- The name of the project. Either 'projectid' or 'projectname' must be specified.
- regionId Number
- The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- regionName String
- The name of the region. Either 'regionid' or 'regionname' must be specified.
- routerId String
- The ID of this resource.
- routes List<Property Map>
- List of static routes to be applied to the router.
Supporting Types
RouterExternalGatewayInfo, RouterExternalGatewayInfoArgs        
- EnableSnat bool
- ExternalFixed List<RouterIps External Gateway Info External Fixed Ip> 
- NetworkId string
- Id of the external network
- Type string
- Must be 'manual' or 'default'
- EnableSnat bool
- ExternalFixed []RouterIps External Gateway Info External Fixed Ip 
- NetworkId string
- Id of the external network
- Type string
- Must be 'manual' or 'default'
- enableSnat Boolean
- externalFixed List<RouterIps External Gateway Info External Fixed Ip> 
- networkId String
- Id of the external network
- type String
- Must be 'manual' or 'default'
- enableSnat boolean
- externalFixed RouterIps External Gateway Info External Fixed Ip[] 
- networkId 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'
- enableSnat Boolean
- externalFixed List<Property Map>Ips 
- networkId 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 edgecenterTerraform Provider.