1. Packages
  2. Openstack Provider
  3. API Docs
  4. networking
  5. PortForwardingV2
OpenStack v5.0.0 published on Friday, Sep 27, 2024 by Pulumi

openstack.networking.PortForwardingV2

Explore with Pulumi AI

openstack logo
OpenStack v5.0.0 published on Friday, Sep 27, 2024 by Pulumi

    Manages a V2 portforwarding resource within OpenStack.

    Example Usage

    Simple portforwarding

    import * as pulumi from "@pulumi/pulumi";
    import * as openstack from "@pulumi/openstack";
    
    const pf1 = new openstack.networking.PortForwardingV2("pf_1", {
        floatingipId: "7a52eb59-7d47-415d-a884-046666a6fbae",
        externalPort: 7233,
        internalPort: 25,
        internalPortId: "b930d7f6-ceb7-40a0-8b81-a425dd994ccf",
        protocol: "tcp",
    });
    
    import pulumi
    import pulumi_openstack as openstack
    
    pf1 = openstack.networking.PortForwardingV2("pf_1",
        floatingip_id="7a52eb59-7d47-415d-a884-046666a6fbae",
        external_port=7233,
        internal_port=25,
        internal_port_id="b930d7f6-ceb7-40a0-8b81-a425dd994ccf",
        protocol="tcp")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-openstack/sdk/v5/go/openstack/networking"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := networking.NewPortForwardingV2(ctx, "pf_1", &networking.PortForwardingV2Args{
    			FloatingipId:   pulumi.String("7a52eb59-7d47-415d-a884-046666a6fbae"),
    			ExternalPort:   pulumi.Int(7233),
    			InternalPort:   pulumi.Int(25),
    			InternalPortId: pulumi.String("b930d7f6-ceb7-40a0-8b81-a425dd994ccf"),
    			Protocol:       pulumi.String("tcp"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using OpenStack = Pulumi.OpenStack;
    
    return await Deployment.RunAsync(() => 
    {
        var pf1 = new OpenStack.Networking.PortForwardingV2("pf_1", new()
        {
            FloatingipId = "7a52eb59-7d47-415d-a884-046666a6fbae",
            ExternalPort = 7233,
            InternalPort = 25,
            InternalPortId = "b930d7f6-ceb7-40a0-8b81-a425dd994ccf",
            Protocol = "tcp",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.openstack.networking.PortForwardingV2;
    import com.pulumi.openstack.networking.PortForwardingV2Args;
    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 pf1 = new PortForwardingV2("pf1", PortForwardingV2Args.builder()
                .floatingipId("7a52eb59-7d47-415d-a884-046666a6fbae")
                .externalPort(7233)
                .internalPort(25)
                .internalPortId("b930d7f6-ceb7-40a0-8b81-a425dd994ccf")
                .protocol("tcp")
                .build());
    
        }
    }
    
    resources:
      pf1:
        type: openstack:networking:PortForwardingV2
        name: pf_1
        properties:
          floatingipId: 7a52eb59-7d47-415d-a884-046666a6fbae
          externalPort: 7233
          internalPort: 25
          internalPortId: b930d7f6-ceb7-40a0-8b81-a425dd994ccf
          protocol: tcp
    

    Create PortForwardingV2 Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new PortForwardingV2(name: string, args: PortForwardingV2Args, opts?: CustomResourceOptions);
    @overload
    def PortForwardingV2(resource_name: str,
                         args: PortForwardingV2Args,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def PortForwardingV2(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         external_port: Optional[int] = None,
                         floatingip_id: Optional[str] = None,
                         internal_ip_address: Optional[str] = None,
                         internal_port: Optional[int] = None,
                         internal_port_id: Optional[str] = None,
                         protocol: Optional[str] = None,
                         description: Optional[str] = None,
                         region: Optional[str] = None)
    func NewPortForwardingV2(ctx *Context, name string, args PortForwardingV2Args, opts ...ResourceOption) (*PortForwardingV2, error)
    public PortForwardingV2(string name, PortForwardingV2Args args, CustomResourceOptions? opts = null)
    public PortForwardingV2(String name, PortForwardingV2Args args)
    public PortForwardingV2(String name, PortForwardingV2Args args, CustomResourceOptions options)
    
    type: openstack:networking:PortForwardingV2
    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 PortForwardingV2Args
    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 PortForwardingV2Args
    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 PortForwardingV2Args
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PortForwardingV2Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PortForwardingV2Args
    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 portForwardingV2Resource = new OpenStack.Networking.PortForwardingV2("portForwardingV2Resource", new()
    {
        ExternalPort = 0,
        FloatingipId = "string",
        InternalIpAddress = "string",
        InternalPort = 0,
        InternalPortId = "string",
        Protocol = "string",
        Description = "string",
        Region = "string",
    });
    
    example, err := networking.NewPortForwardingV2(ctx, "portForwardingV2Resource", &networking.PortForwardingV2Args{
    	ExternalPort:      pulumi.Int(0),
    	FloatingipId:      pulumi.String("string"),
    	InternalIpAddress: pulumi.String("string"),
    	InternalPort:      pulumi.Int(0),
    	InternalPortId:    pulumi.String("string"),
    	Protocol:          pulumi.String("string"),
    	Description:       pulumi.String("string"),
    	Region:            pulumi.String("string"),
    })
    
    var portForwardingV2Resource = new PortForwardingV2("portForwardingV2Resource", PortForwardingV2Args.builder()
        .externalPort(0)
        .floatingipId("string")
        .internalIpAddress("string")
        .internalPort(0)
        .internalPortId("string")
        .protocol("string")
        .description("string")
        .region("string")
        .build());
    
    port_forwarding_v2_resource = openstack.networking.PortForwardingV2("portForwardingV2Resource",
        external_port=0,
        floatingip_id="string",
        internal_ip_address="string",
        internal_port=0,
        internal_port_id="string",
        protocol="string",
        description="string",
        region="string")
    
    const portForwardingV2Resource = new openstack.networking.PortForwardingV2("portForwardingV2Resource", {
        externalPort: 0,
        floatingipId: "string",
        internalIpAddress: "string",
        internalPort: 0,
        internalPortId: "string",
        protocol: "string",
        description: "string",
        region: "string",
    });
    
    type: openstack:networking:PortForwardingV2
    properties:
        description: string
        externalPort: 0
        floatingipId: string
        internalIpAddress: string
        internalPort: 0
        internalPortId: string
        protocol: string
        region: string
    

    PortForwardingV2 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 PortForwardingV2 resource accepts the following input properties:

    ExternalPort int
    The TCP/UDP/other protocol port number of the port forwarding. Changing this updates the external_port of an existing port forwarding.
    FloatingipId string
    The ID of the Neutron floating IP address. Changing this creates a new port forwarding.
    InternalIpAddress string
    The fixed IPv4 address of the Neutron port associated with the port forwarding. Changing this updates the internal_ip_address of an existing port forwarding.
    InternalPort int
    The TCP/UDP/other protocol port number of the Neutron port fixed IP address associated to the port forwarding. Changing this updates the internal_port of an existing port forwarding.
    InternalPortId string
    The ID of the Neutron port associated with the port forwarding. Changing this updates the internal_port_id of an existing port forwarding.
    Protocol string
    The IP protocol used in the port forwarding. Changing this updates the protocol of an existing port forwarding.
    Description string
    A text describing the port forwarding. Changing this updates the description of an existing port forwarding.
    Region string
    The region in which to obtain the V2 networking client. A networking client is needed to create a port forwarding. If omitted, the region argument of the provider is used. Changing this creates a new port forwarding.
    ExternalPort int
    The TCP/UDP/other protocol port number of the port forwarding. Changing this updates the external_port of an existing port forwarding.
    FloatingipId string
    The ID of the Neutron floating IP address. Changing this creates a new port forwarding.
    InternalIpAddress string
    The fixed IPv4 address of the Neutron port associated with the port forwarding. Changing this updates the internal_ip_address of an existing port forwarding.
    InternalPort int
    The TCP/UDP/other protocol port number of the Neutron port fixed IP address associated to the port forwarding. Changing this updates the internal_port of an existing port forwarding.
    InternalPortId string
    The ID of the Neutron port associated with the port forwarding. Changing this updates the internal_port_id of an existing port forwarding.
    Protocol string
    The IP protocol used in the port forwarding. Changing this updates the protocol of an existing port forwarding.
    Description string
    A text describing the port forwarding. Changing this updates the description of an existing port forwarding.
    Region string
    The region in which to obtain the V2 networking client. A networking client is needed to create a port forwarding. If omitted, the region argument of the provider is used. Changing this creates a new port forwarding.
    externalPort Integer
    The TCP/UDP/other protocol port number of the port forwarding. Changing this updates the external_port of an existing port forwarding.
    floatingipId String
    The ID of the Neutron floating IP address. Changing this creates a new port forwarding.
    internalIpAddress String
    The fixed IPv4 address of the Neutron port associated with the port forwarding. Changing this updates the internal_ip_address of an existing port forwarding.
    internalPort Integer
    The TCP/UDP/other protocol port number of the Neutron port fixed IP address associated to the port forwarding. Changing this updates the internal_port of an existing port forwarding.
    internalPortId String
    The ID of the Neutron port associated with the port forwarding. Changing this updates the internal_port_id of an existing port forwarding.
    protocol String
    The IP protocol used in the port forwarding. Changing this updates the protocol of an existing port forwarding.
    description String
    A text describing the port forwarding. Changing this updates the description of an existing port forwarding.
    region String
    The region in which to obtain the V2 networking client. A networking client is needed to create a port forwarding. If omitted, the region argument of the provider is used. Changing this creates a new port forwarding.
    externalPort number
    The TCP/UDP/other protocol port number of the port forwarding. Changing this updates the external_port of an existing port forwarding.
    floatingipId string
    The ID of the Neutron floating IP address. Changing this creates a new port forwarding.
    internalIpAddress string
    The fixed IPv4 address of the Neutron port associated with the port forwarding. Changing this updates the internal_ip_address of an existing port forwarding.
    internalPort number
    The TCP/UDP/other protocol port number of the Neutron port fixed IP address associated to the port forwarding. Changing this updates the internal_port of an existing port forwarding.
    internalPortId string
    The ID of the Neutron port associated with the port forwarding. Changing this updates the internal_port_id of an existing port forwarding.
    protocol string
    The IP protocol used in the port forwarding. Changing this updates the protocol of an existing port forwarding.
    description string
    A text describing the port forwarding. Changing this updates the description of an existing port forwarding.
    region string
    The region in which to obtain the V2 networking client. A networking client is needed to create a port forwarding. If omitted, the region argument of the provider is used. Changing this creates a new port forwarding.
    external_port int
    The TCP/UDP/other protocol port number of the port forwarding. Changing this updates the external_port of an existing port forwarding.
    floatingip_id str
    The ID of the Neutron floating IP address. Changing this creates a new port forwarding.
    internal_ip_address str
    The fixed IPv4 address of the Neutron port associated with the port forwarding. Changing this updates the internal_ip_address of an existing port forwarding.
    internal_port int
    The TCP/UDP/other protocol port number of the Neutron port fixed IP address associated to the port forwarding. Changing this updates the internal_port of an existing port forwarding.
    internal_port_id str
    The ID of the Neutron port associated with the port forwarding. Changing this updates the internal_port_id of an existing port forwarding.
    protocol str
    The IP protocol used in the port forwarding. Changing this updates the protocol of an existing port forwarding.
    description str
    A text describing the port forwarding. Changing this updates the description of an existing port forwarding.
    region str
    The region in which to obtain the V2 networking client. A networking client is needed to create a port forwarding. If omitted, the region argument of the provider is used. Changing this creates a new port forwarding.
    externalPort Number
    The TCP/UDP/other protocol port number of the port forwarding. Changing this updates the external_port of an existing port forwarding.
    floatingipId String
    The ID of the Neutron floating IP address. Changing this creates a new port forwarding.
    internalIpAddress String
    The fixed IPv4 address of the Neutron port associated with the port forwarding. Changing this updates the internal_ip_address of an existing port forwarding.
    internalPort Number
    The TCP/UDP/other protocol port number of the Neutron port fixed IP address associated to the port forwarding. Changing this updates the internal_port of an existing port forwarding.
    internalPortId String
    The ID of the Neutron port associated with the port forwarding. Changing this updates the internal_port_id of an existing port forwarding.
    protocol String
    The IP protocol used in the port forwarding. Changing this updates the protocol of an existing port forwarding.
    description String
    A text describing the port forwarding. Changing this updates the description of an existing port forwarding.
    region String
    The region in which to obtain the V2 networking client. A networking client is needed to create a port forwarding. If omitted, the region argument of the provider is used. Changing this creates a new port forwarding.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the PortForwardingV2 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 PortForwardingV2 Resource

    Get an existing PortForwardingV2 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?: PortForwardingV2State, opts?: CustomResourceOptions): PortForwardingV2
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            external_port: Optional[int] = None,
            floatingip_id: Optional[str] = None,
            internal_ip_address: Optional[str] = None,
            internal_port: Optional[int] = None,
            internal_port_id: Optional[str] = None,
            protocol: Optional[str] = None,
            region: Optional[str] = None) -> PortForwardingV2
    func GetPortForwardingV2(ctx *Context, name string, id IDInput, state *PortForwardingV2State, opts ...ResourceOption) (*PortForwardingV2, error)
    public static PortForwardingV2 Get(string name, Input<string> id, PortForwardingV2State? state, CustomResourceOptions? opts = null)
    public static PortForwardingV2 get(String name, Output<String> id, PortForwardingV2State state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    The following state arguments are supported:
    Description string
    A text describing the port forwarding. Changing this updates the description of an existing port forwarding.
    ExternalPort int
    The TCP/UDP/other protocol port number of the port forwarding. Changing this updates the external_port of an existing port forwarding.
    FloatingipId string
    The ID of the Neutron floating IP address. Changing this creates a new port forwarding.
    InternalIpAddress string
    The fixed IPv4 address of the Neutron port associated with the port forwarding. Changing this updates the internal_ip_address of an existing port forwarding.
    InternalPort int
    The TCP/UDP/other protocol port number of the Neutron port fixed IP address associated to the port forwarding. Changing this updates the internal_port of an existing port forwarding.
    InternalPortId string
    The ID of the Neutron port associated with the port forwarding. Changing this updates the internal_port_id of an existing port forwarding.
    Protocol string
    The IP protocol used in the port forwarding. Changing this updates the protocol of an existing port forwarding.
    Region string
    The region in which to obtain the V2 networking client. A networking client is needed to create a port forwarding. If omitted, the region argument of the provider is used. Changing this creates a new port forwarding.
    Description string
    A text describing the port forwarding. Changing this updates the description of an existing port forwarding.
    ExternalPort int
    The TCP/UDP/other protocol port number of the port forwarding. Changing this updates the external_port of an existing port forwarding.
    FloatingipId string
    The ID of the Neutron floating IP address. Changing this creates a new port forwarding.
    InternalIpAddress string
    The fixed IPv4 address of the Neutron port associated with the port forwarding. Changing this updates the internal_ip_address of an existing port forwarding.
    InternalPort int
    The TCP/UDP/other protocol port number of the Neutron port fixed IP address associated to the port forwarding. Changing this updates the internal_port of an existing port forwarding.
    InternalPortId string
    The ID of the Neutron port associated with the port forwarding. Changing this updates the internal_port_id of an existing port forwarding.
    Protocol string
    The IP protocol used in the port forwarding. Changing this updates the protocol of an existing port forwarding.
    Region string
    The region in which to obtain the V2 networking client. A networking client is needed to create a port forwarding. If omitted, the region argument of the provider is used. Changing this creates a new port forwarding.
    description String
    A text describing the port forwarding. Changing this updates the description of an existing port forwarding.
    externalPort Integer
    The TCP/UDP/other protocol port number of the port forwarding. Changing this updates the external_port of an existing port forwarding.
    floatingipId String
    The ID of the Neutron floating IP address. Changing this creates a new port forwarding.
    internalIpAddress String
    The fixed IPv4 address of the Neutron port associated with the port forwarding. Changing this updates the internal_ip_address of an existing port forwarding.
    internalPort Integer
    The TCP/UDP/other protocol port number of the Neutron port fixed IP address associated to the port forwarding. Changing this updates the internal_port of an existing port forwarding.
    internalPortId String
    The ID of the Neutron port associated with the port forwarding. Changing this updates the internal_port_id of an existing port forwarding.
    protocol String
    The IP protocol used in the port forwarding. Changing this updates the protocol of an existing port forwarding.
    region String
    The region in which to obtain the V2 networking client. A networking client is needed to create a port forwarding. If omitted, the region argument of the provider is used. Changing this creates a new port forwarding.
    description string
    A text describing the port forwarding. Changing this updates the description of an existing port forwarding.
    externalPort number
    The TCP/UDP/other protocol port number of the port forwarding. Changing this updates the external_port of an existing port forwarding.
    floatingipId string
    The ID of the Neutron floating IP address. Changing this creates a new port forwarding.
    internalIpAddress string
    The fixed IPv4 address of the Neutron port associated with the port forwarding. Changing this updates the internal_ip_address of an existing port forwarding.
    internalPort number
    The TCP/UDP/other protocol port number of the Neutron port fixed IP address associated to the port forwarding. Changing this updates the internal_port of an existing port forwarding.
    internalPortId string
    The ID of the Neutron port associated with the port forwarding. Changing this updates the internal_port_id of an existing port forwarding.
    protocol string
    The IP protocol used in the port forwarding. Changing this updates the protocol of an existing port forwarding.
    region string
    The region in which to obtain the V2 networking client. A networking client is needed to create a port forwarding. If omitted, the region argument of the provider is used. Changing this creates a new port forwarding.
    description str
    A text describing the port forwarding. Changing this updates the description of an existing port forwarding.
    external_port int
    The TCP/UDP/other protocol port number of the port forwarding. Changing this updates the external_port of an existing port forwarding.
    floatingip_id str
    The ID of the Neutron floating IP address. Changing this creates a new port forwarding.
    internal_ip_address str
    The fixed IPv4 address of the Neutron port associated with the port forwarding. Changing this updates the internal_ip_address of an existing port forwarding.
    internal_port int
    The TCP/UDP/other protocol port number of the Neutron port fixed IP address associated to the port forwarding. Changing this updates the internal_port of an existing port forwarding.
    internal_port_id str
    The ID of the Neutron port associated with the port forwarding. Changing this updates the internal_port_id of an existing port forwarding.
    protocol str
    The IP protocol used in the port forwarding. Changing this updates the protocol of an existing port forwarding.
    region str
    The region in which to obtain the V2 networking client. A networking client is needed to create a port forwarding. If omitted, the region argument of the provider is used. Changing this creates a new port forwarding.
    description String
    A text describing the port forwarding. Changing this updates the description of an existing port forwarding.
    externalPort Number
    The TCP/UDP/other protocol port number of the port forwarding. Changing this updates the external_port of an existing port forwarding.
    floatingipId String
    The ID of the Neutron floating IP address. Changing this creates a new port forwarding.
    internalIpAddress String
    The fixed IPv4 address of the Neutron port associated with the port forwarding. Changing this updates the internal_ip_address of an existing port forwarding.
    internalPort Number
    The TCP/UDP/other protocol port number of the Neutron port fixed IP address associated to the port forwarding. Changing this updates the internal_port of an existing port forwarding.
    internalPortId String
    The ID of the Neutron port associated with the port forwarding. Changing this updates the internal_port_id of an existing port forwarding.
    protocol String
    The IP protocol used in the port forwarding. Changing this updates the protocol of an existing port forwarding.
    region String
    The region in which to obtain the V2 networking client. A networking client is needed to create a port forwarding. If omitted, the region argument of the provider is used. Changing this creates a new port forwarding.

    Package Details

    Repository
    OpenStack pulumi/pulumi-openstack
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the openstack Terraform Provider.
    openstack logo
    OpenStack v5.0.0 published on Friday, Sep 27, 2024 by Pulumi