1. Packages
  2. Ibm Provider
  3. API Docs
  4. PiNetworkPortAttach
ibm 1.77.1 published on Monday, Apr 14, 2025 by ibm-cloud

ibm.PiNetworkPortAttach

Explore with Pulumi AI

This resource is deprecated and will be removed in the next major version. Use ibm.PiNetworkInterface resource instead.

Attaches a network port to a Power Systems Virtual Server instance. For more information, see getting started with IBM Power Systems Virtual Servers.

Example Usage

In the following example, you can create an network_port_attach resource:

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

const test_network_port_attach = new ibm.PiNetworkPortAttach("test-network-port-attach", {
    piCloudInstanceId: "<value of the cloud_instance_id>",
    piInstanceId: "<pvm instance id>",
    piNetworkName: "<network name>",
    piNetworkPortDescription: "<description>",
});
Copy
import pulumi
import pulumi_ibm as ibm

test_network_port_attach = ibm.PiNetworkPortAttach("test-network-port-attach",
    pi_cloud_instance_id="<value of the cloud_instance_id>",
    pi_instance_id="<pvm instance id>",
    pi_network_name="<network name>",
    pi_network_port_description="<description>")
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ibm.NewPiNetworkPortAttach(ctx, "test-network-port-attach", &ibm.PiNetworkPortAttachArgs{
			PiCloudInstanceId:        pulumi.String("<value of the cloud_instance_id>"),
			PiInstanceId:             pulumi.String("<pvm instance id>"),
			PiNetworkName:            pulumi.String("<network name>"),
			PiNetworkPortDescription: pulumi.String("<description>"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ibm = Pulumi.Ibm;

return await Deployment.RunAsync(() => 
{
    var test_network_port_attach = new Ibm.PiNetworkPortAttach("test-network-port-attach", new()
    {
        PiCloudInstanceId = "<value of the cloud_instance_id>",
        PiInstanceId = "<pvm instance id>",
        PiNetworkName = "<network name>",
        PiNetworkPortDescription = "<description>",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.PiNetworkPortAttach;
import com.pulumi.ibm.PiNetworkPortAttachArgs;
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 test_network_port_attach = new PiNetworkPortAttach("test-network-port-attach", PiNetworkPortAttachArgs.builder()
            .piCloudInstanceId("<value of the cloud_instance_id>")
            .piInstanceId("<pvm instance id>")
            .piNetworkName("<network name>")
            .piNetworkPortDescription("<description>")
            .build());

    }
}
Copy
resources:
  test-network-port-attach:
    type: ibm:PiNetworkPortAttach
    properties:
      piCloudInstanceId: <value of the cloud_instance_id>
      piInstanceId: <pvm instance id>
      piNetworkName: <network name>
      piNetworkPortDescription: <description>
Copy

Notes

  • Please find supported Regions for endpoints.
  • If a Power cloud instance is provisioned at lon04, The provider level attributes should be as follows:
    • region - lon
    • zone - lon04

Example usage:

import * as pulumi from "@pulumi/pulumi";
Copy
import pulumi
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;

return await Deployment.RunAsync(() => 
{
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
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) {
    }
}
Copy
{}
Copy

Create PiNetworkPortAttach Resource

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

Constructor syntax

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

@overload
def PiNetworkPortAttach(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        pi_cloud_instance_id: Optional[str] = None,
                        pi_instance_id: Optional[str] = None,
                        pi_network_name: Optional[str] = None,
                        pi_network_port_attach_id: Optional[str] = None,
                        pi_network_port_description: Optional[str] = None,
                        pi_network_port_ipaddress: Optional[str] = None,
                        pi_user_tags: Optional[Sequence[str]] = None,
                        timeouts: Optional[PiNetworkPortAttachTimeoutsArgs] = None)
func NewPiNetworkPortAttach(ctx *Context, name string, args PiNetworkPortAttachArgs, opts ...ResourceOption) (*PiNetworkPortAttach, error)
public PiNetworkPortAttach(string name, PiNetworkPortAttachArgs args, CustomResourceOptions? opts = null)
public PiNetworkPortAttach(String name, PiNetworkPortAttachArgs args)
public PiNetworkPortAttach(String name, PiNetworkPortAttachArgs args, CustomResourceOptions options)
type: ibm:PiNetworkPortAttach
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. PiNetworkPortAttachArgs
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. PiNetworkPortAttachArgs
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. PiNetworkPortAttachArgs
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. PiNetworkPortAttachArgs
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. PiNetworkPortAttachArgs
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 piNetworkPortAttachResource = new Ibm.PiNetworkPortAttach("piNetworkPortAttachResource", new()
{
    PiCloudInstanceId = "string",
    PiInstanceId = "string",
    PiNetworkName = "string",
    PiNetworkPortAttachId = "string",
    PiNetworkPortDescription = "string",
    PiNetworkPortIpaddress = "string",
    PiUserTags = new[]
    {
        "string",
    },
    Timeouts = new Ibm.Inputs.PiNetworkPortAttachTimeoutsArgs
    {
        Create = "string",
        Delete = "string",
    },
});
Copy
example, err := ibm.NewPiNetworkPortAttach(ctx, "piNetworkPortAttachResource", &ibm.PiNetworkPortAttachArgs{
PiCloudInstanceId: pulumi.String("string"),
PiInstanceId: pulumi.String("string"),
PiNetworkName: pulumi.String("string"),
PiNetworkPortAttachId: pulumi.String("string"),
PiNetworkPortDescription: pulumi.String("string"),
PiNetworkPortIpaddress: pulumi.String("string"),
PiUserTags: pulumi.StringArray{
pulumi.String("string"),
},
Timeouts: &.PiNetworkPortAttachTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
},
})
Copy
var piNetworkPortAttachResource = new PiNetworkPortAttach("piNetworkPortAttachResource", PiNetworkPortAttachArgs.builder()
    .piCloudInstanceId("string")
    .piInstanceId("string")
    .piNetworkName("string")
    .piNetworkPortAttachId("string")
    .piNetworkPortDescription("string")
    .piNetworkPortIpaddress("string")
    .piUserTags("string")
    .timeouts(PiNetworkPortAttachTimeoutsArgs.builder()
        .create("string")
        .delete("string")
        .build())
    .build());
Copy
pi_network_port_attach_resource = ibm.PiNetworkPortAttach("piNetworkPortAttachResource",
    pi_cloud_instance_id="string",
    pi_instance_id="string",
    pi_network_name="string",
    pi_network_port_attach_id="string",
    pi_network_port_description="string",
    pi_network_port_ipaddress="string",
    pi_user_tags=["string"],
    timeouts={
        "create": "string",
        "delete": "string",
    })
Copy
const piNetworkPortAttachResource = new ibm.PiNetworkPortAttach("piNetworkPortAttachResource", {
    piCloudInstanceId: "string",
    piInstanceId: "string",
    piNetworkName: "string",
    piNetworkPortAttachId: "string",
    piNetworkPortDescription: "string",
    piNetworkPortIpaddress: "string",
    piUserTags: ["string"],
    timeouts: {
        create: "string",
        "delete": "string",
    },
});
Copy
type: ibm:PiNetworkPortAttach
properties:
    piCloudInstanceId: string
    piInstanceId: string
    piNetworkName: string
    piNetworkPortAttachId: string
    piNetworkPortDescription: string
    piNetworkPortIpaddress: string
    piUserTags:
        - string
    timeouts:
        create: string
        delete: string
Copy

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

PiCloudInstanceId This property is required. string
The GUID of the service instance associated with an account.
PiInstanceId This property is required. string
Instance id to attach the network port to.
PiNetworkName This property is required. string
The network ID or name.
PiNetworkPortAttachId string
(String) The unique identifier of the instance. The ID is composed of <pi_cloud_instance_id>/<pi_network_name>/<network_port_id>.
PiNetworkPortDescription string
The description for the Network Port.
PiNetworkPortIpaddress string
The requested ip address of this port.
PiUserTags List<string>
The user tags attached to this resource.
Timeouts PiNetworkPortAttachTimeouts
PiCloudInstanceId This property is required. string
The GUID of the service instance associated with an account.
PiInstanceId This property is required. string
Instance id to attach the network port to.
PiNetworkName This property is required. string
The network ID or name.
PiNetworkPortAttachId string
(String) The unique identifier of the instance. The ID is composed of <pi_cloud_instance_id>/<pi_network_name>/<network_port_id>.
PiNetworkPortDescription string
The description for the Network Port.
PiNetworkPortIpaddress string
The requested ip address of this port.
PiUserTags []string
The user tags attached to this resource.
Timeouts PiNetworkPortAttachTimeoutsArgs
piCloudInstanceId This property is required. String
The GUID of the service instance associated with an account.
piInstanceId This property is required. String
Instance id to attach the network port to.
piNetworkName This property is required. String
The network ID or name.
piNetworkPortAttachId String
(String) The unique identifier of the instance. The ID is composed of <pi_cloud_instance_id>/<pi_network_name>/<network_port_id>.
piNetworkPortDescription String
The description for the Network Port.
piNetworkPortIpaddress String
The requested ip address of this port.
piUserTags List<String>
The user tags attached to this resource.
timeouts PiNetworkPortAttachTimeouts
piCloudInstanceId This property is required. string
The GUID of the service instance associated with an account.
piInstanceId This property is required. string
Instance id to attach the network port to.
piNetworkName This property is required. string
The network ID or name.
piNetworkPortAttachId string
(String) The unique identifier of the instance. The ID is composed of <pi_cloud_instance_id>/<pi_network_name>/<network_port_id>.
piNetworkPortDescription string
The description for the Network Port.
piNetworkPortIpaddress string
The requested ip address of this port.
piUserTags string[]
The user tags attached to this resource.
timeouts PiNetworkPortAttachTimeouts
pi_cloud_instance_id This property is required. str
The GUID of the service instance associated with an account.
pi_instance_id This property is required. str
Instance id to attach the network port to.
pi_network_name This property is required. str
The network ID or name.
pi_network_port_attach_id str
(String) The unique identifier of the instance. The ID is composed of <pi_cloud_instance_id>/<pi_network_name>/<network_port_id>.
pi_network_port_description str
The description for the Network Port.
pi_network_port_ipaddress str
The requested ip address of this port.
pi_user_tags Sequence[str]
The user tags attached to this resource.
timeouts PiNetworkPortAttachTimeoutsArgs
piCloudInstanceId This property is required. String
The GUID of the service instance associated with an account.
piInstanceId This property is required. String
Instance id to attach the network port to.
piNetworkName This property is required. String
The network ID or name.
piNetworkPortAttachId String
(String) The unique identifier of the instance. The ID is composed of <pi_cloud_instance_id>/<pi_network_name>/<network_port_id>.
piNetworkPortDescription String
The description for the Network Port.
piNetworkPortIpaddress String
The requested ip address of this port.
piUserTags List<String>
The user tags attached to this resource.
timeouts Property Map

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
MacAddress string
(String) The MAC address of the instance.
Macaddress string
(String) The MAC address of the instance. Deprecated please use mac_address instead.

Deprecated: Deprecated

NetworkPortId string
(String) The ID of the port.
PublicIp string
(String) The public IP associated with the port.
Status string
(String) The status of the port.
Id string
The provider-assigned unique ID for this managed resource.
MacAddress string
(String) The MAC address of the instance.
Macaddress string
(String) The MAC address of the instance. Deprecated please use mac_address instead.

Deprecated: Deprecated

NetworkPortId string
(String) The ID of the port.
PublicIp string
(String) The public IP associated with the port.
Status string
(String) The status of the port.
id String
The provider-assigned unique ID for this managed resource.
macAddress String
(String) The MAC address of the instance.
macaddress String
(String) The MAC address of the instance. Deprecated please use mac_address instead.

Deprecated: Deprecated

networkPortId String
(String) The ID of the port.
publicIp String
(String) The public IP associated with the port.
status String
(String) The status of the port.
id string
The provider-assigned unique ID for this managed resource.
macAddress string
(String) The MAC address of the instance.
macaddress string
(String) The MAC address of the instance. Deprecated please use mac_address instead.

Deprecated: Deprecated

networkPortId string
(String) The ID of the port.
publicIp string
(String) The public IP associated with the port.
status string
(String) The status of the port.
id str
The provider-assigned unique ID for this managed resource.
mac_address str
(String) The MAC address of the instance.
macaddress str
(String) The MAC address of the instance. Deprecated please use mac_address instead.

Deprecated: Deprecated

network_port_id str
(String) The ID of the port.
public_ip str
(String) The public IP associated with the port.
status str
(String) The status of the port.
id String
The provider-assigned unique ID for this managed resource.
macAddress String
(String) The MAC address of the instance.
macaddress String
(String) The MAC address of the instance. Deprecated please use mac_address instead.

Deprecated: Deprecated

networkPortId String
(String) The ID of the port.
publicIp String
(String) The public IP associated with the port.
status String
(String) The status of the port.

Look up Existing PiNetworkPortAttach Resource

Get an existing PiNetworkPortAttach 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?: PiNetworkPortAttachState, opts?: CustomResourceOptions): PiNetworkPortAttach
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        mac_address: Optional[str] = None,
        macaddress: Optional[str] = None,
        network_port_id: Optional[str] = None,
        pi_cloud_instance_id: Optional[str] = None,
        pi_instance_id: Optional[str] = None,
        pi_network_name: Optional[str] = None,
        pi_network_port_attach_id: Optional[str] = None,
        pi_network_port_description: Optional[str] = None,
        pi_network_port_ipaddress: Optional[str] = None,
        pi_user_tags: Optional[Sequence[str]] = None,
        public_ip: Optional[str] = None,
        status: Optional[str] = None,
        timeouts: Optional[PiNetworkPortAttachTimeoutsArgs] = None) -> PiNetworkPortAttach
func GetPiNetworkPortAttach(ctx *Context, name string, id IDInput, state *PiNetworkPortAttachState, opts ...ResourceOption) (*PiNetworkPortAttach, error)
public static PiNetworkPortAttach Get(string name, Input<string> id, PiNetworkPortAttachState? state, CustomResourceOptions? opts = null)
public static PiNetworkPortAttach get(String name, Output<String> id, PiNetworkPortAttachState state, CustomResourceOptions options)
resources:  _:    type: ibm:PiNetworkPortAttach    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:
MacAddress string
(String) The MAC address of the instance.
Macaddress string
(String) The MAC address of the instance. Deprecated please use mac_address instead.

Deprecated: Deprecated

NetworkPortId string
(String) The ID of the port.
PiCloudInstanceId string
The GUID of the service instance associated with an account.
PiInstanceId string
Instance id to attach the network port to.
PiNetworkName string
The network ID or name.
PiNetworkPortAttachId string
(String) The unique identifier of the instance. The ID is composed of <pi_cloud_instance_id>/<pi_network_name>/<network_port_id>.
PiNetworkPortDescription string
The description for the Network Port.
PiNetworkPortIpaddress string
The requested ip address of this port.
PiUserTags List<string>
The user tags attached to this resource.
PublicIp string
(String) The public IP associated with the port.
Status string
(String) The status of the port.
Timeouts PiNetworkPortAttachTimeouts
MacAddress string
(String) The MAC address of the instance.
Macaddress string
(String) The MAC address of the instance. Deprecated please use mac_address instead.

Deprecated: Deprecated

NetworkPortId string
(String) The ID of the port.
PiCloudInstanceId string
The GUID of the service instance associated with an account.
PiInstanceId string
Instance id to attach the network port to.
PiNetworkName string
The network ID or name.
PiNetworkPortAttachId string
(String) The unique identifier of the instance. The ID is composed of <pi_cloud_instance_id>/<pi_network_name>/<network_port_id>.
PiNetworkPortDescription string
The description for the Network Port.
PiNetworkPortIpaddress string
The requested ip address of this port.
PiUserTags []string
The user tags attached to this resource.
PublicIp string
(String) The public IP associated with the port.
Status string
(String) The status of the port.
Timeouts PiNetworkPortAttachTimeoutsArgs
macAddress String
(String) The MAC address of the instance.
macaddress String
(String) The MAC address of the instance. Deprecated please use mac_address instead.

Deprecated: Deprecated

networkPortId String
(String) The ID of the port.
piCloudInstanceId String
The GUID of the service instance associated with an account.
piInstanceId String
Instance id to attach the network port to.
piNetworkName String
The network ID or name.
piNetworkPortAttachId String
(String) The unique identifier of the instance. The ID is composed of <pi_cloud_instance_id>/<pi_network_name>/<network_port_id>.
piNetworkPortDescription String
The description for the Network Port.
piNetworkPortIpaddress String
The requested ip address of this port.
piUserTags List<String>
The user tags attached to this resource.
publicIp String
(String) The public IP associated with the port.
status String
(String) The status of the port.
timeouts PiNetworkPortAttachTimeouts
macAddress string
(String) The MAC address of the instance.
macaddress string
(String) The MAC address of the instance. Deprecated please use mac_address instead.

Deprecated: Deprecated

networkPortId string
(String) The ID of the port.
piCloudInstanceId string
The GUID of the service instance associated with an account.
piInstanceId string
Instance id to attach the network port to.
piNetworkName string
The network ID or name.
piNetworkPortAttachId string
(String) The unique identifier of the instance. The ID is composed of <pi_cloud_instance_id>/<pi_network_name>/<network_port_id>.
piNetworkPortDescription string
The description for the Network Port.
piNetworkPortIpaddress string
The requested ip address of this port.
piUserTags string[]
The user tags attached to this resource.
publicIp string
(String) The public IP associated with the port.
status string
(String) The status of the port.
timeouts PiNetworkPortAttachTimeouts
mac_address str
(String) The MAC address of the instance.
macaddress str
(String) The MAC address of the instance. Deprecated please use mac_address instead.

Deprecated: Deprecated

network_port_id str
(String) The ID of the port.
pi_cloud_instance_id str
The GUID of the service instance associated with an account.
pi_instance_id str
Instance id to attach the network port to.
pi_network_name str
The network ID or name.
pi_network_port_attach_id str
(String) The unique identifier of the instance. The ID is composed of <pi_cloud_instance_id>/<pi_network_name>/<network_port_id>.
pi_network_port_description str
The description for the Network Port.
pi_network_port_ipaddress str
The requested ip address of this port.
pi_user_tags Sequence[str]
The user tags attached to this resource.
public_ip str
(String) The public IP associated with the port.
status str
(String) The status of the port.
timeouts PiNetworkPortAttachTimeoutsArgs
macAddress String
(String) The MAC address of the instance.
macaddress String
(String) The MAC address of the instance. Deprecated please use mac_address instead.

Deprecated: Deprecated

networkPortId String
(String) The ID of the port.
piCloudInstanceId String
The GUID of the service instance associated with an account.
piInstanceId String
Instance id to attach the network port to.
piNetworkName String
The network ID or name.
piNetworkPortAttachId String
(String) The unique identifier of the instance. The ID is composed of <pi_cloud_instance_id>/<pi_network_name>/<network_port_id>.
piNetworkPortDescription String
The description for the Network Port.
piNetworkPortIpaddress String
The requested ip address of this port.
piUserTags List<String>
The user tags attached to this resource.
publicIp String
(String) The public IP associated with the port.
status String
(String) The status of the port.
timeouts Property Map

Supporting Types

PiNetworkPortAttachTimeouts
, PiNetworkPortAttachTimeoutsArgs

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

Example

bash

$ pulumi import ibm:index/piNetworkPortAttach:PiNetworkPortAttach example d7bec597-4726-451f-8a63-e62e6f19c32c/pi_network_name/cea6651a-bc0a-4438-9f8a-a0770bbf3ebb
Copy

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

Package Details

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