Creates and manages a static route in the Global Router service using public API v1. For more information about global router static routes, see the official Selectel documentation.
Note: Next hop IP address in a static route must belong to one of the subnets already connected to the router. If you create the
selectel.GlobalRouterVpcSubnetV1resource in the same run as the static route, make sure to usedepends_onto enforce the global router subnet resource creation before the static route creation is triggered. We strongly recommend to use thelifecycleargument that triggers static route recreation in case the parent subnet was recreated.
Create GlobalRouterStaticRouteV1 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new GlobalRouterStaticRouteV1(name: string, args: GlobalRouterStaticRouteV1Args, opts?: CustomResourceOptions);@overload
def GlobalRouterStaticRouteV1(resource_name: str,
args: GlobalRouterStaticRouteV1Args,
opts: Optional[ResourceOptions] = None)
@overload
def GlobalRouterStaticRouteV1(resource_name: str,
opts: Optional[ResourceOptions] = None,
cidr: Optional[str] = None,
next_hop: Optional[str] = None,
router_id: Optional[str] = None,
global_router_static_route_v1_id: Optional[str] = None,
name: Optional[str] = None,
tags: Optional[Sequence[str]] = None,
timeouts: Optional[GlobalRouterStaticRouteV1TimeoutsArgs] = None)func NewGlobalRouterStaticRouteV1(ctx *Context, name string, args GlobalRouterStaticRouteV1Args, opts ...ResourceOption) (*GlobalRouterStaticRouteV1, error)public GlobalRouterStaticRouteV1(string name, GlobalRouterStaticRouteV1Args args, CustomResourceOptions? opts = null)
public GlobalRouterStaticRouteV1(String name, GlobalRouterStaticRouteV1Args args)
public GlobalRouterStaticRouteV1(String name, GlobalRouterStaticRouteV1Args args, CustomResourceOptions options)
type: selectel:GlobalRouterStaticRouteV1
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 GlobalRouterStaticRouteV1Args
- 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 GlobalRouterStaticRouteV1Args
- 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 GlobalRouterStaticRouteV1Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args GlobalRouterStaticRouteV1Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args GlobalRouterStaticRouteV1Args
- 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 globalRouterStaticRouteV1Resource = new Selectel.GlobalRouterStaticRouteV1("globalRouterStaticRouteV1Resource", new()
{
Cidr = "string",
NextHop = "string",
RouterId = "string",
GlobalRouterStaticRouteV1Id = "string",
Name = "string",
Tags = new[]
{
"string",
},
Timeouts = new Selectel.Inputs.GlobalRouterStaticRouteV1TimeoutsArgs
{
Create = "string",
Delete = "string",
Update = "string",
},
});
example, err := selectel.NewGlobalRouterStaticRouteV1(ctx, "globalRouterStaticRouteV1Resource", &selectel.GlobalRouterStaticRouteV1Args{
Cidr: pulumi.String("string"),
NextHop: pulumi.String("string"),
RouterId: pulumi.String("string"),
GlobalRouterStaticRouteV1Id: pulumi.String("string"),
Name: pulumi.String("string"),
Tags: pulumi.StringArray{
pulumi.String("string"),
},
Timeouts: &selectel.GlobalRouterStaticRouteV1TimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
Update: pulumi.String("string"),
},
})
var globalRouterStaticRouteV1Resource = new GlobalRouterStaticRouteV1("globalRouterStaticRouteV1Resource", GlobalRouterStaticRouteV1Args.builder()
.cidr("string")
.nextHop("string")
.routerId("string")
.globalRouterStaticRouteV1Id("string")
.name("string")
.tags("string")
.timeouts(GlobalRouterStaticRouteV1TimeoutsArgs.builder()
.create("string")
.delete("string")
.update("string")
.build())
.build());
global_router_static_route_v1_resource = selectel.GlobalRouterStaticRouteV1("globalRouterStaticRouteV1Resource",
cidr="string",
next_hop="string",
router_id="string",
global_router_static_route_v1_id="string",
name="string",
tags=["string"],
timeouts={
"create": "string",
"delete": "string",
"update": "string",
})
const globalRouterStaticRouteV1Resource = new selectel.GlobalRouterStaticRouteV1("globalRouterStaticRouteV1Resource", {
cidr: "string",
nextHop: "string",
routerId: "string",
globalRouterStaticRouteV1Id: "string",
name: "string",
tags: ["string"],
timeouts: {
create: "string",
"delete": "string",
update: "string",
},
});
type: selectel:GlobalRouterStaticRouteV1
properties:
cidr: string
globalRouterStaticRouteV1Id: string
name: string
nextHop: string
routerId: string
tags:
- string
timeouts:
create: string
delete: string
update: string
GlobalRouterStaticRouteV1 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 GlobalRouterStaticRouteV1 resource accepts the following input properties:
- Cidr string
- Destination subnet IP address range in CIDR notation to which you direct traffic. Changing this deletes the static route and recreates it with the new argument value.
- Next
Hop string - IP address in a subnet through which traffic will be routed to the destination subnet. The IP address must belong to one of the subnets connected to the router. Changing this deletes the static route and recreates it with the new argument value.
- Router
Id string - Unique identifier of the global router the static route will be created on. Retrieved from the global_router_router_v1 resource. Changing this deletes the static route and recreates it with the new argument value.
- Global
Router stringStatic Route V1Id - Unique identifier of the static route.
- Name string
- Name of the static route.
- List<string>
- List of static route tags.
- Timeouts
Global
Router Static Route V1Timeouts
- Cidr string
- Destination subnet IP address range in CIDR notation to which you direct traffic. Changing this deletes the static route and recreates it with the new argument value.
- Next
Hop string - IP address in a subnet through which traffic will be routed to the destination subnet. The IP address must belong to one of the subnets connected to the router. Changing this deletes the static route and recreates it with the new argument value.
- Router
Id string - Unique identifier of the global router the static route will be created on. Retrieved from the global_router_router_v1 resource. Changing this deletes the static route and recreates it with the new argument value.
- Global
Router stringStatic Route V1Id - Unique identifier of the static route.
- Name string
- Name of the static route.
- []string
- List of static route tags.
- Timeouts
Global
Router Static Route V1Timeouts Args
- cidr String
- Destination subnet IP address range in CIDR notation to which you direct traffic. Changing this deletes the static route and recreates it with the new argument value.
- next
Hop String - IP address in a subnet through which traffic will be routed to the destination subnet. The IP address must belong to one of the subnets connected to the router. Changing this deletes the static route and recreates it with the new argument value.
- router
Id String - Unique identifier of the global router the static route will be created on. Retrieved from the global_router_router_v1 resource. Changing this deletes the static route and recreates it with the new argument value.
- global
Router StringStatic Route V1Id - Unique identifier of the static route.
- name String
- Name of the static route.
- List<String>
- List of static route tags.
- timeouts
Global
Router Static Route V1Timeouts
- cidr string
- Destination subnet IP address range in CIDR notation to which you direct traffic. Changing this deletes the static route and recreates it with the new argument value.
- next
Hop string - IP address in a subnet through which traffic will be routed to the destination subnet. The IP address must belong to one of the subnets connected to the router. Changing this deletes the static route and recreates it with the new argument value.
- router
Id string - Unique identifier of the global router the static route will be created on. Retrieved from the global_router_router_v1 resource. Changing this deletes the static route and recreates it with the new argument value.
- global
Router stringStatic Route V1Id - Unique identifier of the static route.
- name string
- Name of the static route.
- string[]
- List of static route tags.
- timeouts
Global
Router Static Route V1Timeouts
- cidr str
- Destination subnet IP address range in CIDR notation to which you direct traffic. Changing this deletes the static route and recreates it with the new argument value.
- next_
hop str - IP address in a subnet through which traffic will be routed to the destination subnet. The IP address must belong to one of the subnets connected to the router. Changing this deletes the static route and recreates it with the new argument value.
- router_
id str - Unique identifier of the global router the static route will be created on. Retrieved from the global_router_router_v1 resource. Changing this deletes the static route and recreates it with the new argument value.
- global_
router_ strstatic_ route_ v1_ id - Unique identifier of the static route.
- name str
- Name of the static route.
- Sequence[str]
- List of static route tags.
- timeouts
Global
Router Static Route V1Timeouts Args
- cidr String
- Destination subnet IP address range in CIDR notation to which you direct traffic. Changing this deletes the static route and recreates it with the new argument value.
- next
Hop String - IP address in a subnet through which traffic will be routed to the destination subnet. The IP address must belong to one of the subnets connected to the router. Changing this deletes the static route and recreates it with the new argument value.
- router
Id String - Unique identifier of the global router the static route will be created on. Retrieved from the global_router_router_v1 resource. Changing this deletes the static route and recreates it with the new argument value.
- global
Router StringStatic Route V1Id - Unique identifier of the static route.
- name String
- Name of the static route.
- List<String>
- List of static route tags.
- timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the GlobalRouterStaticRouteV1 resource produces the following output properties:
- Account
Id string - Selectel account ID.
- Created
At string - Time when the static route was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Netops
Static stringRoute Id - Option for internal usage.
- Project
Id string - Unique identifier of the associated project.
- Status string
- Static route status.
- Subnet
Id string - Unique identifier of the global router subnet which contains the next hop IP address.
- Updated
At string - Time when the static route was updated.
- Account
Id string - Selectel account ID.
- Created
At string - Time when the static route was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Netops
Static stringRoute Id - Option for internal usage.
- Project
Id string - Unique identifier of the associated project.
- Status string
- Static route status.
- Subnet
Id string - Unique identifier of the global router subnet which contains the next hop IP address.
- Updated
At string - Time when the static route was updated.
- account
Id String - Selectel account ID.
- created
At String - Time when the static route was created.
- id String
- The provider-assigned unique ID for this managed resource.
- netops
Static StringRoute Id - Option for internal usage.
- project
Id String - Unique identifier of the associated project.
- status String
- Static route status.
- subnet
Id String - Unique identifier of the global router subnet which contains the next hop IP address.
- updated
At String - Time when the static route was updated.
- account
Id string - Selectel account ID.
- created
At string - Time when the static route was created.
- id string
- The provider-assigned unique ID for this managed resource.
- netops
Static stringRoute Id - Option for internal usage.
- project
Id string - Unique identifier of the associated project.
- status string
- Static route status.
- subnet
Id string - Unique identifier of the global router subnet which contains the next hop IP address.
- updated
At string - Time when the static route was updated.
- account_
id str - Selectel account ID.
- created_
at str - Time when the static route was created.
- id str
- The provider-assigned unique ID for this managed resource.
- netops_
static_ strroute_ id - Option for internal usage.
- project_
id str - Unique identifier of the associated project.
- status str
- Static route status.
- subnet_
id str - Unique identifier of the global router subnet which contains the next hop IP address.
- updated_
at str - Time when the static route was updated.
- account
Id String - Selectel account ID.
- created
At String - Time when the static route was created.
- id String
- The provider-assigned unique ID for this managed resource.
- netops
Static StringRoute Id - Option for internal usage.
- project
Id String - Unique identifier of the associated project.
- status String
- Static route status.
- subnet
Id String - Unique identifier of the global router subnet which contains the next hop IP address.
- updated
At String - Time when the static route was updated.
Look up Existing GlobalRouterStaticRouteV1 Resource
Get an existing GlobalRouterStaticRouteV1 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?: GlobalRouterStaticRouteV1State, opts?: CustomResourceOptions): GlobalRouterStaticRouteV1@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
cidr: Optional[str] = None,
created_at: Optional[str] = None,
global_router_static_route_v1_id: Optional[str] = None,
name: Optional[str] = None,
netops_static_route_id: Optional[str] = None,
next_hop: Optional[str] = None,
project_id: Optional[str] = None,
router_id: Optional[str] = None,
status: Optional[str] = None,
subnet_id: Optional[str] = None,
tags: Optional[Sequence[str]] = None,
timeouts: Optional[GlobalRouterStaticRouteV1TimeoutsArgs] = None,
updated_at: Optional[str] = None) -> GlobalRouterStaticRouteV1func GetGlobalRouterStaticRouteV1(ctx *Context, name string, id IDInput, state *GlobalRouterStaticRouteV1State, opts ...ResourceOption) (*GlobalRouterStaticRouteV1, error)public static GlobalRouterStaticRouteV1 Get(string name, Input<string> id, GlobalRouterStaticRouteV1State? state, CustomResourceOptions? opts = null)public static GlobalRouterStaticRouteV1 get(String name, Output<String> id, GlobalRouterStaticRouteV1State state, CustomResourceOptions options)resources: _: type: selectel:GlobalRouterStaticRouteV1 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.
- Account
Id string - Selectel account ID.
- Cidr string
- Destination subnet IP address range in CIDR notation to which you direct traffic. Changing this deletes the static route and recreates it with the new argument value.
- Created
At string - Time when the static route was created.
- Global
Router stringStatic Route V1Id - Unique identifier of the static route.
- Name string
- Name of the static route.
- Netops
Static stringRoute Id - Option for internal usage.
- Next
Hop string - IP address in a subnet through which traffic will be routed to the destination subnet. The IP address must belong to one of the subnets connected to the router. Changing this deletes the static route and recreates it with the new argument value.
- Project
Id string - Unique identifier of the associated project.
- Router
Id string - Unique identifier of the global router the static route will be created on. Retrieved from the global_router_router_v1 resource. Changing this deletes the static route and recreates it with the new argument value.
- Status string
- Static route status.
- Subnet
Id string - Unique identifier of the global router subnet which contains the next hop IP address.
- List<string>
- List of static route tags.
- Timeouts
Global
Router Static Route V1Timeouts - Updated
At string - Time when the static route was updated.
- Account
Id string - Selectel account ID.
- Cidr string
- Destination subnet IP address range in CIDR notation to which you direct traffic. Changing this deletes the static route and recreates it with the new argument value.
- Created
At string - Time when the static route was created.
- Global
Router stringStatic Route V1Id - Unique identifier of the static route.
- Name string
- Name of the static route.
- Netops
Static stringRoute Id - Option for internal usage.
- Next
Hop string - IP address in a subnet through which traffic will be routed to the destination subnet. The IP address must belong to one of the subnets connected to the router. Changing this deletes the static route and recreates it with the new argument value.
- Project
Id string - Unique identifier of the associated project.
- Router
Id string - Unique identifier of the global router the static route will be created on. Retrieved from the global_router_router_v1 resource. Changing this deletes the static route and recreates it with the new argument value.
- Status string
- Static route status.
- Subnet
Id string - Unique identifier of the global router subnet which contains the next hop IP address.
- []string
- List of static route tags.
- Timeouts
Global
Router Static Route V1Timeouts Args - Updated
At string - Time when the static route was updated.
- account
Id String - Selectel account ID.
- cidr String
- Destination subnet IP address range in CIDR notation to which you direct traffic. Changing this deletes the static route and recreates it with the new argument value.
- created
At String - Time when the static route was created.
- global
Router StringStatic Route V1Id - Unique identifier of the static route.
- name String
- Name of the static route.
- netops
Static StringRoute Id - Option for internal usage.
- next
Hop String - IP address in a subnet through which traffic will be routed to the destination subnet. The IP address must belong to one of the subnets connected to the router. Changing this deletes the static route and recreates it with the new argument value.
- project
Id String - Unique identifier of the associated project.
- router
Id String - Unique identifier of the global router the static route will be created on. Retrieved from the global_router_router_v1 resource. Changing this deletes the static route and recreates it with the new argument value.
- status String
- Static route status.
- subnet
Id String - Unique identifier of the global router subnet which contains the next hop IP address.
- List<String>
- List of static route tags.
- timeouts
Global
Router Static Route V1Timeouts - updated
At String - Time when the static route was updated.
- account
Id string - Selectel account ID.
- cidr string
- Destination subnet IP address range in CIDR notation to which you direct traffic. Changing this deletes the static route and recreates it with the new argument value.
- created
At string - Time when the static route was created.
- global
Router stringStatic Route V1Id - Unique identifier of the static route.
- name string
- Name of the static route.
- netops
Static stringRoute Id - Option for internal usage.
- next
Hop string - IP address in a subnet through which traffic will be routed to the destination subnet. The IP address must belong to one of the subnets connected to the router. Changing this deletes the static route and recreates it with the new argument value.
- project
Id string - Unique identifier of the associated project.
- router
Id string - Unique identifier of the global router the static route will be created on. Retrieved from the global_router_router_v1 resource. Changing this deletes the static route and recreates it with the new argument value.
- status string
- Static route status.
- subnet
Id string - Unique identifier of the global router subnet which contains the next hop IP address.
- string[]
- List of static route tags.
- timeouts
Global
Router Static Route V1Timeouts - updated
At string - Time when the static route was updated.
- account_
id str - Selectel account ID.
- cidr str
- Destination subnet IP address range in CIDR notation to which you direct traffic. Changing this deletes the static route and recreates it with the new argument value.
- created_
at str - Time when the static route was created.
- global_
router_ strstatic_ route_ v1_ id - Unique identifier of the static route.
- name str
- Name of the static route.
- netops_
static_ strroute_ id - Option for internal usage.
- next_
hop str - IP address in a subnet through which traffic will be routed to the destination subnet. The IP address must belong to one of the subnets connected to the router. Changing this deletes the static route and recreates it with the new argument value.
- project_
id str - Unique identifier of the associated project.
- router_
id str - Unique identifier of the global router the static route will be created on. Retrieved from the global_router_router_v1 resource. Changing this deletes the static route and recreates it with the new argument value.
- status str
- Static route status.
- subnet_
id str - Unique identifier of the global router subnet which contains the next hop IP address.
- Sequence[str]
- List of static route tags.
- timeouts
Global
Router Static Route V1Timeouts Args - updated_
at str - Time when the static route was updated.
- account
Id String - Selectel account ID.
- cidr String
- Destination subnet IP address range in CIDR notation to which you direct traffic. Changing this deletes the static route and recreates it with the new argument value.
- created
At String - Time when the static route was created.
- global
Router StringStatic Route V1Id - Unique identifier of the static route.
- name String
- Name of the static route.
- netops
Static StringRoute Id - Option for internal usage.
- next
Hop String - IP address in a subnet through which traffic will be routed to the destination subnet. The IP address must belong to one of the subnets connected to the router. Changing this deletes the static route and recreates it with the new argument value.
- project
Id String - Unique identifier of the associated project.
- router
Id String - Unique identifier of the global router the static route will be created on. Retrieved from the global_router_router_v1 resource. Changing this deletes the static route and recreates it with the new argument value.
- status String
- Static route status.
- subnet
Id String - Unique identifier of the global router subnet which contains the next hop IP address.
- List<String>
- List of static route tags.
- timeouts Property Map
- updated
At String - Time when the static route was updated.
Supporting Types
GlobalRouterStaticRouteV1Timeouts, GlobalRouterStaticRouteV1TimeoutsArgs
Package Details
- Repository
- selectel selectel/terraform-provider-selectel
- License
- Notes
- This Pulumi package is based on the
selectelTerraform Provider.
