vkcs.DcInterface
Explore with Pulumi AI
Manages a direct connect interface resource.
Note: This resource requires Sprut SDN to be enabled in your project.
New since v0.5.0.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as vkcs from "@pulumi/vkcs";
// Connect networks to the router
const dcInterface = new vkcs.DcInterface("dcInterface", {
description: "tf-example-description",
dcRouterId: vkcs_dc_router.dc_router.id,
networkId: vkcs_networking_network.app.id,
subnetId: vkcs_networking_subnet.app.id,
});
import pulumi
import pulumi_vkcs as vkcs
# Connect networks to the router
dc_interface = vkcs.DcInterface("dcInterface",
description="tf-example-description",
dc_router_id=vkcs_dc_router["dc_router"]["id"],
network_id=vkcs_networking_network["app"]["id"],
subnet_id=vkcs_networking_subnet["app"]["id"])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/vkcs/vkcs"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Connect networks to the router
_, err := vkcs.NewDcInterface(ctx, "dcInterface", &vkcs.DcInterfaceArgs{
Description: pulumi.String("tf-example-description"),
DcRouterId: pulumi.Any(vkcs_dc_router.Dc_router.Id),
NetworkId: pulumi.Any(vkcs_networking_network.App.Id),
SubnetId: pulumi.Any(vkcs_networking_subnet.App.Id),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vkcs = Pulumi.Vkcs;
return await Deployment.RunAsync(() =>
{
// Connect networks to the router
var dcInterface = new Vkcs.DcInterface("dcInterface", new()
{
Description = "tf-example-description",
DcRouterId = vkcs_dc_router.Dc_router.Id,
NetworkId = vkcs_networking_network.App.Id,
SubnetId = vkcs_networking_subnet.App.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vkcs.DcInterface;
import com.pulumi.vkcs.DcInterfaceArgs;
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) {
// Connect networks to the router
var dcInterface = new DcInterface("dcInterface", DcInterfaceArgs.builder()
.description("tf-example-description")
.dcRouterId(vkcs_dc_router.dc_router().id())
.networkId(vkcs_networking_network.app().id())
.subnetId(vkcs_networking_subnet.app().id())
.build());
}
}
resources:
# Connect networks to the router
dcInterface:
type: vkcs:DcInterface
properties:
description: tf-example-description
dcRouterId: ${vkcs_dc_router.dc_router.id}
networkId: ${vkcs_networking_network.app.id}
subnetId: ${vkcs_networking_subnet.app.id}
Connect dc router to Internet
import * as pulumi from "@pulumi/pulumi";
import * as vkcs from "@pulumi/vkcs";
// Connect internet to the router
const dcInterfaceInternet = new vkcs.DcInterface("dcInterfaceInternet", {
dcRouterId: vkcs_dc_router.dc_router.id,
networkId: data.vkcs_networking_network.internet_sprut.id,
});
import pulumi
import pulumi_vkcs as vkcs
# Connect internet to the router
dc_interface_internet = vkcs.DcInterface("dcInterfaceInternet",
dc_router_id=vkcs_dc_router["dc_router"]["id"],
network_id=data["vkcs_networking_network"]["internet_sprut"]["id"])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/vkcs/vkcs"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Connect internet to the router
_, err := vkcs.NewDcInterface(ctx, "dcInterfaceInternet", &vkcs.DcInterfaceArgs{
DcRouterId: pulumi.Any(vkcs_dc_router.Dc_router.Id),
NetworkId: pulumi.Any(data.Vkcs_networking_network.Internet_sprut.Id),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vkcs = Pulumi.Vkcs;
return await Deployment.RunAsync(() =>
{
// Connect internet to the router
var dcInterfaceInternet = new Vkcs.DcInterface("dcInterfaceInternet", new()
{
DcRouterId = vkcs_dc_router.Dc_router.Id,
NetworkId = data.Vkcs_networking_network.Internet_sprut.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vkcs.DcInterface;
import com.pulumi.vkcs.DcInterfaceArgs;
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) {
// Connect internet to the router
var dcInterfaceInternet = new DcInterface("dcInterfaceInternet", DcInterfaceArgs.builder()
.dcRouterId(vkcs_dc_router.dc_router().id())
.networkId(data.vkcs_networking_network().internet_sprut().id())
.build());
}
}
resources:
# Connect internet to the router
dcInterfaceInternet:
type: vkcs:DcInterface
properties:
dcRouterId: ${vkcs_dc_router.dc_router.id}
networkId: ${data.vkcs_networking_network.internet_sprut.id}
Create DcInterface Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DcInterface(name: string, args: DcInterfaceArgs, opts?: CustomResourceOptions);
@overload
def DcInterface(resource_name: str,
args: DcInterfaceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def DcInterface(resource_name: str,
opts: Optional[ResourceOptions] = None,
dc_router_id: Optional[str] = None,
network_id: Optional[str] = None,
bgp_announce_enabled: Optional[bool] = None,
description: Optional[str] = None,
ip_address: Optional[str] = None,
name: Optional[str] = None,
region: Optional[str] = None,
subnet_id: Optional[str] = None)
func NewDcInterface(ctx *Context, name string, args DcInterfaceArgs, opts ...ResourceOption) (*DcInterface, error)
public DcInterface(string name, DcInterfaceArgs args, CustomResourceOptions? opts = null)
public DcInterface(String name, DcInterfaceArgs args)
public DcInterface(String name, DcInterfaceArgs args, CustomResourceOptions options)
type: vkcs:DcInterface
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 DcInterfaceArgs
- 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 DcInterfaceArgs
- 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 DcInterfaceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DcInterfaceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DcInterfaceArgs
- 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 dcInterfaceResource = new Vkcs.DcInterface("dcInterfaceResource", new()
{
DcRouterId = "string",
NetworkId = "string",
BgpAnnounceEnabled = false,
Description = "string",
IpAddress = "string",
Name = "string",
Region = "string",
SubnetId = "string",
});
example, err := vkcs.NewDcInterface(ctx, "dcInterfaceResource", &vkcs.DcInterfaceArgs{
DcRouterId: pulumi.String("string"),
NetworkId: pulumi.String("string"),
BgpAnnounceEnabled: pulumi.Bool(false),
Description: pulumi.String("string"),
IpAddress: pulumi.String("string"),
Name: pulumi.String("string"),
Region: pulumi.String("string"),
SubnetId: pulumi.String("string"),
})
var dcInterfaceResource = new DcInterface("dcInterfaceResource", DcInterfaceArgs.builder()
.dcRouterId("string")
.networkId("string")
.bgpAnnounceEnabled(false)
.description("string")
.ipAddress("string")
.name("string")
.region("string")
.subnetId("string")
.build());
dc_interface_resource = vkcs.DcInterface("dcInterfaceResource",
dc_router_id="string",
network_id="string",
bgp_announce_enabled=False,
description="string",
ip_address="string",
name="string",
region="string",
subnet_id="string")
const dcInterfaceResource = new vkcs.DcInterface("dcInterfaceResource", {
dcRouterId: "string",
networkId: "string",
bgpAnnounceEnabled: false,
description: "string",
ipAddress: "string",
name: "string",
region: "string",
subnetId: "string",
});
type: vkcs:DcInterface
properties:
bgpAnnounceEnabled: false
dcRouterId: string
description: string
ipAddress: string
name: string
networkId: string
region: string
subnetId: string
DcInterface 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 DcInterface resource accepts the following input properties:
- Dc
Router stringId - required string → Direct Connect Router ID to attach. Changing this creates a new resource
- Network
Id string - required string → Network ID to attach. Changing this creates a new resource
- Bgp
Announce boolEnabled - optional boolean → Enable BGP announce of subnet attached to interface. Default is true
- Description string
- optional string → Description of the interface
- Ip
Address string - optional string → IP Address of the interface. Changing this creates a new resource
- Name string
- optional string → Name of the interface
- Region string
- optional string → The
region
to fetch availability zones from, defaults to the provider'sregion
. - Subnet
Id string - optional string → Subnet ID to attach. Changing this creates a new resource
- Dc
Router stringId - required string → Direct Connect Router ID to attach. Changing this creates a new resource
- Network
Id string - required string → Network ID to attach. Changing this creates a new resource
- Bgp
Announce boolEnabled - optional boolean → Enable BGP announce of subnet attached to interface. Default is true
- Description string
- optional string → Description of the interface
- Ip
Address string - optional string → IP Address of the interface. Changing this creates a new resource
- Name string
- optional string → Name of the interface
- Region string
- optional string → The
region
to fetch availability zones from, defaults to the provider'sregion
. - Subnet
Id string - optional string → Subnet ID to attach. Changing this creates a new resource
- dc
Router StringId - required string → Direct Connect Router ID to attach. Changing this creates a new resource
- network
Id String - required string → Network ID to attach. Changing this creates a new resource
- bgp
Announce BooleanEnabled - optional boolean → Enable BGP announce of subnet attached to interface. Default is true
- description String
- optional string → Description of the interface
- ip
Address String - optional string → IP Address of the interface. Changing this creates a new resource
- name String
- optional string → Name of the interface
- region String
- optional string → The
region
to fetch availability zones from, defaults to the provider'sregion
. - subnet
Id String - optional string → Subnet ID to attach. Changing this creates a new resource
- dc
Router stringId - required string → Direct Connect Router ID to attach. Changing this creates a new resource
- network
Id string - required string → Network ID to attach. Changing this creates a new resource
- bgp
Announce booleanEnabled - optional boolean → Enable BGP announce of subnet attached to interface. Default is true
- description string
- optional string → Description of the interface
- ip
Address string - optional string → IP Address of the interface. Changing this creates a new resource
- name string
- optional string → Name of the interface
- region string
- optional string → The
region
to fetch availability zones from, defaults to the provider'sregion
. - subnet
Id string - optional string → Subnet ID to attach. Changing this creates a new resource
- dc_
router_ strid - required string → Direct Connect Router ID to attach. Changing this creates a new resource
- network_
id str - required string → Network ID to attach. Changing this creates a new resource
- bgp_
announce_ boolenabled - optional boolean → Enable BGP announce of subnet attached to interface. Default is true
- description str
- optional string → Description of the interface
- ip_
address str - optional string → IP Address of the interface. Changing this creates a new resource
- name str
- optional string → Name of the interface
- region str
- optional string → The
region
to fetch availability zones from, defaults to the provider'sregion
. - subnet_
id str - optional string → Subnet ID to attach. Changing this creates a new resource
- dc
Router StringId - required string → Direct Connect Router ID to attach. Changing this creates a new resource
- network
Id String - required string → Network ID to attach. Changing this creates a new resource
- bgp
Announce BooleanEnabled - optional boolean → Enable BGP announce of subnet attached to interface. Default is true
- description String
- optional string → Description of the interface
- ip
Address String - optional string → IP Address of the interface. Changing this creates a new resource
- name String
- optional string → Name of the interface
- region String
- optional string → The
region
to fetch availability zones from, defaults to the provider'sregion
. - subnet
Id String - optional string → Subnet ID to attach. Changing this creates a new resource
Outputs
All input properties are implicitly available as output properties. Additionally, the DcInterface resource produces the following output properties:
- Created
At string - string → Creation timestamp
- Id string
- The provider-assigned unique ID for this managed resource.
- Ip
Netmask double - number → IP Netmask
- Mac
Address string - string → MAC Address of created interface
- Mtu double
- number → MTU
- Port
Id string - string → Port ID
- Sdn string
- string → SDN where interface was created
- Updated
At string - string → Update timestamp
- Created
At string - string → Creation timestamp
- Id string
- The provider-assigned unique ID for this managed resource.
- Ip
Netmask float64 - number → IP Netmask
- Mac
Address string - string → MAC Address of created interface
- Mtu float64
- number → MTU
- Port
Id string - string → Port ID
- Sdn string
- string → SDN where interface was created
- Updated
At string - string → Update timestamp
- created
At String - string → Creation timestamp
- id String
- The provider-assigned unique ID for this managed resource.
- ip
Netmask Double - number → IP Netmask
- mac
Address String - string → MAC Address of created interface
- mtu Double
- number → MTU
- port
Id String - string → Port ID
- sdn String
- string → SDN where interface was created
- updated
At String - string → Update timestamp
- created
At string - string → Creation timestamp
- id string
- The provider-assigned unique ID for this managed resource.
- ip
Netmask number - number → IP Netmask
- mac
Address string - string → MAC Address of created interface
- mtu number
- number → MTU
- port
Id string - string → Port ID
- sdn string
- string → SDN where interface was created
- updated
At string - string → Update timestamp
- created_
at str - string → Creation timestamp
- id str
- The provider-assigned unique ID for this managed resource.
- ip_
netmask float - number → IP Netmask
- mac_
address str - string → MAC Address of created interface
- mtu float
- number → MTU
- port_
id str - string → Port ID
- sdn str
- string → SDN where interface was created
- updated_
at str - string → Update timestamp
- created
At String - string → Creation timestamp
- id String
- The provider-assigned unique ID for this managed resource.
- ip
Netmask Number - number → IP Netmask
- mac
Address String - string → MAC Address of created interface
- mtu Number
- number → MTU
- port
Id String - string → Port ID
- sdn String
- string → SDN where interface was created
- updated
At String - string → Update timestamp
Look up Existing DcInterface Resource
Get an existing DcInterface 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?: DcInterfaceState, opts?: CustomResourceOptions): DcInterface
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
bgp_announce_enabled: Optional[bool] = None,
created_at: Optional[str] = None,
dc_router_id: Optional[str] = None,
description: Optional[str] = None,
ip_address: Optional[str] = None,
ip_netmask: Optional[float] = None,
mac_address: Optional[str] = None,
mtu: Optional[float] = None,
name: Optional[str] = None,
network_id: Optional[str] = None,
port_id: Optional[str] = None,
region: Optional[str] = None,
sdn: Optional[str] = None,
subnet_id: Optional[str] = None,
updated_at: Optional[str] = None) -> DcInterface
func GetDcInterface(ctx *Context, name string, id IDInput, state *DcInterfaceState, opts ...ResourceOption) (*DcInterface, error)
public static DcInterface Get(string name, Input<string> id, DcInterfaceState? state, CustomResourceOptions? opts = null)
public static DcInterface get(String name, Output<String> id, DcInterfaceState state, CustomResourceOptions options)
resources: _: type: vkcs:DcInterface 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.
- Bgp
Announce boolEnabled - optional boolean → Enable BGP announce of subnet attached to interface. Default is true
- Created
At string - string → Creation timestamp
- Dc
Router stringId - required string → Direct Connect Router ID to attach. Changing this creates a new resource
- Description string
- optional string → Description of the interface
- Ip
Address string - optional string → IP Address of the interface. Changing this creates a new resource
- Ip
Netmask double - number → IP Netmask
- Mac
Address string - string → MAC Address of created interface
- Mtu double
- number → MTU
- Name string
- optional string → Name of the interface
- Network
Id string - required string → Network ID to attach. Changing this creates a new resource
- Port
Id string - string → Port ID
- Region string
- optional string → The
region
to fetch availability zones from, defaults to the provider'sregion
. - Sdn string
- string → SDN where interface was created
- Subnet
Id string - optional string → Subnet ID to attach. Changing this creates a new resource
- Updated
At string - string → Update timestamp
- Bgp
Announce boolEnabled - optional boolean → Enable BGP announce of subnet attached to interface. Default is true
- Created
At string - string → Creation timestamp
- Dc
Router stringId - required string → Direct Connect Router ID to attach. Changing this creates a new resource
- Description string
- optional string → Description of the interface
- Ip
Address string - optional string → IP Address of the interface. Changing this creates a new resource
- Ip
Netmask float64 - number → IP Netmask
- Mac
Address string - string → MAC Address of created interface
- Mtu float64
- number → MTU
- Name string
- optional string → Name of the interface
- Network
Id string - required string → Network ID to attach. Changing this creates a new resource
- Port
Id string - string → Port ID
- Region string
- optional string → The
region
to fetch availability zones from, defaults to the provider'sregion
. - Sdn string
- string → SDN where interface was created
- Subnet
Id string - optional string → Subnet ID to attach. Changing this creates a new resource
- Updated
At string - string → Update timestamp
- bgp
Announce BooleanEnabled - optional boolean → Enable BGP announce of subnet attached to interface. Default is true
- created
At String - string → Creation timestamp
- dc
Router StringId - required string → Direct Connect Router ID to attach. Changing this creates a new resource
- description String
- optional string → Description of the interface
- ip
Address String - optional string → IP Address of the interface. Changing this creates a new resource
- ip
Netmask Double - number → IP Netmask
- mac
Address String - string → MAC Address of created interface
- mtu Double
- number → MTU
- name String
- optional string → Name of the interface
- network
Id String - required string → Network ID to attach. Changing this creates a new resource
- port
Id String - string → Port ID
- region String
- optional string → The
region
to fetch availability zones from, defaults to the provider'sregion
. - sdn String
- string → SDN where interface was created
- subnet
Id String - optional string → Subnet ID to attach. Changing this creates a new resource
- updated
At String - string → Update timestamp
- bgp
Announce booleanEnabled - optional boolean → Enable BGP announce of subnet attached to interface. Default is true
- created
At string - string → Creation timestamp
- dc
Router stringId - required string → Direct Connect Router ID to attach. Changing this creates a new resource
- description string
- optional string → Description of the interface
- ip
Address string - optional string → IP Address of the interface. Changing this creates a new resource
- ip
Netmask number - number → IP Netmask
- mac
Address string - string → MAC Address of created interface
- mtu number
- number → MTU
- name string
- optional string → Name of the interface
- network
Id string - required string → Network ID to attach. Changing this creates a new resource
- port
Id string - string → Port ID
- region string
- optional string → The
region
to fetch availability zones from, defaults to the provider'sregion
. - sdn string
- string → SDN where interface was created
- subnet
Id string - optional string → Subnet ID to attach. Changing this creates a new resource
- updated
At string - string → Update timestamp
- bgp_
announce_ boolenabled - optional boolean → Enable BGP announce of subnet attached to interface. Default is true
- created_
at str - string → Creation timestamp
- dc_
router_ strid - required string → Direct Connect Router ID to attach. Changing this creates a new resource
- description str
- optional string → Description of the interface
- ip_
address str - optional string → IP Address of the interface. Changing this creates a new resource
- ip_
netmask float - number → IP Netmask
- mac_
address str - string → MAC Address of created interface
- mtu float
- number → MTU
- name str
- optional string → Name of the interface
- network_
id str - required string → Network ID to attach. Changing this creates a new resource
- port_
id str - string → Port ID
- region str
- optional string → The
region
to fetch availability zones from, defaults to the provider'sregion
. - sdn str
- string → SDN where interface was created
- subnet_
id str - optional string → Subnet ID to attach. Changing this creates a new resource
- updated_
at str - string → Update timestamp
- bgp
Announce BooleanEnabled - optional boolean → Enable BGP announce of subnet attached to interface. Default is true
- created
At String - string → Creation timestamp
- dc
Router StringId - required string → Direct Connect Router ID to attach. Changing this creates a new resource
- description String
- optional string → Description of the interface
- ip
Address String - optional string → IP Address of the interface. Changing this creates a new resource
- ip
Netmask Number - number → IP Netmask
- mac
Address String - string → MAC Address of created interface
- mtu Number
- number → MTU
- name String
- optional string → Name of the interface
- network
Id String - required string → Network ID to attach. Changing this creates a new resource
- port
Id String - string → Port ID
- region String
- optional string → The
region
to fetch availability zones from, defaults to the provider'sregion
. - sdn String
- string → SDN where interface was created
- subnet
Id String - optional string → Subnet ID to attach. Changing this creates a new resource
- updated
At String - string → Update timestamp
Import
Direct connect interface can be imported using the id
, e.g.
$ pulumi import vkcs:index/dcInterface:DcInterface mydcinterface 438d7479-d95f-4afc-b85e-eb8cd130a99f
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- vkcs vk-cs/terraform-provider-vkcs
- License
- Notes
- This Pulumi package is based on the
vkcs
Terraform Provider.