opentelekomcloud.NetworkingPortV2
Explore with Pulumi AI
Up-to-date reference of API arguments for VPC port you can get at documentation portal
Manages a V2 port resource within OpenTelekomCloud.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";
const network1 = new opentelekomcloud.NetworkingNetworkV2("network1", {adminStateUp: "true"});
const subnet1 = new opentelekomcloud.NetworkingSubnetV2("subnet1", {
cidr: "192.168.199.0/24",
ipVersion: 4,
networkId: network1.networkingNetworkV2Id,
});
const port1 = new opentelekomcloud.NetworkingPortV2("port1", {
adminStateUp: true,
networkId: network1.networkingNetworkV2Id,
fixedIp: {
subnetId: subnet1.networkingSubnetV2Id,
ipAddress: "192.168.199.23",
},
});
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud
network1 = opentelekomcloud.NetworkingNetworkV2("network1", admin_state_up="true")
subnet1 = opentelekomcloud.NetworkingSubnetV2("subnet1",
cidr="192.168.199.0/24",
ip_version=4,
network_id=network1.networking_network_v2_id)
port1 = opentelekomcloud.NetworkingPortV2("port1",
admin_state_up=True,
network_id=network1.networking_network_v2_id,
fixed_ip={
"subnet_id": subnet1.networking_subnet_v2_id,
"ip_address": "192.168.199.23",
})
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
network1, err := opentelekomcloud.NewNetworkingNetworkV2(ctx, "network1", &opentelekomcloud.NetworkingNetworkV2Args{
AdminStateUp: pulumi.String("true"),
})
if err != nil {
return err
}
subnet1, err := opentelekomcloud.NewNetworkingSubnetV2(ctx, "subnet1", &opentelekomcloud.NetworkingSubnetV2Args{
Cidr: pulumi.String("192.168.199.0/24"),
IpVersion: pulumi.Float64(4),
NetworkId: network1.NetworkingNetworkV2Id,
})
if err != nil {
return err
}
_, err = opentelekomcloud.NewNetworkingPortV2(ctx, "port1", &opentelekomcloud.NetworkingPortV2Args{
AdminStateUp: pulumi.Bool(true),
NetworkId: network1.NetworkingNetworkV2Id,
FixedIp: &opentelekomcloud.NetworkingPortV2FixedIpArgs{
SubnetId: subnet1.NetworkingSubnetV2Id,
IpAddress: pulumi.String("192.168.199.23"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;
return await Deployment.RunAsync(() =>
{
var network1 = new Opentelekomcloud.NetworkingNetworkV2("network1", new()
{
AdminStateUp = "true",
});
var subnet1 = new Opentelekomcloud.NetworkingSubnetV2("subnet1", new()
{
Cidr = "192.168.199.0/24",
IpVersion = 4,
NetworkId = network1.NetworkingNetworkV2Id,
});
var port1 = new Opentelekomcloud.NetworkingPortV2("port1", new()
{
AdminStateUp = true,
NetworkId = network1.NetworkingNetworkV2Id,
FixedIp = new Opentelekomcloud.Inputs.NetworkingPortV2FixedIpArgs
{
SubnetId = subnet1.NetworkingSubnetV2Id,
IpAddress = "192.168.199.23",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.NetworkingNetworkV2;
import com.pulumi.opentelekomcloud.NetworkingNetworkV2Args;
import com.pulumi.opentelekomcloud.NetworkingSubnetV2;
import com.pulumi.opentelekomcloud.NetworkingSubnetV2Args;
import com.pulumi.opentelekomcloud.NetworkingPortV2;
import com.pulumi.opentelekomcloud.NetworkingPortV2Args;
import com.pulumi.opentelekomcloud.inputs.NetworkingPortV2FixedIpArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var network1 = new NetworkingNetworkV2("network1", NetworkingNetworkV2Args.builder()
.adminStateUp("true")
.build());
var subnet1 = new NetworkingSubnetV2("subnet1", NetworkingSubnetV2Args.builder()
.cidr("192.168.199.0/24")
.ipVersion(4)
.networkId(network1.networkingNetworkV2Id())
.build());
var port1 = new NetworkingPortV2("port1", NetworkingPortV2Args.builder()
.adminStateUp("true")
.networkId(network1.networkingNetworkV2Id())
.fixedIp(NetworkingPortV2FixedIpArgs.builder()
.subnetId(subnet1.networkingSubnetV2Id())
.ipAddress("192.168.199.23")
.build())
.build());
}
}
resources:
port1:
type: opentelekomcloud:NetworkingPortV2
properties:
adminStateUp: 'true'
networkId: ${network1.networkingNetworkV2Id}
fixedIp:
subnetId: ${subnet1.networkingSubnetV2Id}
ipAddress: 192.168.199.23
network1:
type: opentelekomcloud:NetworkingNetworkV2
properties:
adminStateUp: 'true'
subnet1:
type: opentelekomcloud:NetworkingSubnetV2
properties:
cidr: 192.168.199.0/24
ipVersion: 4
networkId: ${network1.networkingNetworkV2Id}
Notes
The arguments
mac_address
andtenant_id
are no longer supported as input and are therefore removed from the argument reference.
Ports and Instances
There are some notes to consider when connecting Instances to networks using
Ports. Please see the opentelekomcloud.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,
networking_port_v2_id: Optional[str] = None,
device_owner: Optional[str] = None,
extra_dhcp_options: Optional[Sequence[NetworkingPortV2ExtraDhcpOptionArgs]] = None,
fixed_ip: Optional[NetworkingPortV2FixedIpArgs] = None,
admin_state_up: Optional[bool] = None,
allowed_address_pairs: Optional[Sequence[NetworkingPortV2AllowedAddressPairArgs]] = None,
device_id: Optional[str] = None,
no_security_groups: Optional[bool] = None,
port_security_enabled: Optional[bool] = None,
region: Optional[str] = None,
security_group_ids: Optional[Sequence[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: opentelekomcloud:NetworkingPortV2
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 NetworkingPortV2Args
- 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 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 string
- The unique name of the resource.
- args NetworkingPortV2Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NetworkingPortV2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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 Opentelekomcloud.NetworkingPortV2("networkingPortV2Resource", new()
{
NetworkId = "string",
Name = "string",
NetworkingPortV2Id = "string",
DeviceOwner = "string",
ExtraDhcpOptions = new[]
{
new Opentelekomcloud.Inputs.NetworkingPortV2ExtraDhcpOptionArgs
{
Name = "string",
Value = "string",
},
},
FixedIp = new Opentelekomcloud.Inputs.NetworkingPortV2FixedIpArgs
{
SubnetId = "string",
IpAddress = "string",
},
AdminStateUp = false,
AllowedAddressPairs = new[]
{
new Opentelekomcloud.Inputs.NetworkingPortV2AllowedAddressPairArgs
{
IpAddress = "string",
MacAddress = "string",
},
},
DeviceId = "string",
NoSecurityGroups = false,
PortSecurityEnabled = false,
Region = "string",
SecurityGroupIds = new[]
{
"string",
},
Timeouts = new Opentelekomcloud.Inputs.NetworkingPortV2TimeoutsArgs
{
Create = "string",
Delete = "string",
},
ValueSpecs =
{
{ "string", "string" },
},
});
example, err := opentelekomcloud.NewNetworkingPortV2(ctx, "networkingPortV2Resource", &opentelekomcloud.NetworkingPortV2Args{
NetworkId: pulumi.String("string"),
Name: pulumi.String("string"),
NetworkingPortV2Id: pulumi.String("string"),
DeviceOwner: pulumi.String("string"),
ExtraDhcpOptions: opentelekomcloud.NetworkingPortV2ExtraDhcpOptionArray{
&opentelekomcloud.NetworkingPortV2ExtraDhcpOptionArgs{
Name: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
FixedIp: &opentelekomcloud.NetworkingPortV2FixedIpArgs{
SubnetId: pulumi.String("string"),
IpAddress: pulumi.String("string"),
},
AdminStateUp: pulumi.Bool(false),
AllowedAddressPairs: opentelekomcloud.NetworkingPortV2AllowedAddressPairArray{
&opentelekomcloud.NetworkingPortV2AllowedAddressPairArgs{
IpAddress: pulumi.String("string"),
MacAddress: pulumi.String("string"),
},
},
DeviceId: pulumi.String("string"),
NoSecurityGroups: pulumi.Bool(false),
PortSecurityEnabled: pulumi.Bool(false),
Region: pulumi.String("string"),
SecurityGroupIds: pulumi.StringArray{
pulumi.String("string"),
},
Timeouts: &opentelekomcloud.NetworkingPortV2TimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
},
ValueSpecs: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var networkingPortV2Resource = new NetworkingPortV2("networkingPortV2Resource", NetworkingPortV2Args.builder()
.networkId("string")
.name("string")
.networkingPortV2Id("string")
.deviceOwner("string")
.extraDhcpOptions(NetworkingPortV2ExtraDhcpOptionArgs.builder()
.name("string")
.value("string")
.build())
.fixedIp(NetworkingPortV2FixedIpArgs.builder()
.subnetId("string")
.ipAddress("string")
.build())
.adminStateUp(false)
.allowedAddressPairs(NetworkingPortV2AllowedAddressPairArgs.builder()
.ipAddress("string")
.macAddress("string")
.build())
.deviceId("string")
.noSecurityGroups(false)
.portSecurityEnabled(false)
.region("string")
.securityGroupIds("string")
.timeouts(NetworkingPortV2TimeoutsArgs.builder()
.create("string")
.delete("string")
.build())
.valueSpecs(Map.of("string", "string"))
.build());
networking_port_v2_resource = opentelekomcloud.NetworkingPortV2("networkingPortV2Resource",
network_id="string",
name="string",
networking_port_v2_id="string",
device_owner="string",
extra_dhcp_options=[{
"name": "string",
"value": "string",
}],
fixed_ip={
"subnet_id": "string",
"ip_address": "string",
},
admin_state_up=False,
allowed_address_pairs=[{
"ip_address": "string",
"mac_address": "string",
}],
device_id="string",
no_security_groups=False,
port_security_enabled=False,
region="string",
security_group_ids=["string"],
timeouts={
"create": "string",
"delete": "string",
},
value_specs={
"string": "string",
})
const networkingPortV2Resource = new opentelekomcloud.NetworkingPortV2("networkingPortV2Resource", {
networkId: "string",
name: "string",
networkingPortV2Id: "string",
deviceOwner: "string",
extraDhcpOptions: [{
name: "string",
value: "string",
}],
fixedIp: {
subnetId: "string",
ipAddress: "string",
},
adminStateUp: false,
allowedAddressPairs: [{
ipAddress: "string",
macAddress: "string",
}],
deviceId: "string",
noSecurityGroups: false,
portSecurityEnabled: false,
region: "string",
securityGroupIds: ["string"],
timeouts: {
create: "string",
"delete": "string",
},
valueSpecs: {
string: "string",
},
});
type: opentelekomcloud:NetworkingPortV2
properties:
adminStateUp: false
allowedAddressPairs:
- ipAddress: string
macAddress: string
deviceId: string
deviceOwner: string
extraDhcpOptions:
- name: string
value: string
fixedIp:
ipAddress: string
subnetId: string
name: string
networkId: string
networkingPortV2Id: string
noSecurityGroups: false
portSecurityEnabled: false
region: string
securityGroupIds:
- string
timeouts:
create: string
delete: string
valueSpecs:
string: string
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:
- Network
Id string - The ID of the network to attach the port to. Changing this creates a new port.
- Admin
State boolUp - 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 List<NetworkingPairs Port V2Allowed Address Pair> - An IP/MAC Address pair of additional IP
addresses that can be active on this port. The structure is described below.
The
allowed_address_pairs
block supports: - Device
Id string - The ID of the device attached to the port. Changing this creates a new port.
- Device
Owner string - The device owner of the Port. Changing this creates a new port.
- Extra
Dhcp List<NetworkingOptions Port V2Extra Dhcp Option> - Specifies the extended DHCP option. This is an extended attribute.
The
extra_dhcp_option
block supports: - Fixed
Ip NetworkingPort V2Fixed Ip - An array of desired IPs for this port. The structure is
described below. A single
fixed_ip
entry is allowed for a port. Thefixed_ip
block supports: - Name string
- A unique name for the port. Changing this
updates the
name
of an existing port. - Networking
Port stringV2Id - No
Security boolGroups - If set to
true
, then no security groups are applied to the port. If set tofalse
and nosecurity_group_ids
are specified, then the port will yield to the default behavior of the Networking service, which is to usually apply the"default"
security group. - Port
Security boolEnabled - Whether to explicitly enable or disable
port security on the port. Port Security is usually enabled by default, so
omitting argument will usually result in a value of
true
. Setting this explicitly tofalse
will disable port security. In order to disable port security, the port must not have any security groups. Valid values aretrue
andfalse
. - Region string
- Security
Group List<string>Ids - 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).
- Timeouts
Networking
Port V2Timeouts - Value
Specs Dictionary<string, string> - Map of additional options.
- Network
Id string - The ID of the network to attach the port to. Changing this creates a new port.
- Admin
State boolUp - 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 []NetworkingPairs Port V2Allowed Address Pair Args - An IP/MAC Address pair of additional IP
addresses that can be active on this port. The structure is described below.
The
allowed_address_pairs
block supports: - Device
Id string - The ID of the device attached to the port. Changing this creates a new port.
- Device
Owner string - The device owner of the Port. Changing this creates a new port.
- Extra
Dhcp []NetworkingOptions Port V2Extra Dhcp Option Args - Specifies the extended DHCP option. This is an extended attribute.
The
extra_dhcp_option
block supports: - Fixed
Ip NetworkingPort V2Fixed Ip Args - An array of desired IPs for this port. The structure is
described below. A single
fixed_ip
entry is allowed for a port. Thefixed_ip
block supports: - Name string
- A unique name for the port. Changing this
updates the
name
of an existing port. - Networking
Port stringV2Id - No
Security boolGroups - If set to
true
, then no security groups are applied to the port. If set tofalse
and nosecurity_group_ids
are specified, then the port will yield to the default behavior of the Networking service, which is to usually apply the"default"
security group. - Port
Security boolEnabled - Whether to explicitly enable or disable
port security on the port. Port Security is usually enabled by default, so
omitting argument will usually result in a value of
true
. Setting this explicitly tofalse
will disable port security. In order to disable port security, the port must not have any security groups. Valid values aretrue
andfalse
. - Region string
- Security
Group []stringIds - 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).
- Timeouts
Networking
Port V2Timeouts Args - Value
Specs map[string]string - Map of additional options.
- network
Id String - The ID of the network to attach the port to. Changing this creates a new port.
- admin
State BooleanUp - 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 List<NetworkingPairs Port V2Allowed Address Pair> - An IP/MAC Address pair of additional IP
addresses that can be active on this port. The structure is described below.
The
allowed_address_pairs
block supports: - device
Id String - The ID of the device attached to the port. Changing this creates a new port.
- device
Owner String - The device owner of the Port. Changing this creates a new port.
- extra
Dhcp List<NetworkingOptions Port V2Extra Dhcp Option> - Specifies the extended DHCP option. This is an extended attribute.
The
extra_dhcp_option
block supports: - fixed
Ip NetworkingPort V2Fixed Ip - An array of desired IPs for this port. The structure is
described below. A single
fixed_ip
entry is allowed for a port. Thefixed_ip
block supports: - name String
- A unique name for the port. Changing this
updates the
name
of an existing port. - networking
Port StringV2Id - no
Security BooleanGroups - If set to
true
, then no security groups are applied to the port. If set tofalse
and nosecurity_group_ids
are specified, then the port will yield to the default behavior of the Networking service, which is to usually apply the"default"
security group. - port
Security BooleanEnabled - Whether to explicitly enable or disable
port security on the port. Port Security is usually enabled by default, so
omitting argument will usually result in a value of
true
. Setting this explicitly tofalse
will disable port security. In order to disable port security, the port must not have any security groups. Valid values aretrue
andfalse
. - region String
- security
Group List<String>Ids - 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).
- timeouts
Networking
Port V2Timeouts - value
Specs Map<String,String> - Map of additional options.
- network
Id string - The ID of the network to attach the port to. Changing this creates a new port.
- admin
State booleanUp - 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 NetworkingPairs Port V2Allowed Address Pair[] - An IP/MAC Address pair of additional IP
addresses that can be active on this port. The structure is described below.
The
allowed_address_pairs
block supports: - device
Id string - The ID of the device attached to the port. Changing this creates a new port.
- device
Owner string - The device owner of the Port. Changing this creates a new port.
- extra
Dhcp NetworkingOptions Port V2Extra Dhcp Option[] - Specifies the extended DHCP option. This is an extended attribute.
The
extra_dhcp_option
block supports: - fixed
Ip NetworkingPort V2Fixed Ip - An array of desired IPs for this port. The structure is
described below. A single
fixed_ip
entry is allowed for a port. Thefixed_ip
block supports: - name string
- A unique name for the port. Changing this
updates the
name
of an existing port. - networking
Port stringV2Id - no
Security booleanGroups - If set to
true
, then no security groups are applied to the port. If set tofalse
and nosecurity_group_ids
are specified, then the port will yield to the default behavior of the Networking service, which is to usually apply the"default"
security group. - port
Security booleanEnabled - Whether to explicitly enable or disable
port security on the port. Port Security is usually enabled by default, so
omitting argument will usually result in a value of
true
. Setting this explicitly tofalse
will disable port security. In order to disable port security, the port must not have any security groups. Valid values aretrue
andfalse
. - region string
- security
Group string[]Ids - 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).
- timeouts
Networking
Port V2Timeouts - value
Specs {[key: string]: string} - Map of additional options.
- network_
id str - The ID of the network to attach the port to. Changing this creates a new port.
- admin_
state_ boolup - 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_ Sequence[Networkingpairs Port V2Allowed Address Pair Args] - An IP/MAC Address pair of additional IP
addresses that can be active on this port. The structure is described below.
The
allowed_address_pairs
block supports: - 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.
- extra_
dhcp_ Sequence[Networkingoptions Port V2Extra Dhcp Option Args] - Specifies the extended DHCP option. This is an extended attribute.
The
extra_dhcp_option
block supports: - fixed_
ip NetworkingPort V2Fixed Ip Args - An array of desired IPs for this port. The structure is
described below. A single
fixed_ip
entry is allowed for a port. Thefixed_ip
block supports: - name str
- A unique name for the port. Changing this
updates the
name
of an existing port. - networking_
port_ strv2_ id - no_
security_ boolgroups - If set to
true
, then no security groups are applied to the port. If set tofalse
and nosecurity_group_ids
are specified, then the port will yield to the default behavior of the Networking service, which is to usually apply the"default"
security group. - port_
security_ boolenabled - Whether to explicitly enable or disable
port security on the port. Port Security is usually enabled by default, so
omitting argument will usually result in a value of
true
. Setting this explicitly tofalse
will disable port security. In order to disable port security, the port must not have any security groups. Valid values aretrue
andfalse
. - region str
- security_
group_ Sequence[str]ids - 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).
- timeouts
Networking
Port V2Timeouts Args - value_
specs Mapping[str, str] - Map of additional options.
- network
Id String - The ID of the network to attach the port to. Changing this creates a new port.
- admin
State BooleanUp - 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 List<Property Map>Pairs - An IP/MAC Address pair of additional IP
addresses that can be active on this port. The structure is described below.
The
allowed_address_pairs
block supports: - device
Id String - The ID of the device attached to the port. Changing this creates a new port.
- device
Owner String - The device owner of the Port. Changing this creates a new port.
- extra
Dhcp List<Property Map>Options - Specifies the extended DHCP option. This is an extended attribute.
The
extra_dhcp_option
block supports: - fixed
Ip Property Map - An array of desired IPs for this port. The structure is
described below. A single
fixed_ip
entry is allowed for a port. Thefixed_ip
block supports: - name String
- A unique name for the port. Changing this
updates the
name
of an existing port. - networking
Port StringV2Id - no
Security BooleanGroups - If set to
true
, then no security groups are applied to the port. If set tofalse
and nosecurity_group_ids
are specified, then the port will yield to the default behavior of the Networking service, which is to usually apply the"default"
security group. - port
Security BooleanEnabled - Whether to explicitly enable or disable
port security on the port. Port Security is usually enabled by default, so
omitting argument will usually result in a value of
true
. Setting this explicitly tofalse
will disable port security. In order to disable port security, the port must not have any security groups. Valid values aretrue
andfalse
. - region String
- security
Group List<String>Ids - 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).
- timeouts Property Map
- value
Specs Map<String> - Map of additional options.
Outputs
All input properties are implicitly available as output properties. Additionally, the NetworkingPortV2 resource produces the following output properties:
- All
Fixed List<string>Ips - Id string
- The provider-assigned unique ID for this managed resource.
- Mac
Address string - Specifies the port MAC address.
- All
Fixed []stringIps - Id string
- The provider-assigned unique ID for this managed resource.
- Mac
Address string - Specifies the port MAC address.
- all
Fixed List<String>Ips - id String
- The provider-assigned unique ID for this managed resource.
- mac
Address String - Specifies the port MAC address.
- all
Fixed string[]Ips - id string
- The provider-assigned unique ID for this managed resource.
- mac
Address string - Specifies the port MAC address.
- all_
fixed_ Sequence[str]ips - id str
- The provider-assigned unique ID for this managed resource.
- mac_
address str - Specifies the port MAC address.
- all
Fixed List<String>Ips - id String
- The provider-assigned unique ID for this managed resource.
- mac
Address String - Specifies the port MAC address.
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,
extra_dhcp_options: Optional[Sequence[NetworkingPortV2ExtraDhcpOptionArgs]] = None,
fixed_ip: Optional[NetworkingPortV2FixedIpArgs] = None,
mac_address: Optional[str] = None,
name: Optional[str] = None,
network_id: Optional[str] = None,
networking_port_v2_id: Optional[str] = None,
no_security_groups: Optional[bool] = None,
port_security_enabled: Optional[bool] = None,
region: Optional[str] = None,
security_group_ids: Optional[Sequence[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: opentelekomcloud:NetworkingPortV2 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.
- Admin
State boolUp - 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 List<string>Ips - Allowed
Address List<NetworkingPairs Port V2Allowed Address Pair> - An IP/MAC Address pair of additional IP
addresses that can be active on this port. The structure is described below.
The
allowed_address_pairs
block supports: - Device
Id string - The ID of the device attached to the port. Changing this creates a new port.
- Device
Owner string - The device owner of the Port. Changing this creates a new port.
- Extra
Dhcp List<NetworkingOptions Port V2Extra Dhcp Option> - Specifies the extended DHCP option. This is an extended attribute.
The
extra_dhcp_option
block supports: - Fixed
Ip NetworkingPort V2Fixed Ip - An array of desired IPs for this port. The structure is
described below. A single
fixed_ip
entry is allowed for a port. Thefixed_ip
block supports: - Mac
Address string - Specifies the port MAC address.
- Name string
- A unique name for the port. Changing this
updates the
name
of an existing port. - Network
Id string - The ID of the network to attach the port to. Changing this creates a new port.
- Networking
Port stringV2Id - No
Security boolGroups - If set to
true
, then no security groups are applied to the port. If set tofalse
and nosecurity_group_ids
are specified, then the port will yield to the default behavior of the Networking service, which is to usually apply the"default"
security group. - Port
Security boolEnabled - Whether to explicitly enable or disable
port security on the port. Port Security is usually enabled by default, so
omitting argument will usually result in a value of
true
. Setting this explicitly tofalse
will disable port security. In order to disable port security, the port must not have any security groups. Valid values aretrue
andfalse
. - Region string
- Security
Group List<string>Ids - 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).
- Timeouts
Networking
Port V2Timeouts - Value
Specs Dictionary<string, string> - Map of additional options.
- Admin
State boolUp - 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 []stringIps - Allowed
Address []NetworkingPairs Port V2Allowed Address Pair Args - An IP/MAC Address pair of additional IP
addresses that can be active on this port. The structure is described below.
The
allowed_address_pairs
block supports: - Device
Id string - The ID of the device attached to the port. Changing this creates a new port.
- Device
Owner string - The device owner of the Port. Changing this creates a new port.
- Extra
Dhcp []NetworkingOptions Port V2Extra Dhcp Option Args - Specifies the extended DHCP option. This is an extended attribute.
The
extra_dhcp_option
block supports: - Fixed
Ip NetworkingPort V2Fixed Ip Args - An array of desired IPs for this port. The structure is
described below. A single
fixed_ip
entry is allowed for a port. Thefixed_ip
block supports: - Mac
Address string - Specifies the port MAC address.
- Name string
- A unique name for the port. Changing this
updates the
name
of an existing port. - Network
Id string - The ID of the network to attach the port to. Changing this creates a new port.
- Networking
Port stringV2Id - No
Security boolGroups - If set to
true
, then no security groups are applied to the port. If set tofalse
and nosecurity_group_ids
are specified, then the port will yield to the default behavior of the Networking service, which is to usually apply the"default"
security group. - Port
Security boolEnabled - Whether to explicitly enable or disable
port security on the port. Port Security is usually enabled by default, so
omitting argument will usually result in a value of
true
. Setting this explicitly tofalse
will disable port security. In order to disable port security, the port must not have any security groups. Valid values aretrue
andfalse
. - Region string
- Security
Group []stringIds - 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).
- Timeouts
Networking
Port V2Timeouts Args - Value
Specs map[string]string - Map of additional options.
- admin
State BooleanUp - 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 List<String>Ips - allowed
Address List<NetworkingPairs Port V2Allowed Address Pair> - An IP/MAC Address pair of additional IP
addresses that can be active on this port. The structure is described below.
The
allowed_address_pairs
block supports: - device
Id String - The ID of the device attached to the port. Changing this creates a new port.
- device
Owner String - The device owner of the Port. Changing this creates a new port.
- extra
Dhcp List<NetworkingOptions Port V2Extra Dhcp Option> - Specifies the extended DHCP option. This is an extended attribute.
The
extra_dhcp_option
block supports: - fixed
Ip NetworkingPort V2Fixed Ip - An array of desired IPs for this port. The structure is
described below. A single
fixed_ip
entry is allowed for a port. Thefixed_ip
block supports: - mac
Address String - Specifies the port MAC address.
- name String
- A unique name for the port. Changing this
updates the
name
of an existing port. - network
Id String - The ID of the network to attach the port to. Changing this creates a new port.
- networking
Port StringV2Id - no
Security BooleanGroups - If set to
true
, then no security groups are applied to the port. If set tofalse
and nosecurity_group_ids
are specified, then the port will yield to the default behavior of the Networking service, which is to usually apply the"default"
security group. - port
Security BooleanEnabled - Whether to explicitly enable or disable
port security on the port. Port Security is usually enabled by default, so
omitting argument will usually result in a value of
true
. Setting this explicitly tofalse
will disable port security. In order to disable port security, the port must not have any security groups. Valid values aretrue
andfalse
. - region String
- security
Group List<String>Ids - 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).
- timeouts
Networking
Port V2Timeouts - value
Specs Map<String,String> - Map of additional options.
- admin
State booleanUp - 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 string[]Ips - allowed
Address NetworkingPairs Port V2Allowed Address Pair[] - An IP/MAC Address pair of additional IP
addresses that can be active on this port. The structure is described below.
The
allowed_address_pairs
block supports: - device
Id string - The ID of the device attached to the port. Changing this creates a new port.
- device
Owner string - The device owner of the Port. Changing this creates a new port.
- extra
Dhcp NetworkingOptions Port V2Extra Dhcp Option[] - Specifies the extended DHCP option. This is an extended attribute.
The
extra_dhcp_option
block supports: - fixed
Ip NetworkingPort V2Fixed Ip - An array of desired IPs for this port. The structure is
described below. A single
fixed_ip
entry is allowed for a port. Thefixed_ip
block supports: - mac
Address string - Specifies the port MAC address.
- name string
- A unique name for the port. Changing this
updates the
name
of an existing port. - network
Id string - The ID of the network to attach the port to. Changing this creates a new port.
- networking
Port stringV2Id - no
Security booleanGroups - If set to
true
, then no security groups are applied to the port. If set tofalse
and nosecurity_group_ids
are specified, then the port will yield to the default behavior of the Networking service, which is to usually apply the"default"
security group. - port
Security booleanEnabled - Whether to explicitly enable or disable
port security on the port. Port Security is usually enabled by default, so
omitting argument will usually result in a value of
true
. Setting this explicitly tofalse
will disable port security. In order to disable port security, the port must not have any security groups. Valid values aretrue
andfalse
. - region string
- security
Group string[]Ids - 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).
- timeouts
Networking
Port V2Timeouts - value
Specs {[key: string]: string} - Map of additional options.
- admin_
state_ boolup - 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_ Sequence[str]ips - allowed_
address_ Sequence[Networkingpairs Port V2Allowed Address Pair Args] - An IP/MAC Address pair of additional IP
addresses that can be active on this port. The structure is described below.
The
allowed_address_pairs
block supports: - 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.
- extra_
dhcp_ Sequence[Networkingoptions Port V2Extra Dhcp Option Args] - Specifies the extended DHCP option. This is an extended attribute.
The
extra_dhcp_option
block supports: - fixed_
ip NetworkingPort V2Fixed Ip Args - An array of desired IPs for this port. The structure is
described below. A single
fixed_ip
entry is allowed for a port. Thefixed_ip
block supports: - mac_
address str - Specifies the port MAC address.
- name str
- A unique name for the port. Changing this
updates the
name
of an existing port. - network_
id str - The ID of the network to attach the port to. Changing this creates a new port.
- networking_
port_ strv2_ id - no_
security_ boolgroups - If set to
true
, then no security groups are applied to the port. If set tofalse
and nosecurity_group_ids
are specified, then the port will yield to the default behavior of the Networking service, which is to usually apply the"default"
security group. - port_
security_ boolenabled - Whether to explicitly enable or disable
port security on the port. Port Security is usually enabled by default, so
omitting argument will usually result in a value of
true
. Setting this explicitly tofalse
will disable port security. In order to disable port security, the port must not have any security groups. Valid values aretrue
andfalse
. - region str
- security_
group_ Sequence[str]ids - 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).
- timeouts
Networking
Port V2Timeouts Args - value_
specs Mapping[str, str] - Map of additional options.
- admin
State BooleanUp - 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 List<String>Ips - allowed
Address List<Property Map>Pairs - An IP/MAC Address pair of additional IP
addresses that can be active on this port. The structure is described below.
The
allowed_address_pairs
block supports: - device
Id String - The ID of the device attached to the port. Changing this creates a new port.
- device
Owner String - The device owner of the Port. Changing this creates a new port.
- extra
Dhcp List<Property Map>Options - Specifies the extended DHCP option. This is an extended attribute.
The
extra_dhcp_option
block supports: - fixed
Ip Property Map - An array of desired IPs for this port. The structure is
described below. A single
fixed_ip
entry is allowed for a port. Thefixed_ip
block supports: - mac
Address String - Specifies the port MAC address.
- name String
- A unique name for the port. Changing this
updates the
name
of an existing port. - network
Id String - The ID of the network to attach the port to. Changing this creates a new port.
- networking
Port StringV2Id - no
Security BooleanGroups - If set to
true
, then no security groups are applied to the port. If set tofalse
and nosecurity_group_ids
are specified, then the port will yield to the default behavior of the Networking service, which is to usually apply the"default"
security group. - port
Security BooleanEnabled - Whether to explicitly enable or disable
port security on the port. Port Security is usually enabled by default, so
omitting argument will usually result in a value of
true
. Setting this explicitly tofalse
will disable port security. In order to disable port security, the port must not have any security groups. Valid values aretrue
andfalse
. - region String
- security
Group List<String>Ids - 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).
- timeouts Property Map
- value
Specs Map<String> - Map of additional options.
Supporting Types
NetworkingPortV2AllowedAddressPair, NetworkingPortV2AllowedAddressPairArgs
- Ip
Address string - The additional IP address.
- Mac
Address string - The additional MAC address.
- Ip
Address string - The additional IP address.
- Mac
Address string - The additional MAC address.
- ip
Address String - The additional IP address.
- mac
Address String - The additional MAC address.
- ip
Address string - The additional IP address.
- mac
Address string - The additional MAC address.
- ip_
address str - The additional IP address.
- mac_
address str - The additional MAC address.
- ip
Address String - The additional IP address.
- mac
Address String - The additional MAC address.
NetworkingPortV2ExtraDhcpOption, NetworkingPortV2ExtraDhcpOptionArgs
NetworkingPortV2FixedIp, NetworkingPortV2FixedIpArgs
- subnet_
id str - Subnet in which to allocate IP address for this port.
- ip_
address str - IP address desired in the subnet for this port. If
you don't specify
ip_address
, an available IP address from the specified subnet will be allocated to this port.
NetworkingPortV2Timeouts, NetworkingPortV2TimeoutsArgs
Import
Ports can be imported using the id
, e.g.
$ pulumi import opentelekomcloud:index/networkingPortV2:NetworkingPortV2 port_1 eae26a3e-1c33-4cc1-9c31-0cd729c438a1
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
- License
- Notes
- This Pulumi package is based on the
opentelekomcloud
Terraform Provider.