1. Packages
  2. Flexibleengine Provider
  3. API Docs
  4. NetworkingPortV2
flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud

flexibleengine.NetworkingPortV2

Explore with Pulumi AI

Manages a V2 port resource within FlexibleEngine.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as flexibleengine from "@pulumi/flexibleengine";

const exampleVpc = new flexibleengine.VpcV1("exampleVpc", {cidr: "192.168.0.0/16"});
const exampleSubnet = new flexibleengine.VpcSubnetV1("exampleSubnet", {
    cidr: "192.168.0.0/24",
    gatewayIp: "192.168.0.1",
    vpcId: exampleVpc.vpcV1Id,
});
const port1 = new flexibleengine.NetworkingPortV2("port1", {
    networkId: exampleSubnet.vpcSubnetV1Id,
    adminStateUp: true,
});
Copy
import pulumi
import pulumi_flexibleengine as flexibleengine

example_vpc = flexibleengine.VpcV1("exampleVpc", cidr="192.168.0.0/16")
example_subnet = flexibleengine.VpcSubnetV1("exampleSubnet",
    cidr="192.168.0.0/24",
    gateway_ip="192.168.0.1",
    vpc_id=example_vpc.vpc_v1_id)
port1 = flexibleengine.NetworkingPortV2("port1",
    network_id=example_subnet.vpc_subnet_v1_id,
    admin_state_up=True)
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleVpc, err := flexibleengine.NewVpcV1(ctx, "exampleVpc", &flexibleengine.VpcV1Args{
			Cidr: pulumi.String("192.168.0.0/16"),
		})
		if err != nil {
			return err
		}
		exampleSubnet, err := flexibleengine.NewVpcSubnetV1(ctx, "exampleSubnet", &flexibleengine.VpcSubnetV1Args{
			Cidr:      pulumi.String("192.168.0.0/24"),
			GatewayIp: pulumi.String("192.168.0.1"),
			VpcId:     exampleVpc.VpcV1Id,
		})
		if err != nil {
			return err
		}
		_, err = flexibleengine.NewNetworkingPortV2(ctx, "port1", &flexibleengine.NetworkingPortV2Args{
			NetworkId:    exampleSubnet.VpcSubnetV1Id,
			AdminStateUp: pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Flexibleengine = Pulumi.Flexibleengine;

return await Deployment.RunAsync(() => 
{
    var exampleVpc = new Flexibleengine.VpcV1("exampleVpc", new()
    {
        Cidr = "192.168.0.0/16",
    });

    var exampleSubnet = new Flexibleengine.VpcSubnetV1("exampleSubnet", new()
    {
        Cidr = "192.168.0.0/24",
        GatewayIp = "192.168.0.1",
        VpcId = exampleVpc.VpcV1Id,
    });

    var port1 = new Flexibleengine.NetworkingPortV2("port1", new()
    {
        NetworkId = exampleSubnet.VpcSubnetV1Id,
        AdminStateUp = true,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.flexibleengine.VpcV1;
import com.pulumi.flexibleengine.VpcV1Args;
import com.pulumi.flexibleengine.VpcSubnetV1;
import com.pulumi.flexibleengine.VpcSubnetV1Args;
import com.pulumi.flexibleengine.NetworkingPortV2;
import com.pulumi.flexibleengine.NetworkingPortV2Args;
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 exampleVpc = new VpcV1("exampleVpc", VpcV1Args.builder()
            .cidr("192.168.0.0/16")
            .build());

        var exampleSubnet = new VpcSubnetV1("exampleSubnet", VpcSubnetV1Args.builder()
            .cidr("192.168.0.0/24")
            .gatewayIp("192.168.0.1")
            .vpcId(exampleVpc.vpcV1Id())
            .build());

        var port1 = new NetworkingPortV2("port1", NetworkingPortV2Args.builder()
            .networkId(exampleSubnet.vpcSubnetV1Id())
            .adminStateUp("true")
            .build());

    }
}
Copy
resources:
  exampleVpc:
    type: flexibleengine:VpcV1
    properties:
      cidr: 192.168.0.0/16
  exampleSubnet:
    type: flexibleengine:VpcSubnetV1
    properties:
      cidr: 192.168.0.0/24
      gatewayIp: 192.168.0.1
      vpcId: ${exampleVpc.vpcV1Id}
  port1:
    type: flexibleengine:NetworkingPortV2
    properties:
      networkId: ${exampleSubnet.vpcSubnetV1Id}
      adminStateUp: 'true'
Copy

Port With allowed_address_pairs

import * as pulumi from "@pulumi/pulumi";
import * as flexibleengine from "@pulumi/flexibleengine";

const port1 = new flexibleengine.NetworkingPortV2("port1", {
    networkId: flexibleengine_vpc_subnet_v1.example_subnet.id,
    adminStateUp: true,
    allowedAddressPairs: [{
        ipAddress: "192.168.0.0/24",
    }],
});
Copy
import pulumi
import pulumi_flexibleengine as flexibleengine

port1 = flexibleengine.NetworkingPortV2("port1",
    network_id=flexibleengine_vpc_subnet_v1["example_subnet"]["id"],
    admin_state_up=True,
    allowed_address_pairs=[{
        "ip_address": "192.168.0.0/24",
    }])
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := flexibleengine.NewNetworkingPortV2(ctx, "port1", &flexibleengine.NetworkingPortV2Args{
			NetworkId:    pulumi.Any(flexibleengine_vpc_subnet_v1.Example_subnet.Id),
			AdminStateUp: pulumi.Bool(true),
			AllowedAddressPairs: flexibleengine.NetworkingPortV2AllowedAddressPairArray{
				&flexibleengine.NetworkingPortV2AllowedAddressPairArgs{
					IpAddress: pulumi.String("192.168.0.0/24"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Flexibleengine = Pulumi.Flexibleengine;

return await Deployment.RunAsync(() => 
{
    var port1 = new Flexibleengine.NetworkingPortV2("port1", new()
    {
        NetworkId = flexibleengine_vpc_subnet_v1.Example_subnet.Id,
        AdminStateUp = true,
        AllowedAddressPairs = new[]
        {
            new Flexibleengine.Inputs.NetworkingPortV2AllowedAddressPairArgs
            {
                IpAddress = "192.168.0.0/24",
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.flexibleengine.NetworkingPortV2;
import com.pulumi.flexibleengine.NetworkingPortV2Args;
import com.pulumi.flexibleengine.inputs.NetworkingPortV2AllowedAddressPairArgs;
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 port1 = new NetworkingPortV2("port1", NetworkingPortV2Args.builder()
            .networkId(flexibleengine_vpc_subnet_v1.example_subnet().id())
            .adminStateUp("true")
            .allowedAddressPairs(NetworkingPortV2AllowedAddressPairArgs.builder()
                .ipAddress("192.168.0.0/24")
                .build())
            .build());

    }
}
Copy
resources:
  port1:
    type: flexibleengine:NetworkingPortV2
    properties:
      networkId: ${flexibleengine_vpc_subnet_v1.example_subnet.id}
      adminStateUp: 'true'
      allowedAddressPairs:
        - ipAddress: 192.168.0.0/24
Copy

Notes

Ports and Instances

There are some notes to consider when connecting Instances to networks using Ports. Please see the flexibleengine.ComputeInstanceV2 documentation for further documentation.

Create NetworkingPortV2 Resource

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

Constructor syntax

new NetworkingPortV2(name: string, args: NetworkingPortV2Args, opts?: CustomResourceOptions);
@overload
def NetworkingPortV2(resource_name: str,
                     args: NetworkingPortV2Args,
                     opts: Optional[ResourceOptions] = None)

@overload
def NetworkingPortV2(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     network_id: Optional[str] = None,
                     name: Optional[str] = None,
                     device_id: Optional[str] = None,
                     device_owner: Optional[str] = None,
                     fixed_ips: Optional[Sequence[NetworkingPortV2FixedIpArgs]] = None,
                     mac_address: Optional[str] = None,
                     admin_state_up: Optional[bool] = None,
                     allowed_address_pairs: Optional[Sequence[NetworkingPortV2AllowedAddressPairArgs]] = None,
                     networking_port_v2_id: Optional[str] = None,
                     region: Optional[str] = None,
                     security_group_ids: Optional[Sequence[str]] = None,
                     tenant_id: Optional[str] = None,
                     timeouts: Optional[NetworkingPortV2TimeoutsArgs] = None,
                     value_specs: Optional[Mapping[str, str]] = None)
func NewNetworkingPortV2(ctx *Context, name string, args NetworkingPortV2Args, opts ...ResourceOption) (*NetworkingPortV2, error)
public NetworkingPortV2(string name, NetworkingPortV2Args args, CustomResourceOptions? opts = null)
public NetworkingPortV2(String name, NetworkingPortV2Args args)
public NetworkingPortV2(String name, NetworkingPortV2Args args, CustomResourceOptions options)
type: flexibleengine:NetworkingPortV2
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. NetworkingPortV2Args
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. NetworkingPortV2Args
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. NetworkingPortV2Args
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. NetworkingPortV2Args
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. NetworkingPortV2Args
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 networkingPortV2Resource = new Flexibleengine.NetworkingPortV2("networkingPortV2Resource", new()
{
    NetworkId = "string",
    Name = "string",
    DeviceId = "string",
    DeviceOwner = "string",
    FixedIps = new[]
    {
        new Flexibleengine.Inputs.NetworkingPortV2FixedIpArgs
        {
            SubnetId = "string",
            IpAddress = "string",
        },
    },
    AdminStateUp = false,
    AllowedAddressPairs = new[]
    {
        new Flexibleengine.Inputs.NetworkingPortV2AllowedAddressPairArgs
        {
            IpAddress = "string",
            MacAddress = "string",
        },
    },
    NetworkingPortV2Id = "string",
    Region = "string",
    SecurityGroupIds = new[]
    {
        "string",
    },
    TenantId = "string",
    Timeouts = new Flexibleengine.Inputs.NetworkingPortV2TimeoutsArgs
    {
        Create = "string",
        Delete = "string",
    },
    ValueSpecs = 
    {
        { "string", "string" },
    },
});
Copy
example, err := flexibleengine.NewNetworkingPortV2(ctx, "networkingPortV2Resource", &flexibleengine.NetworkingPortV2Args{
NetworkId: pulumi.String("string"),
Name: pulumi.String("string"),
DeviceId: pulumi.String("string"),
DeviceOwner: pulumi.String("string"),
FixedIps: .NetworkingPortV2FixedIpArray{
&.NetworkingPortV2FixedIpArgs{
SubnetId: pulumi.String("string"),
IpAddress: pulumi.String("string"),
},
},
AdminStateUp: pulumi.Bool(false),
AllowedAddressPairs: .NetworkingPortV2AllowedAddressPairArray{
&.NetworkingPortV2AllowedAddressPairArgs{
IpAddress: pulumi.String("string"),
MacAddress: pulumi.String("string"),
},
},
NetworkingPortV2Id: pulumi.String("string"),
Region: pulumi.String("string"),
SecurityGroupIds: pulumi.StringArray{
pulumi.String("string"),
},
TenantId: pulumi.String("string"),
Timeouts: &.NetworkingPortV2TimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
},
ValueSpecs: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
Copy
var networkingPortV2Resource = new NetworkingPortV2("networkingPortV2Resource", NetworkingPortV2Args.builder()
    .networkId("string")
    .name("string")
    .deviceId("string")
    .deviceOwner("string")
    .fixedIps(NetworkingPortV2FixedIpArgs.builder()
        .subnetId("string")
        .ipAddress("string")
        .build())
    .adminStateUp(false)
    .allowedAddressPairs(NetworkingPortV2AllowedAddressPairArgs.builder()
        .ipAddress("string")
        .macAddress("string")
        .build())
    .networkingPortV2Id("string")
    .region("string")
    .securityGroupIds("string")
    .tenantId("string")
    .timeouts(NetworkingPortV2TimeoutsArgs.builder()
        .create("string")
        .delete("string")
        .build())
    .valueSpecs(Map.of("string", "string"))
    .build());
Copy
networking_port_v2_resource = flexibleengine.NetworkingPortV2("networkingPortV2Resource",
    network_id="string",
    name="string",
    device_id="string",
    device_owner="string",
    fixed_ips=[{
        "subnet_id": "string",
        "ip_address": "string",
    }],
    admin_state_up=False,
    allowed_address_pairs=[{
        "ip_address": "string",
        "mac_address": "string",
    }],
    networking_port_v2_id="string",
    region="string",
    security_group_ids=["string"],
    tenant_id="string",
    timeouts={
        "create": "string",
        "delete": "string",
    },
    value_specs={
        "string": "string",
    })
Copy
const networkingPortV2Resource = new flexibleengine.NetworkingPortV2("networkingPortV2Resource", {
    networkId: "string",
    name: "string",
    deviceId: "string",
    deviceOwner: "string",
    fixedIps: [{
        subnetId: "string",
        ipAddress: "string",
    }],
    adminStateUp: false,
    allowedAddressPairs: [{
        ipAddress: "string",
        macAddress: "string",
    }],
    networkingPortV2Id: "string",
    region: "string",
    securityGroupIds: ["string"],
    tenantId: "string",
    timeouts: {
        create: "string",
        "delete": "string",
    },
    valueSpecs: {
        string: "string",
    },
});
Copy
type: flexibleengine:NetworkingPortV2
properties:
    adminStateUp: false
    allowedAddressPairs:
        - ipAddress: string
          macAddress: string
    deviceId: string
    deviceOwner: string
    fixedIps:
        - ipAddress: string
          subnetId: string
    name: string
    networkId: string
    networkingPortV2Id: string
    region: string
    securityGroupIds:
        - string
    tenantId: string
    timeouts:
        create: string
        delete: string
    valueSpecs:
        string: string
Copy

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

NetworkId This property is required. string
The ID of the VPC Subnet to attach the port to. Changing this creates a new port.
AdminStateUp bool
Administrative up/down status for the port (must be "true" or "false" if provided). Changing this updates the admin_state_up of an existing port.
AllowedAddressPairs List<NetworkingPortV2AllowedAddressPair>
An array of IP/MAC Address pairs of additional IP addresses that can be active on this port. The object structure is described below.
DeviceId string
The ID of the device attached to the port. Changing this creates a new port.
DeviceOwner string
The device owner of the Port. Changing this creates a new port.
FixedIps List<NetworkingPortV2FixedIp>
An array of desired IPs for this port. The object structure is described below.
MacAddress string
The additional MAC address.

Deprecated: Deprecated

Name string
A unique name for the port. Changing this updates the name of an existing port.
NetworkingPortV2Id string
Region string
The region in which to allocate the port. If omitted, the region argument of the provider is used. Changing this creates a new port.
SecurityGroupIds List<string>
A list of security group IDs to apply to the port. The security groups must be specified by ID and not name (as opposed to how they are configured with the Compute Instance).
TenantId string
The owner of the Port. Required if admin wants to create a port for another tenant. Changing this creates a new port.
Timeouts NetworkingPortV2Timeouts
ValueSpecs Dictionary<string, string>

Map of additional options.

The fixed_ip block supports:

NetworkId This property is required. string
The ID of the VPC Subnet to attach the port to. Changing this creates a new port.
AdminStateUp bool
Administrative up/down status for the port (must be "true" or "false" if provided). Changing this updates the admin_state_up of an existing port.
AllowedAddressPairs []NetworkingPortV2AllowedAddressPairArgs
An array of IP/MAC Address pairs of additional IP addresses that can be active on this port. The object structure is described below.
DeviceId string
The ID of the device attached to the port. Changing this creates a new port.
DeviceOwner string
The device owner of the Port. Changing this creates a new port.
FixedIps []NetworkingPortV2FixedIpArgs
An array of desired IPs for this port. The object structure is described below.
MacAddress string
The additional MAC address.

Deprecated: Deprecated

Name string
A unique name for the port. Changing this updates the name of an existing port.
NetworkingPortV2Id string
Region string
The region in which to allocate the port. If omitted, the region argument of the provider is used. Changing this creates a new port.
SecurityGroupIds []string
A list of security group IDs to apply to the port. The security groups must be specified by ID and not name (as opposed to how they are configured with the Compute Instance).
TenantId string
The owner of the Port. Required if admin wants to create a port for another tenant. Changing this creates a new port.
Timeouts NetworkingPortV2TimeoutsArgs
ValueSpecs map[string]string

Map of additional options.

The fixed_ip block supports:

networkId This property is required. String
The ID of the VPC Subnet to attach the port to. Changing this creates a new port.
adminStateUp Boolean
Administrative up/down status for the port (must be "true" or "false" if provided). Changing this updates the admin_state_up of an existing port.
allowedAddressPairs List<NetworkingPortV2AllowedAddressPair>
An array of IP/MAC Address pairs of additional IP addresses that can be active on this port. The object structure is described below.
deviceId String
The ID of the device attached to the port. Changing this creates a new port.
deviceOwner String
The device owner of the Port. Changing this creates a new port.
fixedIps List<NetworkingPortV2FixedIp>
An array of desired IPs for this port. The object structure is described below.
macAddress String
The additional MAC address.

Deprecated: Deprecated

name String
A unique name for the port. Changing this updates the name of an existing port.
networkingPortV2Id String
region String
The region in which to allocate the port. If omitted, the region argument of the provider is used. Changing this creates a new port.
securityGroupIds List<String>
A list of security group IDs to apply to the port. The security groups must be specified by ID and not name (as opposed to how they are configured with the Compute Instance).
tenantId String
The owner of the Port. Required if admin wants to create a port for another tenant. Changing this creates a new port.
timeouts NetworkingPortV2Timeouts
valueSpecs Map<String,String>

Map of additional options.

The fixed_ip block supports:

networkId This property is required. string
The ID of the VPC Subnet to attach the port to. Changing this creates a new port.
adminStateUp boolean
Administrative up/down status for the port (must be "true" or "false" if provided). Changing this updates the admin_state_up of an existing port.
allowedAddressPairs NetworkingPortV2AllowedAddressPair[]
An array of IP/MAC Address pairs of additional IP addresses that can be active on this port. The object structure is described below.
deviceId string
The ID of the device attached to the port. Changing this creates a new port.
deviceOwner string
The device owner of the Port. Changing this creates a new port.
fixedIps NetworkingPortV2FixedIp[]
An array of desired IPs for this port. The object structure is described below.
macAddress string
The additional MAC address.

Deprecated: Deprecated

name string
A unique name for the port. Changing this updates the name of an existing port.
networkingPortV2Id string
region string
The region in which to allocate the port. If omitted, the region argument of the provider is used. Changing this creates a new port.
securityGroupIds string[]
A list of security group IDs to apply to the port. The security groups must be specified by ID and not name (as opposed to how they are configured with the Compute Instance).
tenantId string
The owner of the Port. Required if admin wants to create a port for another tenant. Changing this creates a new port.
timeouts NetworkingPortV2Timeouts
valueSpecs {[key: string]: string}

Map of additional options.

The fixed_ip block supports:

network_id This property is required. str
The ID of the VPC Subnet to attach the port to. Changing this creates a new port.
admin_state_up bool
Administrative up/down status for the port (must be "true" or "false" if provided). Changing this updates the admin_state_up of an existing port.
allowed_address_pairs Sequence[NetworkingPortV2AllowedAddressPairArgs]
An array of IP/MAC Address pairs of additional IP addresses that can be active on this port. The object structure is described below.
device_id str
The ID of the device attached to the port. Changing this creates a new port.
device_owner str
The device owner of the Port. Changing this creates a new port.
fixed_ips Sequence[NetworkingPortV2FixedIpArgs]
An array of desired IPs for this port. The object structure is described below.
mac_address str
The additional MAC address.

Deprecated: Deprecated

name str
A unique name for the port. Changing this updates the name of an existing port.
networking_port_v2_id str
region str
The region in which to allocate the port. If omitted, the region argument of the provider is used. Changing this creates a new port.
security_group_ids Sequence[str]
A list of security group IDs to apply to the port. The security groups must be specified by ID and not name (as opposed to how they are configured with the Compute Instance).
tenant_id str
The owner of the Port. Required if admin wants to create a port for another tenant. Changing this creates a new port.
timeouts NetworkingPortV2TimeoutsArgs
value_specs Mapping[str, str]

Map of additional options.

The fixed_ip block supports:

networkId This property is required. String
The ID of the VPC Subnet to attach the port to. Changing this creates a new port.
adminStateUp Boolean
Administrative up/down status for the port (must be "true" or "false" if provided). Changing this updates the admin_state_up of an existing port.
allowedAddressPairs List<Property Map>
An array of IP/MAC Address pairs of additional IP addresses that can be active on this port. The object structure is described below.
deviceId String
The ID of the device attached to the port. Changing this creates a new port.
deviceOwner String
The device owner of the Port. Changing this creates a new port.
fixedIps List<Property Map>
An array of desired IPs for this port. The object structure is described below.
macAddress String
The additional MAC address.

Deprecated: Deprecated

name String
A unique name for the port. Changing this updates the name of an existing port.
networkingPortV2Id String
region String
The region in which to allocate the port. If omitted, the region argument of the provider is used. Changing this creates a new port.
securityGroupIds List<String>
A list of security group IDs to apply to the port. The security groups must be specified by ID and not name (as opposed to how they are configured with the Compute Instance).
tenantId String
The owner of the Port. Required if admin wants to create a port for another tenant. Changing this creates a new port.
timeouts Property Map
valueSpecs Map<String>

Map of additional options.

The fixed_ip block supports:

Outputs

All input properties are implicitly available as output properties. Additionally, the NetworkingPortV2 resource produces the following output properties:

AllFixedIps List<string>
The collection of Fixed IP addresses on the port in the order returned by the Network v2 API.
Id string
The provider-assigned unique ID for this managed resource.
AllFixedIps []string
The collection of Fixed IP addresses on the port in the order returned by the Network v2 API.
Id string
The provider-assigned unique ID for this managed resource.
allFixedIps List<String>
The collection of Fixed IP addresses on the port in the order returned by the Network v2 API.
id String
The provider-assigned unique ID for this managed resource.
allFixedIps string[]
The collection of Fixed IP addresses on the port in the order returned by the Network v2 API.
id string
The provider-assigned unique ID for this managed resource.
all_fixed_ips Sequence[str]
The collection of Fixed IP addresses on the port in the order returned by the Network v2 API.
id str
The provider-assigned unique ID for this managed resource.
allFixedIps List<String>
The collection of Fixed IP addresses on the port in the order returned by the Network v2 API.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing NetworkingPortV2 Resource

Get an existing NetworkingPortV2 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?: NetworkingPortV2State, opts?: CustomResourceOptions): NetworkingPortV2
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        admin_state_up: Optional[bool] = None,
        all_fixed_ips: Optional[Sequence[str]] = None,
        allowed_address_pairs: Optional[Sequence[NetworkingPortV2AllowedAddressPairArgs]] = None,
        device_id: Optional[str] = None,
        device_owner: Optional[str] = None,
        fixed_ips: Optional[Sequence[NetworkingPortV2FixedIpArgs]] = None,
        mac_address: Optional[str] = None,
        name: Optional[str] = None,
        network_id: Optional[str] = None,
        networking_port_v2_id: Optional[str] = None,
        region: Optional[str] = None,
        security_group_ids: Optional[Sequence[str]] = None,
        tenant_id: Optional[str] = None,
        timeouts: Optional[NetworkingPortV2TimeoutsArgs] = None,
        value_specs: Optional[Mapping[str, str]] = None) -> NetworkingPortV2
func GetNetworkingPortV2(ctx *Context, name string, id IDInput, state *NetworkingPortV2State, opts ...ResourceOption) (*NetworkingPortV2, error)
public static NetworkingPortV2 Get(string name, Input<string> id, NetworkingPortV2State? state, CustomResourceOptions? opts = null)
public static NetworkingPortV2 get(String name, Output<String> id, NetworkingPortV2State state, CustomResourceOptions options)
resources:  _:    type: flexibleengine:NetworkingPortV2    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
AdminStateUp bool
Administrative up/down status for the port (must be "true" or "false" if provided). Changing this updates the admin_state_up of an existing port.
AllFixedIps List<string>
The collection of Fixed IP addresses on the port in the order returned by the Network v2 API.
AllowedAddressPairs List<NetworkingPortV2AllowedAddressPair>
An array of IP/MAC Address pairs of additional IP addresses that can be active on this port. The object structure is described below.
DeviceId string
The ID of the device attached to the port. Changing this creates a new port.
DeviceOwner string
The device owner of the Port. Changing this creates a new port.
FixedIps List<NetworkingPortV2FixedIp>
An array of desired IPs for this port. The object structure is described below.
MacAddress string
The additional MAC address.

Deprecated: Deprecated

Name string
A unique name for the port. Changing this updates the name of an existing port.
NetworkId string
The ID of the VPC Subnet to attach the port to. Changing this creates a new port.
NetworkingPortV2Id string
Region string
The region in which to allocate the port. If omitted, the region argument of the provider is used. Changing this creates a new port.
SecurityGroupIds List<string>
A list of security group IDs to apply to the port. The security groups must be specified by ID and not name (as opposed to how they are configured with the Compute Instance).
TenantId string
The owner of the Port. Required if admin wants to create a port for another tenant. Changing this creates a new port.
Timeouts NetworkingPortV2Timeouts
ValueSpecs Dictionary<string, string>

Map of additional options.

The fixed_ip block supports:

AdminStateUp bool
Administrative up/down status for the port (must be "true" or "false" if provided). Changing this updates the admin_state_up of an existing port.
AllFixedIps []string
The collection of Fixed IP addresses on the port in the order returned by the Network v2 API.
AllowedAddressPairs []NetworkingPortV2AllowedAddressPairArgs
An array of IP/MAC Address pairs of additional IP addresses that can be active on this port. The object structure is described below.
DeviceId string
The ID of the device attached to the port. Changing this creates a new port.
DeviceOwner string
The device owner of the Port. Changing this creates a new port.
FixedIps []NetworkingPortV2FixedIpArgs
An array of desired IPs for this port. The object structure is described below.
MacAddress string
The additional MAC address.

Deprecated: Deprecated

Name string
A unique name for the port. Changing this updates the name of an existing port.
NetworkId string
The ID of the VPC Subnet to attach the port to. Changing this creates a new port.
NetworkingPortV2Id string
Region string
The region in which to allocate the port. If omitted, the region argument of the provider is used. Changing this creates a new port.
SecurityGroupIds []string
A list of security group IDs to apply to the port. The security groups must be specified by ID and not name (as opposed to how they are configured with the Compute Instance).
TenantId string
The owner of the Port. Required if admin wants to create a port for another tenant. Changing this creates a new port.
Timeouts NetworkingPortV2TimeoutsArgs
ValueSpecs map[string]string

Map of additional options.

The fixed_ip block supports:

adminStateUp Boolean
Administrative up/down status for the port (must be "true" or "false" if provided). Changing this updates the admin_state_up of an existing port.
allFixedIps List<String>
The collection of Fixed IP addresses on the port in the order returned by the Network v2 API.
allowedAddressPairs List<NetworkingPortV2AllowedAddressPair>
An array of IP/MAC Address pairs of additional IP addresses that can be active on this port. The object structure is described below.
deviceId String
The ID of the device attached to the port. Changing this creates a new port.
deviceOwner String
The device owner of the Port. Changing this creates a new port.
fixedIps List<NetworkingPortV2FixedIp>
An array of desired IPs for this port. The object structure is described below.
macAddress String
The additional MAC address.

Deprecated: Deprecated

name String
A unique name for the port. Changing this updates the name of an existing port.
networkId String
The ID of the VPC Subnet to attach the port to. Changing this creates a new port.
networkingPortV2Id String
region String
The region in which to allocate the port. If omitted, the region argument of the provider is used. Changing this creates a new port.
securityGroupIds List<String>
A list of security group IDs to apply to the port. The security groups must be specified by ID and not name (as opposed to how they are configured with the Compute Instance).
tenantId String
The owner of the Port. Required if admin wants to create a port for another tenant. Changing this creates a new port.
timeouts NetworkingPortV2Timeouts
valueSpecs Map<String,String>

Map of additional options.

The fixed_ip block supports:

adminStateUp boolean
Administrative up/down status for the port (must be "true" or "false" if provided). Changing this updates the admin_state_up of an existing port.
allFixedIps string[]
The collection of Fixed IP addresses on the port in the order returned by the Network v2 API.
allowedAddressPairs NetworkingPortV2AllowedAddressPair[]
An array of IP/MAC Address pairs of additional IP addresses that can be active on this port. The object structure is described below.
deviceId string
The ID of the device attached to the port. Changing this creates a new port.
deviceOwner string
The device owner of the Port. Changing this creates a new port.
fixedIps NetworkingPortV2FixedIp[]
An array of desired IPs for this port. The object structure is described below.
macAddress string
The additional MAC address.

Deprecated: Deprecated

name string
A unique name for the port. Changing this updates the name of an existing port.
networkId string
The ID of the VPC Subnet to attach the port to. Changing this creates a new port.
networkingPortV2Id string
region string
The region in which to allocate the port. If omitted, the region argument of the provider is used. Changing this creates a new port.
securityGroupIds string[]
A list of security group IDs to apply to the port. The security groups must be specified by ID and not name (as opposed to how they are configured with the Compute Instance).
tenantId string
The owner of the Port. Required if admin wants to create a port for another tenant. Changing this creates a new port.
timeouts NetworkingPortV2Timeouts
valueSpecs {[key: string]: string}

Map of additional options.

The fixed_ip block supports:

admin_state_up bool
Administrative up/down status for the port (must be "true" or "false" if provided). Changing this updates the admin_state_up of an existing port.
all_fixed_ips Sequence[str]
The collection of Fixed IP addresses on the port in the order returned by the Network v2 API.
allowed_address_pairs Sequence[NetworkingPortV2AllowedAddressPairArgs]
An array of IP/MAC Address pairs of additional IP addresses that can be active on this port. The object structure is described below.
device_id str
The ID of the device attached to the port. Changing this creates a new port.
device_owner str
The device owner of the Port. Changing this creates a new port.
fixed_ips Sequence[NetworkingPortV2FixedIpArgs]
An array of desired IPs for this port. The object structure is described below.
mac_address str
The additional MAC address.

Deprecated: Deprecated

name str
A unique name for the port. Changing this updates the name of an existing port.
network_id str
The ID of the VPC Subnet to attach the port to. Changing this creates a new port.
networking_port_v2_id str
region str
The region in which to allocate the port. If omitted, the region argument of the provider is used. Changing this creates a new port.
security_group_ids Sequence[str]
A list of security group IDs to apply to the port. The security groups must be specified by ID and not name (as opposed to how they are configured with the Compute Instance).
tenant_id str
The owner of the Port. Required if admin wants to create a port for another tenant. Changing this creates a new port.
timeouts NetworkingPortV2TimeoutsArgs
value_specs Mapping[str, str]

Map of additional options.

The fixed_ip block supports:

adminStateUp Boolean
Administrative up/down status for the port (must be "true" or "false" if provided). Changing this updates the admin_state_up of an existing port.
allFixedIps List<String>
The collection of Fixed IP addresses on the port in the order returned by the Network v2 API.
allowedAddressPairs List<Property Map>
An array of IP/MAC Address pairs of additional IP addresses that can be active on this port. The object structure is described below.
deviceId String
The ID of the device attached to the port. Changing this creates a new port.
deviceOwner String
The device owner of the Port. Changing this creates a new port.
fixedIps List<Property Map>
An array of desired IPs for this port. The object structure is described below.
macAddress String
The additional MAC address.

Deprecated: Deprecated

name String
A unique name for the port. Changing this updates the name of an existing port.
networkId String
The ID of the VPC Subnet to attach the port to. Changing this creates a new port.
networkingPortV2Id String
region String
The region in which to allocate the port. If omitted, the region argument of the provider is used. Changing this creates a new port.
securityGroupIds List<String>
A list of security group IDs to apply to the port. The security groups must be specified by ID and not name (as opposed to how they are configured with the Compute Instance).
tenantId String
The owner of the Port. Required if admin wants to create a port for another tenant. Changing this creates a new port.
timeouts Property Map
valueSpecs Map<String>

Map of additional options.

The fixed_ip block supports:

Supporting Types

NetworkingPortV2AllowedAddressPair
, NetworkingPortV2AllowedAddressPairArgs

IpAddress This property is required. string
The additional IP address. The value can be an IP Address or a CIDR, and can not be 0.0.0.0. A server connected to the port can send a packet with source address which matches one of the specified allowed address pairs. It is recommended to configure an independent security group for the port if a large CIDR block (subnet mask less than 24) is configured.
MacAddress string
The additional MAC address.
IpAddress This property is required. string
The additional IP address. The value can be an IP Address or a CIDR, and can not be 0.0.0.0. A server connected to the port can send a packet with source address which matches one of the specified allowed address pairs. It is recommended to configure an independent security group for the port if a large CIDR block (subnet mask less than 24) is configured.
MacAddress string
The additional MAC address.
ipAddress This property is required. String
The additional IP address. The value can be an IP Address or a CIDR, and can not be 0.0.0.0. A server connected to the port can send a packet with source address which matches one of the specified allowed address pairs. It is recommended to configure an independent security group for the port if a large CIDR block (subnet mask less than 24) is configured.
macAddress String
The additional MAC address.
ipAddress This property is required. string
The additional IP address. The value can be an IP Address or a CIDR, and can not be 0.0.0.0. A server connected to the port can send a packet with source address which matches one of the specified allowed address pairs. It is recommended to configure an independent security group for the port if a large CIDR block (subnet mask less than 24) is configured.
macAddress string
The additional MAC address.
ip_address This property is required. str
The additional IP address. The value can be an IP Address or a CIDR, and can not be 0.0.0.0. A server connected to the port can send a packet with source address which matches one of the specified allowed address pairs. It is recommended to configure an independent security group for the port if a large CIDR block (subnet mask less than 24) is configured.
mac_address str
The additional MAC address.
ipAddress This property is required. String
The additional IP address. The value can be an IP Address or a CIDR, and can not be 0.0.0.0. A server connected to the port can send a packet with source address which matches one of the specified allowed address pairs. It is recommended to configure an independent security group for the port if a large CIDR block (subnet mask less than 24) is configured.
macAddress String
The additional MAC address.

NetworkingPortV2FixedIp
, NetworkingPortV2FixedIpArgs

SubnetId This property is required. string
The ipv4_subnet_id or ipv6_subnet_id of the VPC Subnet in which to allocate IP address for this port.
IpAddress string
The additional IP address. The value can be an IP Address or a CIDR, and can not be 0.0.0.0. A server connected to the port can send a packet with source address which matches one of the specified allowed address pairs. It is recommended to configure an independent security group for the port if a large CIDR block (subnet mask less than 24) is configured.
SubnetId This property is required. string
The ipv4_subnet_id or ipv6_subnet_id of the VPC Subnet in which to allocate IP address for this port.
IpAddress string
The additional IP address. The value can be an IP Address or a CIDR, and can not be 0.0.0.0. A server connected to the port can send a packet with source address which matches one of the specified allowed address pairs. It is recommended to configure an independent security group for the port if a large CIDR block (subnet mask less than 24) is configured.
subnetId This property is required. String
The ipv4_subnet_id or ipv6_subnet_id of the VPC Subnet in which to allocate IP address for this port.
ipAddress String
The additional IP address. The value can be an IP Address or a CIDR, and can not be 0.0.0.0. A server connected to the port can send a packet with source address which matches one of the specified allowed address pairs. It is recommended to configure an independent security group for the port if a large CIDR block (subnet mask less than 24) is configured.
subnetId This property is required. string
The ipv4_subnet_id or ipv6_subnet_id of the VPC Subnet in which to allocate IP address for this port.
ipAddress string
The additional IP address. The value can be an IP Address or a CIDR, and can not be 0.0.0.0. A server connected to the port can send a packet with source address which matches one of the specified allowed address pairs. It is recommended to configure an independent security group for the port if a large CIDR block (subnet mask less than 24) is configured.
subnet_id This property is required. str
The ipv4_subnet_id or ipv6_subnet_id of the VPC Subnet in which to allocate IP address for this port.
ip_address str
The additional IP address. The value can be an IP Address or a CIDR, and can not be 0.0.0.0. A server connected to the port can send a packet with source address which matches one of the specified allowed address pairs. It is recommended to configure an independent security group for the port if a large CIDR block (subnet mask less than 24) is configured.
subnetId This property is required. String
The ipv4_subnet_id or ipv6_subnet_id of the VPC Subnet in which to allocate IP address for this port.
ipAddress String
The additional IP address. The value can be an IP Address or a CIDR, and can not be 0.0.0.0. A server connected to the port can send a packet with source address which matches one of the specified allowed address pairs. It is recommended to configure an independent security group for the port if a large CIDR block (subnet mask less than 24) is configured.

NetworkingPortV2Timeouts
, NetworkingPortV2TimeoutsArgs

Create string
Delete string
Create string
Delete string
create String
delete String
create string
delete string
create str
delete str
create String
delete String

Import

Ports can be imported using the id, e.g.

$ pulumi import flexibleengine:index/networkingPortV2:NetworkingPortV2 port_1 eae26a3e-1c33-4cc1-9c31-0cd729c438a1
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
flexibleengine flexibleenginecloud/terraform-provider-flexibleengine
License
Notes
This Pulumi package is based on the flexibleengine Terraform Provider.