opentelekomcloud.NetworkingRouterInterfaceV2
Up-to-date reference of API arguments for VPC router interface you can get at documentation portal
Manages a V2 router interface resource within OpenTelekomCloud.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";
const network1 = new opentelekomcloud.NetworkingNetworkV2("network1", {adminStateUp: "true"});
const subnet1 = new opentelekomcloud.NetworkingSubnetV2("subnet1", {
    networkId: network1.networkingNetworkV2Id,
    cidr: "192.168.199.0/24",
    ipVersion: 4,
});
const router1 = new opentelekomcloud.NetworkingRouterV2("router1", {externalGateway: "f67f0d72-0ddf-11e4-9d95-e1f29f417e2f"});
const routerInterface1 = new opentelekomcloud.NetworkingRouterInterfaceV2("routerInterface1", {
    routerId: router1.networkingRouterV2Id,
    subnetId: subnet1.networkingSubnetV2Id,
});
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud
network1 = opentelekomcloud.NetworkingNetworkV2("network1", admin_state_up="true")
subnet1 = opentelekomcloud.NetworkingSubnetV2("subnet1",
    network_id=network1.networking_network_v2_id,
    cidr="192.168.199.0/24",
    ip_version=4)
router1 = opentelekomcloud.NetworkingRouterV2("router1", external_gateway="f67f0d72-0ddf-11e4-9d95-e1f29f417e2f")
router_interface1 = opentelekomcloud.NetworkingRouterInterfaceV2("routerInterface1",
    router_id=router1.networking_router_v2_id,
    subnet_id=subnet1.networking_subnet_v2_id)
package main
import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		network1, err := opentelekomcloud.NewNetworkingNetworkV2(ctx, "network1", &opentelekomcloud.NetworkingNetworkV2Args{
			AdminStateUp: pulumi.String("true"),
		})
		if err != nil {
			return err
		}
		subnet1, err := opentelekomcloud.NewNetworkingSubnetV2(ctx, "subnet1", &opentelekomcloud.NetworkingSubnetV2Args{
			NetworkId: network1.NetworkingNetworkV2Id,
			Cidr:      pulumi.String("192.168.199.0/24"),
			IpVersion: pulumi.Float64(4),
		})
		if err != nil {
			return err
		}
		router1, err := opentelekomcloud.NewNetworkingRouterV2(ctx, "router1", &opentelekomcloud.NetworkingRouterV2Args{
			ExternalGateway: pulumi.String("f67f0d72-0ddf-11e4-9d95-e1f29f417e2f"),
		})
		if err != nil {
			return err
		}
		_, err = opentelekomcloud.NewNetworkingRouterInterfaceV2(ctx, "routerInterface1", &opentelekomcloud.NetworkingRouterInterfaceV2Args{
			RouterId: router1.NetworkingRouterV2Id,
			SubnetId: subnet1.NetworkingSubnetV2Id,
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;
return await Deployment.RunAsync(() => 
{
    var network1 = new Opentelekomcloud.NetworkingNetworkV2("network1", new()
    {
        AdminStateUp = "true",
    });
    var subnet1 = new Opentelekomcloud.NetworkingSubnetV2("subnet1", new()
    {
        NetworkId = network1.NetworkingNetworkV2Id,
        Cidr = "192.168.199.0/24",
        IpVersion = 4,
    });
    var router1 = new Opentelekomcloud.NetworkingRouterV2("router1", new()
    {
        ExternalGateway = "f67f0d72-0ddf-11e4-9d95-e1f29f417e2f",
    });
    var routerInterface1 = new Opentelekomcloud.NetworkingRouterInterfaceV2("routerInterface1", new()
    {
        RouterId = router1.NetworkingRouterV2Id,
        SubnetId = subnet1.NetworkingSubnetV2Id,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.NetworkingNetworkV2;
import com.pulumi.opentelekomcloud.NetworkingNetworkV2Args;
import com.pulumi.opentelekomcloud.NetworkingSubnetV2;
import com.pulumi.opentelekomcloud.NetworkingSubnetV2Args;
import com.pulumi.opentelekomcloud.NetworkingRouterV2;
import com.pulumi.opentelekomcloud.NetworkingRouterV2Args;
import com.pulumi.opentelekomcloud.NetworkingRouterInterfaceV2;
import com.pulumi.opentelekomcloud.NetworkingRouterInterfaceV2Args;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        var network1 = new NetworkingNetworkV2("network1", NetworkingNetworkV2Args.builder()
            .adminStateUp("true")
            .build());
        var subnet1 = new NetworkingSubnetV2("subnet1", NetworkingSubnetV2Args.builder()
            .networkId(network1.networkingNetworkV2Id())
            .cidr("192.168.199.0/24")
            .ipVersion(4)
            .build());
        var router1 = new NetworkingRouterV2("router1", NetworkingRouterV2Args.builder()
            .externalGateway("f67f0d72-0ddf-11e4-9d95-e1f29f417e2f")
            .build());
        var routerInterface1 = new NetworkingRouterInterfaceV2("routerInterface1", NetworkingRouterInterfaceV2Args.builder()
            .routerId(router1.networkingRouterV2Id())
            .subnetId(subnet1.networkingSubnetV2Id())
            .build());
    }
}
resources:
  network1:
    type: opentelekomcloud:NetworkingNetworkV2
    properties:
      adminStateUp: 'true'
  subnet1:
    type: opentelekomcloud:NetworkingSubnetV2
    properties:
      networkId: ${network1.networkingNetworkV2Id}
      cidr: 192.168.199.0/24
      ipVersion: 4
  router1:
    type: opentelekomcloud:NetworkingRouterV2
    properties:
      externalGateway: f67f0d72-0ddf-11e4-9d95-e1f29f417e2f
  routerInterface1:
    type: opentelekomcloud:NetworkingRouterInterfaceV2
    properties:
      routerId: ${router1.networkingRouterV2Id}
      subnetId: ${subnet1.networkingSubnetV2Id}
Create NetworkingRouterInterfaceV2 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new NetworkingRouterInterfaceV2(name: string, args: NetworkingRouterInterfaceV2Args, opts?: CustomResourceOptions);@overload
def NetworkingRouterInterfaceV2(resource_name: str,
                                args: NetworkingRouterInterfaceV2Args,
                                opts: Optional[ResourceOptions] = None)
@overload
def NetworkingRouterInterfaceV2(resource_name: str,
                                opts: Optional[ResourceOptions] = None,
                                router_id: Optional[str] = None,
                                networking_router_interface_v2_id: Optional[str] = None,
                                port_id: Optional[str] = None,
                                region: Optional[str] = None,
                                subnet_id: Optional[str] = None,
                                timeouts: Optional[NetworkingRouterInterfaceV2TimeoutsArgs] = None)func NewNetworkingRouterInterfaceV2(ctx *Context, name string, args NetworkingRouterInterfaceV2Args, opts ...ResourceOption) (*NetworkingRouterInterfaceV2, error)public NetworkingRouterInterfaceV2(string name, NetworkingRouterInterfaceV2Args args, CustomResourceOptions? opts = null)
public NetworkingRouterInterfaceV2(String name, NetworkingRouterInterfaceV2Args args)
public NetworkingRouterInterfaceV2(String name, NetworkingRouterInterfaceV2Args args, CustomResourceOptions options)
type: opentelekomcloud:NetworkingRouterInterfaceV2
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 NetworkingRouterInterfaceV2Args
- 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 NetworkingRouterInterfaceV2Args
- 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 NetworkingRouterInterfaceV2Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NetworkingRouterInterfaceV2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NetworkingRouterInterfaceV2Args
- 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 networkingRouterInterfaceV2Resource = new Opentelekomcloud.NetworkingRouterInterfaceV2("networkingRouterInterfaceV2Resource", new()
{
    RouterId = "string",
    NetworkingRouterInterfaceV2Id = "string",
    PortId = "string",
    Region = "string",
    SubnetId = "string",
    Timeouts = new Opentelekomcloud.Inputs.NetworkingRouterInterfaceV2TimeoutsArgs
    {
        Create = "string",
        Delete = "string",
    },
});
example, err := opentelekomcloud.NewNetworkingRouterInterfaceV2(ctx, "networkingRouterInterfaceV2Resource", &opentelekomcloud.NetworkingRouterInterfaceV2Args{
	RouterId:                      pulumi.String("string"),
	NetworkingRouterInterfaceV2Id: pulumi.String("string"),
	PortId:                        pulumi.String("string"),
	Region:                        pulumi.String("string"),
	SubnetId:                      pulumi.String("string"),
	Timeouts: &opentelekomcloud.NetworkingRouterInterfaceV2TimeoutsArgs{
		Create: pulumi.String("string"),
		Delete: pulumi.String("string"),
	},
})
var networkingRouterInterfaceV2Resource = new NetworkingRouterInterfaceV2("networkingRouterInterfaceV2Resource", NetworkingRouterInterfaceV2Args.builder()
    .routerId("string")
    .networkingRouterInterfaceV2Id("string")
    .portId("string")
    .region("string")
    .subnetId("string")
    .timeouts(NetworkingRouterInterfaceV2TimeoutsArgs.builder()
        .create("string")
        .delete("string")
        .build())
    .build());
networking_router_interface_v2_resource = opentelekomcloud.NetworkingRouterInterfaceV2("networkingRouterInterfaceV2Resource",
    router_id="string",
    networking_router_interface_v2_id="string",
    port_id="string",
    region="string",
    subnet_id="string",
    timeouts={
        "create": "string",
        "delete": "string",
    })
const networkingRouterInterfaceV2Resource = new opentelekomcloud.NetworkingRouterInterfaceV2("networkingRouterInterfaceV2Resource", {
    routerId: "string",
    networkingRouterInterfaceV2Id: "string",
    portId: "string",
    region: "string",
    subnetId: "string",
    timeouts: {
        create: "string",
        "delete": "string",
    },
});
type: opentelekomcloud:NetworkingRouterInterfaceV2
properties:
    networkingRouterInterfaceV2Id: string
    portId: string
    region: string
    routerId: string
    subnetId: string
    timeouts:
        create: string
        delete: string
NetworkingRouterInterfaceV2 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 NetworkingRouterInterfaceV2 resource accepts the following input properties:
- RouterId string
- ID of the router this interface belongs to. Changing this creates a new router interface.
- NetworkingRouter stringInterface V2Id 
- PortId string
- ID of the port this interface connects to. Changing this creates a new router interface.
- Region string
- SubnetId string
- ID of the subnet this interface connects to. Changing this creates a new router interface.
- Timeouts
NetworkingRouter Interface V2Timeouts 
- RouterId string
- ID of the router this interface belongs to. Changing this creates a new router interface.
- NetworkingRouter stringInterface V2Id 
- PortId string
- ID of the port this interface connects to. Changing this creates a new router interface.
- Region string
- SubnetId string
- ID of the subnet this interface connects to. Changing this creates a new router interface.
- Timeouts
NetworkingRouter Interface V2Timeouts Args 
- routerId String
- ID of the router this interface belongs to. Changing this creates a new router interface.
- networkingRouter StringInterface V2Id 
- portId String
- ID of the port this interface connects to. Changing this creates a new router interface.
- region String
- subnetId String
- ID of the subnet this interface connects to. Changing this creates a new router interface.
- timeouts
NetworkingRouter Interface V2Timeouts 
- routerId string
- ID of the router this interface belongs to. Changing this creates a new router interface.
- networkingRouter stringInterface V2Id 
- portId string
- ID of the port this interface connects to. Changing this creates a new router interface.
- region string
- subnetId string
- ID of the subnet this interface connects to. Changing this creates a new router interface.
- timeouts
NetworkingRouter Interface V2Timeouts 
- router_id str
- ID of the router this interface belongs to. Changing this creates a new router interface.
- networking_router_ strinterface_ v2_ id 
- port_id str
- ID of the port this interface connects to. Changing this creates a new router interface.
- region str
- subnet_id str
- ID of the subnet this interface connects to. Changing this creates a new router interface.
- timeouts
NetworkingRouter Interface V2Timeouts Args 
- routerId String
- ID of the router this interface belongs to. Changing this creates a new router interface.
- networkingRouter StringInterface V2Id 
- portId String
- ID of the port this interface connects to. Changing this creates a new router interface.
- region String
- subnetId String
- ID of the subnet this interface connects to. Changing this creates a new router interface.
- timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the NetworkingRouterInterfaceV2 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 NetworkingRouterInterfaceV2 Resource
Get an existing NetworkingRouterInterfaceV2 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?: NetworkingRouterInterfaceV2State, opts?: CustomResourceOptions): NetworkingRouterInterfaceV2@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        networking_router_interface_v2_id: Optional[str] = None,
        port_id: Optional[str] = None,
        region: Optional[str] = None,
        router_id: Optional[str] = None,
        subnet_id: Optional[str] = None,
        timeouts: Optional[NetworkingRouterInterfaceV2TimeoutsArgs] = None) -> NetworkingRouterInterfaceV2func GetNetworkingRouterInterfaceV2(ctx *Context, name string, id IDInput, state *NetworkingRouterInterfaceV2State, opts ...ResourceOption) (*NetworkingRouterInterfaceV2, error)public static NetworkingRouterInterfaceV2 Get(string name, Input<string> id, NetworkingRouterInterfaceV2State? state, CustomResourceOptions? opts = null)public static NetworkingRouterInterfaceV2 get(String name, Output<String> id, NetworkingRouterInterfaceV2State state, CustomResourceOptions options)resources:  _:    type: opentelekomcloud:NetworkingRouterInterfaceV2    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.
- NetworkingRouter stringInterface V2Id 
- PortId string
- ID of the port this interface connects to. Changing this creates a new router interface.
- Region string
- RouterId string
- ID of the router this interface belongs to. Changing this creates a new router interface.
- SubnetId string
- ID of the subnet this interface connects to. Changing this creates a new router interface.
- Timeouts
NetworkingRouter Interface V2Timeouts 
- NetworkingRouter stringInterface V2Id 
- PortId string
- ID of the port this interface connects to. Changing this creates a new router interface.
- Region string
- RouterId string
- ID of the router this interface belongs to. Changing this creates a new router interface.
- SubnetId string
- ID of the subnet this interface connects to. Changing this creates a new router interface.
- Timeouts
NetworkingRouter Interface V2Timeouts Args 
- networkingRouter StringInterface V2Id 
- portId String
- ID of the port this interface connects to. Changing this creates a new router interface.
- region String
- routerId String
- ID of the router this interface belongs to. Changing this creates a new router interface.
- subnetId String
- ID of the subnet this interface connects to. Changing this creates a new router interface.
- timeouts
NetworkingRouter Interface V2Timeouts 
- networkingRouter stringInterface V2Id 
- portId string
- ID of the port this interface connects to. Changing this creates a new router interface.
- region string
- routerId string
- ID of the router this interface belongs to. Changing this creates a new router interface.
- subnetId string
- ID of the subnet this interface connects to. Changing this creates a new router interface.
- timeouts
NetworkingRouter Interface V2Timeouts 
- networking_router_ strinterface_ v2_ id 
- port_id str
- ID of the port this interface connects to. Changing this creates a new router interface.
- region str
- router_id str
- ID of the router this interface belongs to. Changing this creates a new router interface.
- subnet_id str
- ID of the subnet this interface connects to. Changing this creates a new router interface.
- timeouts
NetworkingRouter Interface V2Timeouts Args 
- networkingRouter StringInterface V2Id 
- portId String
- ID of the port this interface connects to. Changing this creates a new router interface.
- region String
- routerId String
- ID of the router this interface belongs to. Changing this creates a new router interface.
- subnetId String
- ID of the subnet this interface connects to. Changing this creates a new router interface.
- timeouts Property Map
Supporting Types
NetworkingRouterInterfaceV2Timeouts, NetworkingRouterInterfaceV2TimeoutsArgs        
Package Details
- Repository
- opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
- License
- Notes
- This Pulumi package is based on the opentelekomcloudTerraform Provider.
