vkcs.DcIpPortForwarding
Explore with Pulumi AI
Manages a direct connect ip port forwarding resource.
Note: This resource requires Sprut SDN to be enabled in your project.
New since v0.8.0.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as vkcs from "@pulumi/vkcs";
const dcIpPortForwarding = new vkcs.DcIpPortForwarding("dcIpPortForwarding", {
dcInterfaceId: vkcs_dc_interface.dc_interface.id,
description: "tf-example-description",
protocol: "udp",
toDestination: "172.17.20.30",
});
import pulumi
import pulumi_vkcs as vkcs
dc_ip_port_forwarding = vkcs.DcIpPortForwarding("dcIpPortForwarding",
dc_interface_id=vkcs_dc_interface["dc_interface"]["id"],
description="tf-example-description",
protocol="udp",
to_destination="172.17.20.30")
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 {
_, err := vkcs.NewDcIpPortForwarding(ctx, "dcIpPortForwarding", &vkcs.DcIpPortForwardingArgs{
DcInterfaceId: pulumi.Any(vkcs_dc_interface.Dc_interface.Id),
Description: pulumi.String("tf-example-description"),
Protocol: pulumi.String("udp"),
ToDestination: pulumi.String("172.17.20.30"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vkcs = Pulumi.Vkcs;
return await Deployment.RunAsync(() =>
{
var dcIpPortForwarding = new Vkcs.DcIpPortForwarding("dcIpPortForwarding", new()
{
DcInterfaceId = vkcs_dc_interface.Dc_interface.Id,
Description = "tf-example-description",
Protocol = "udp",
ToDestination = "172.17.20.30",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vkcs.DcIpPortForwarding;
import com.pulumi.vkcs.DcIpPortForwardingArgs;
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 dcIpPortForwarding = new DcIpPortForwarding("dcIpPortForwarding", DcIpPortForwardingArgs.builder()
.dcInterfaceId(vkcs_dc_interface.dc_interface().id())
.description("tf-example-description")
.protocol("udp")
.toDestination("172.17.20.30")
.build());
}
}
resources:
dcIpPortForwarding:
type: vkcs:DcIpPortForwarding
properties:
dcInterfaceId: ${vkcs_dc_interface.dc_interface.id}
description: tf-example-description
protocol: udp
toDestination: 172.17.20.30
Create DcIpPortForwarding Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DcIpPortForwarding(name: string, args: DcIpPortForwardingArgs, opts?: CustomResourceOptions);
@overload
def DcIpPortForwarding(resource_name: str,
args: DcIpPortForwardingArgs,
opts: Optional[ResourceOptions] = None)
@overload
def DcIpPortForwarding(resource_name: str,
opts: Optional[ResourceOptions] = None,
dc_interface_id: Optional[str] = None,
protocol: Optional[str] = None,
to_destination: Optional[str] = None,
description: Optional[str] = None,
destination: Optional[str] = None,
name: Optional[str] = None,
port: Optional[float] = None,
region: Optional[str] = None,
source: Optional[str] = None,
to_port: Optional[float] = None)
func NewDcIpPortForwarding(ctx *Context, name string, args DcIpPortForwardingArgs, opts ...ResourceOption) (*DcIpPortForwarding, error)
public DcIpPortForwarding(string name, DcIpPortForwardingArgs args, CustomResourceOptions? opts = null)
public DcIpPortForwarding(String name, DcIpPortForwardingArgs args)
public DcIpPortForwarding(String name, DcIpPortForwardingArgs args, CustomResourceOptions options)
type: vkcs:DcIpPortForwarding
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 DcIpPortForwardingArgs
- 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 DcIpPortForwardingArgs
- 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 DcIpPortForwardingArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DcIpPortForwardingArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DcIpPortForwardingArgs
- 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 dcIpPortForwardingResource = new Vkcs.DcIpPortForwarding("dcIpPortForwardingResource", new()
{
DcInterfaceId = "string",
Protocol = "string",
ToDestination = "string",
Description = "string",
Destination = "string",
Name = "string",
Port = 0,
Region = "string",
Source = "string",
ToPort = 0,
});
example, err := vkcs.NewDcIpPortForwarding(ctx, "dcIpPortForwardingResource", &vkcs.DcIpPortForwardingArgs{
DcInterfaceId: pulumi.String("string"),
Protocol: pulumi.String("string"),
ToDestination: pulumi.String("string"),
Description: pulumi.String("string"),
Destination: pulumi.String("string"),
Name: pulumi.String("string"),
Port: pulumi.Float64(0),
Region: pulumi.String("string"),
Source: pulumi.String("string"),
ToPort: pulumi.Float64(0),
})
var dcIpPortForwardingResource = new DcIpPortForwarding("dcIpPortForwardingResource", DcIpPortForwardingArgs.builder()
.dcInterfaceId("string")
.protocol("string")
.toDestination("string")
.description("string")
.destination("string")
.name("string")
.port(0)
.region("string")
.source("string")
.toPort(0)
.build());
dc_ip_port_forwarding_resource = vkcs.DcIpPortForwarding("dcIpPortForwardingResource",
dc_interface_id="string",
protocol="string",
to_destination="string",
description="string",
destination="string",
name="string",
port=0,
region="string",
source="string",
to_port=0)
const dcIpPortForwardingResource = new vkcs.DcIpPortForwarding("dcIpPortForwardingResource", {
dcInterfaceId: "string",
protocol: "string",
toDestination: "string",
description: "string",
destination: "string",
name: "string",
port: 0,
region: "string",
source: "string",
toPort: 0,
});
type: vkcs:DcIpPortForwarding
properties:
dcInterfaceId: string
description: string
destination: string
name: string
port: 0
protocol: string
region: string
source: string
toDestination: string
toPort: 0
DcIpPortForwarding 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 DcIpPortForwarding resource accepts the following input properties:
- Dc
Interface stringId - required string → Direct Connect Interface ID. Changing this creates a new resource
- Protocol string
- required string → Protocol. Must be one of: "tcp", "udp", "any".
- To
Destination string - required string → IP Address of forwarding's destination.
- Description string
- optional string → Description of the conntrack helper
- Destination string
- optional string → Destination address selector.
- Name string
- optional string → Name of the conntrack helper
- Port double
- optional number → Port selector.
- Region string
- optional string → The
region
to fetch availability zones from, defaults to the provider'sregion
. - Source string
- optional string → Source address selector.
- To
Port double - optional number → Destination port selector.
- Dc
Interface stringId - required string → Direct Connect Interface ID. Changing this creates a new resource
- Protocol string
- required string → Protocol. Must be one of: "tcp", "udp", "any".
- To
Destination string - required string → IP Address of forwarding's destination.
- Description string
- optional string → Description of the conntrack helper
- Destination string
- optional string → Destination address selector.
- Name string
- optional string → Name of the conntrack helper
- Port float64
- optional number → Port selector.
- Region string
- optional string → The
region
to fetch availability zones from, defaults to the provider'sregion
. - Source string
- optional string → Source address selector.
- To
Port float64 - optional number → Destination port selector.
- dc
Interface StringId - required string → Direct Connect Interface ID. Changing this creates a new resource
- protocol String
- required string → Protocol. Must be one of: "tcp", "udp", "any".
- to
Destination String - required string → IP Address of forwarding's destination.
- description String
- optional string → Description of the conntrack helper
- destination String
- optional string → Destination address selector.
- name String
- optional string → Name of the conntrack helper
- port Double
- optional number → Port selector.
- region String
- optional string → The
region
to fetch availability zones from, defaults to the provider'sregion
. - source String
- optional string → Source address selector.
- to
Port Double - optional number → Destination port selector.
- dc
Interface stringId - required string → Direct Connect Interface ID. Changing this creates a new resource
- protocol string
- required string → Protocol. Must be one of: "tcp", "udp", "any".
- to
Destination string - required string → IP Address of forwarding's destination.
- description string
- optional string → Description of the conntrack helper
- destination string
- optional string → Destination address selector.
- name string
- optional string → Name of the conntrack helper
- port number
- optional number → Port selector.
- region string
- optional string → The
region
to fetch availability zones from, defaults to the provider'sregion
. - source string
- optional string → Source address selector.
- to
Port number - optional number → Destination port selector.
- dc_
interface_ strid - required string → Direct Connect Interface ID. Changing this creates a new resource
- protocol str
- required string → Protocol. Must be one of: "tcp", "udp", "any".
- to_
destination str - required string → IP Address of forwarding's destination.
- description str
- optional string → Description of the conntrack helper
- destination str
- optional string → Destination address selector.
- name str
- optional string → Name of the conntrack helper
- port float
- optional number → Port selector.
- region str
- optional string → The
region
to fetch availability zones from, defaults to the provider'sregion
. - source str
- optional string → Source address selector.
- to_
port float - optional number → Destination port selector.
- dc
Interface StringId - required string → Direct Connect Interface ID. Changing this creates a new resource
- protocol String
- required string → Protocol. Must be one of: "tcp", "udp", "any".
- to
Destination String - required string → IP Address of forwarding's destination.
- description String
- optional string → Description of the conntrack helper
- destination String
- optional string → Destination address selector.
- name String
- optional string → Name of the conntrack helper
- port Number
- optional number → Port selector.
- region String
- optional string → The
region
to fetch availability zones from, defaults to the provider'sregion
. - source String
- optional string → Source address selector.
- to
Port Number - optional number → Destination port selector.
Outputs
All input properties are implicitly available as output properties. Additionally, the DcIpPortForwarding resource produces the following output properties:
- created_
at str - string → Creation timestamp
- id str
- The provider-assigned unique ID for this managed resource.
- updated_
at str - string → Update timestamp
Look up Existing DcIpPortForwarding Resource
Get an existing DcIpPortForwarding 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?: DcIpPortForwardingState, opts?: CustomResourceOptions): DcIpPortForwarding
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
created_at: Optional[str] = None,
dc_interface_id: Optional[str] = None,
description: Optional[str] = None,
destination: Optional[str] = None,
name: Optional[str] = None,
port: Optional[float] = None,
protocol: Optional[str] = None,
region: Optional[str] = None,
source: Optional[str] = None,
to_destination: Optional[str] = None,
to_port: Optional[float] = None,
updated_at: Optional[str] = None) -> DcIpPortForwarding
func GetDcIpPortForwarding(ctx *Context, name string, id IDInput, state *DcIpPortForwardingState, opts ...ResourceOption) (*DcIpPortForwarding, error)
public static DcIpPortForwarding Get(string name, Input<string> id, DcIpPortForwardingState? state, CustomResourceOptions? opts = null)
public static DcIpPortForwarding get(String name, Output<String> id, DcIpPortForwardingState state, CustomResourceOptions options)
resources: _: type: vkcs:DcIpPortForwarding 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.
- Created
At string - string → Creation timestamp
- Dc
Interface stringId - required string → Direct Connect Interface ID. Changing this creates a new resource
- Description string
- optional string → Description of the conntrack helper
- Destination string
- optional string → Destination address selector.
- Name string
- optional string → Name of the conntrack helper
- Port double
- optional number → Port selector.
- Protocol string
- required string → Protocol. Must be one of: "tcp", "udp", "any".
- Region string
- optional string → The
region
to fetch availability zones from, defaults to the provider'sregion
. - Source string
- optional string → Source address selector.
- To
Destination string - required string → IP Address of forwarding's destination.
- To
Port double - optional number → Destination port selector.
- Updated
At string - string → Update timestamp
- Created
At string - string → Creation timestamp
- Dc
Interface stringId - required string → Direct Connect Interface ID. Changing this creates a new resource
- Description string
- optional string → Description of the conntrack helper
- Destination string
- optional string → Destination address selector.
- Name string
- optional string → Name of the conntrack helper
- Port float64
- optional number → Port selector.
- Protocol string
- required string → Protocol. Must be one of: "tcp", "udp", "any".
- Region string
- optional string → The
region
to fetch availability zones from, defaults to the provider'sregion
. - Source string
- optional string → Source address selector.
- To
Destination string - required string → IP Address of forwarding's destination.
- To
Port float64 - optional number → Destination port selector.
- Updated
At string - string → Update timestamp
- created
At String - string → Creation timestamp
- dc
Interface StringId - required string → Direct Connect Interface ID. Changing this creates a new resource
- description String
- optional string → Description of the conntrack helper
- destination String
- optional string → Destination address selector.
- name String
- optional string → Name of the conntrack helper
- port Double
- optional number → Port selector.
- protocol String
- required string → Protocol. Must be one of: "tcp", "udp", "any".
- region String
- optional string → The
region
to fetch availability zones from, defaults to the provider'sregion
. - source String
- optional string → Source address selector.
- to
Destination String - required string → IP Address of forwarding's destination.
- to
Port Double - optional number → Destination port selector.
- updated
At String - string → Update timestamp
- created
At string - string → Creation timestamp
- dc
Interface stringId - required string → Direct Connect Interface ID. Changing this creates a new resource
- description string
- optional string → Description of the conntrack helper
- destination string
- optional string → Destination address selector.
- name string
- optional string → Name of the conntrack helper
- port number
- optional number → Port selector.
- protocol string
- required string → Protocol. Must be one of: "tcp", "udp", "any".
- region string
- optional string → The
region
to fetch availability zones from, defaults to the provider'sregion
. - source string
- optional string → Source address selector.
- to
Destination string - required string → IP Address of forwarding's destination.
- to
Port number - optional number → Destination port selector.
- updated
At string - string → Update timestamp
- created_
at str - string → Creation timestamp
- dc_
interface_ strid - required string → Direct Connect Interface ID. Changing this creates a new resource
- description str
- optional string → Description of the conntrack helper
- destination str
- optional string → Destination address selector.
- name str
- optional string → Name of the conntrack helper
- port float
- optional number → Port selector.
- protocol str
- required string → Protocol. Must be one of: "tcp", "udp", "any".
- region str
- optional string → The
region
to fetch availability zones from, defaults to the provider'sregion
. - source str
- optional string → Source address selector.
- to_
destination str - required string → IP Address of forwarding's destination.
- to_
port float - optional number → Destination port selector.
- updated_
at str - string → Update timestamp
- created
At String - string → Creation timestamp
- dc
Interface StringId - required string → Direct Connect Interface ID. Changing this creates a new resource
- description String
- optional string → Description of the conntrack helper
- destination String
- optional string → Destination address selector.
- name String
- optional string → Name of the conntrack helper
- port Number
- optional number → Port selector.
- protocol String
- required string → Protocol. Must be one of: "tcp", "udp", "any".
- region String
- optional string → The
region
to fetch availability zones from, defaults to the provider'sregion
. - source String
- optional string → Source address selector.
- to
Destination String - required string → IP Address of forwarding's destination.
- to
Port Number - optional number → Destination port selector.
- updated
At String - string → Update timestamp
Import
Direct connect IP port forwarding can be imported using the id
, e.g.
$ pulumi import vkcs:index/dcIpPortForwarding:DcIpPortForwarding mydcipportforwarding 659be09e-a10e-4762-b729-7a003af40f29
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.