1. Packages
  2. Ibm Provider
  3. API Docs
  4. PiCloudConnectionNetworkAttach
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

ibm.PiCloudConnectionNetworkAttach

Explore with Pulumi AI

ibm logo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

    Attach, and detach a network to a cloud connection for a Power Systems Virtual Server. For more information, about IBM power virtual server cloud, see getting started with IBM Power Systems Virtual Servers.

    Example Usage

    The following example enables you attach a network to a cloud connection:

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const example = new ibm.PiCloudConnectionNetworkAttach("example", {
        piCloudConnectionId: "<value of the cloud connection id>",
        piCloudInstanceId: "<value of the service instance id>",
        piNetworkId: "<value of the network id>",
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    example = ibm.PiCloudConnectionNetworkAttach("example",
        pi_cloud_connection_id="<value of the cloud connection id>",
        pi_cloud_instance_id="<value of the service instance id>",
        pi_network_id="<value of the network id>")
    
    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.NewPiCloudConnectionNetworkAttach(ctx, "example", &ibm.PiCloudConnectionNetworkAttachArgs{
    			PiCloudConnectionId: pulumi.String("<value of the cloud connection id>"),
    			PiCloudInstanceId:   pulumi.String("<value of the service instance id>"),
    			PiNetworkId:         pulumi.String("<value of the network id>"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Ibm.PiCloudConnectionNetworkAttach("example", new()
        {
            PiCloudConnectionId = "<value of the cloud connection id>",
            PiCloudInstanceId = "<value of the service instance id>",
            PiNetworkId = "<value of the network id>",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.PiCloudConnectionNetworkAttach;
    import com.pulumi.ibm.PiCloudConnectionNetworkAttachArgs;
    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 example = new PiCloudConnectionNetworkAttach("example", PiCloudConnectionNetworkAttachArgs.builder()
                .piCloudConnectionId("<value of the cloud connection id>")
                .piCloudInstanceId("<value of the service instance id>")
                .piNetworkId("<value of the network id>")
                .build());
    
        }
    }
    
    resources:
      example:
        type: ibm:PiCloudConnectionNetworkAttach
        properties:
          piCloudConnectionId: <value of the cloud connection id>
          piCloudInstanceId: <value of the service instance id>
          piNetworkId: <value of the network id>
    

    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";
    
    import pulumi
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    
    return await Deployment.RunAsync(() => 
    {
    });
    
    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) {
        }
    }
    
    {}
    

    Create PiCloudConnectionNetworkAttach Resource

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

    Constructor syntax

    new PiCloudConnectionNetworkAttach(name: string, args: PiCloudConnectionNetworkAttachArgs, opts?: CustomResourceOptions);
    @overload
    def PiCloudConnectionNetworkAttach(resource_name: str,
                                       args: PiCloudConnectionNetworkAttachArgs,
                                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def PiCloudConnectionNetworkAttach(resource_name: str,
                                       opts: Optional[ResourceOptions] = None,
                                       pi_cloud_connection_id: Optional[str] = None,
                                       pi_cloud_instance_id: Optional[str] = None,
                                       pi_network_id: Optional[str] = None,
                                       pi_cloud_connection_network_attach_id: Optional[str] = None,
                                       timeouts: Optional[PiCloudConnectionNetworkAttachTimeoutsArgs] = None)
    func NewPiCloudConnectionNetworkAttach(ctx *Context, name string, args PiCloudConnectionNetworkAttachArgs, opts ...ResourceOption) (*PiCloudConnectionNetworkAttach, error)
    public PiCloudConnectionNetworkAttach(string name, PiCloudConnectionNetworkAttachArgs args, CustomResourceOptions? opts = null)
    public PiCloudConnectionNetworkAttach(String name, PiCloudConnectionNetworkAttachArgs args)
    public PiCloudConnectionNetworkAttach(String name, PiCloudConnectionNetworkAttachArgs args, CustomResourceOptions options)
    
    type: ibm:PiCloudConnectionNetworkAttach
    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 PiCloudConnectionNetworkAttachArgs
    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 PiCloudConnectionNetworkAttachArgs
    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 PiCloudConnectionNetworkAttachArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PiCloudConnectionNetworkAttachArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PiCloudConnectionNetworkAttachArgs
    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 piCloudConnectionNetworkAttachResource = new Ibm.PiCloudConnectionNetworkAttach("piCloudConnectionNetworkAttachResource", new()
    {
        PiCloudConnectionId = "string",
        PiCloudInstanceId = "string",
        PiNetworkId = "string",
        PiCloudConnectionNetworkAttachId = "string",
        Timeouts = new Ibm.Inputs.PiCloudConnectionNetworkAttachTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
        },
    });
    
    example, err := ibm.NewPiCloudConnectionNetworkAttach(ctx, "piCloudConnectionNetworkAttachResource", &ibm.PiCloudConnectionNetworkAttachArgs{
    	PiCloudConnectionId:              pulumi.String("string"),
    	PiCloudInstanceId:                pulumi.String("string"),
    	PiNetworkId:                      pulumi.String("string"),
    	PiCloudConnectionNetworkAttachId: pulumi.String("string"),
    	Timeouts: &ibm.PiCloudConnectionNetworkAttachTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    	},
    })
    
    var piCloudConnectionNetworkAttachResource = new PiCloudConnectionNetworkAttach("piCloudConnectionNetworkAttachResource", PiCloudConnectionNetworkAttachArgs.builder()
        .piCloudConnectionId("string")
        .piCloudInstanceId("string")
        .piNetworkId("string")
        .piCloudConnectionNetworkAttachId("string")
        .timeouts(PiCloudConnectionNetworkAttachTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .build())
        .build());
    
    pi_cloud_connection_network_attach_resource = ibm.PiCloudConnectionNetworkAttach("piCloudConnectionNetworkAttachResource",
        pi_cloud_connection_id="string",
        pi_cloud_instance_id="string",
        pi_network_id="string",
        pi_cloud_connection_network_attach_id="string",
        timeouts={
            "create": "string",
            "delete": "string",
        })
    
    const piCloudConnectionNetworkAttachResource = new ibm.PiCloudConnectionNetworkAttach("piCloudConnectionNetworkAttachResource", {
        piCloudConnectionId: "string",
        piCloudInstanceId: "string",
        piNetworkId: "string",
        piCloudConnectionNetworkAttachId: "string",
        timeouts: {
            create: "string",
            "delete": "string",
        },
    });
    
    type: ibm:PiCloudConnectionNetworkAttach
    properties:
        piCloudConnectionId: string
        piCloudConnectionNetworkAttachId: string
        piCloudInstanceId: string
        piNetworkId: string
        timeouts:
            create: string
            delete: string
    

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

    PiCloudConnectionId string
    The Cloud Connection ID.
    PiCloudInstanceId string
    The GUID of the service instance associated with an account.
    PiNetworkId string
    The Network ID to attach to this cloud connection.
    PiCloudConnectionNetworkAttachId string
    (String) The unique identifier of cloud connection network attachment. The ID is composed of <pi_cloud_instance_id>/<pi_cloud_connection_id>/<pi_network_id>.
    Timeouts PiCloudConnectionNetworkAttachTimeouts
    PiCloudConnectionId string
    The Cloud Connection ID.
    PiCloudInstanceId string
    The GUID of the service instance associated with an account.
    PiNetworkId string
    The Network ID to attach to this cloud connection.
    PiCloudConnectionNetworkAttachId string
    (String) The unique identifier of cloud connection network attachment. The ID is composed of <pi_cloud_instance_id>/<pi_cloud_connection_id>/<pi_network_id>.
    Timeouts PiCloudConnectionNetworkAttachTimeoutsArgs
    piCloudConnectionId String
    The Cloud Connection ID.
    piCloudInstanceId String
    The GUID of the service instance associated with an account.
    piNetworkId String
    The Network ID to attach to this cloud connection.
    piCloudConnectionNetworkAttachId String
    (String) The unique identifier of cloud connection network attachment. The ID is composed of <pi_cloud_instance_id>/<pi_cloud_connection_id>/<pi_network_id>.
    timeouts PiCloudConnectionNetworkAttachTimeouts
    piCloudConnectionId string
    The Cloud Connection ID.
    piCloudInstanceId string
    The GUID of the service instance associated with an account.
    piNetworkId string
    The Network ID to attach to this cloud connection.
    piCloudConnectionNetworkAttachId string
    (String) The unique identifier of cloud connection network attachment. The ID is composed of <pi_cloud_instance_id>/<pi_cloud_connection_id>/<pi_network_id>.
    timeouts PiCloudConnectionNetworkAttachTimeouts
    pi_cloud_connection_id str
    The Cloud Connection ID.
    pi_cloud_instance_id str
    The GUID of the service instance associated with an account.
    pi_network_id str
    The Network ID to attach to this cloud connection.
    pi_cloud_connection_network_attach_id str
    (String) The unique identifier of cloud connection network attachment. The ID is composed of <pi_cloud_instance_id>/<pi_cloud_connection_id>/<pi_network_id>.
    timeouts PiCloudConnectionNetworkAttachTimeoutsArgs
    piCloudConnectionId String
    The Cloud Connection ID.
    piCloudInstanceId String
    The GUID of the service instance associated with an account.
    piNetworkId String
    The Network ID to attach to this cloud connection.
    piCloudConnectionNetworkAttachId String
    (String) The unique identifier of cloud connection network attachment. The ID is composed of <pi_cloud_instance_id>/<pi_cloud_connection_id>/<pi_network_id>.
    timeouts Property Map

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing PiCloudConnectionNetworkAttach Resource

    Get an existing PiCloudConnectionNetworkAttach 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?: PiCloudConnectionNetworkAttachState, opts?: CustomResourceOptions): PiCloudConnectionNetworkAttach
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            pi_cloud_connection_id: Optional[str] = None,
            pi_cloud_connection_network_attach_id: Optional[str] = None,
            pi_cloud_instance_id: Optional[str] = None,
            pi_network_id: Optional[str] = None,
            timeouts: Optional[PiCloudConnectionNetworkAttachTimeoutsArgs] = None) -> PiCloudConnectionNetworkAttach
    func GetPiCloudConnectionNetworkAttach(ctx *Context, name string, id IDInput, state *PiCloudConnectionNetworkAttachState, opts ...ResourceOption) (*PiCloudConnectionNetworkAttach, error)
    public static PiCloudConnectionNetworkAttach Get(string name, Input<string> id, PiCloudConnectionNetworkAttachState? state, CustomResourceOptions? opts = null)
    public static PiCloudConnectionNetworkAttach get(String name, Output<String> id, PiCloudConnectionNetworkAttachState state, CustomResourceOptions options)
    resources:  _:    type: ibm:PiCloudConnectionNetworkAttach    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.
    The following state arguments are supported:
    PiCloudConnectionId string
    The Cloud Connection ID.
    PiCloudConnectionNetworkAttachId string
    (String) The unique identifier of cloud connection network attachment. The ID is composed of <pi_cloud_instance_id>/<pi_cloud_connection_id>/<pi_network_id>.
    PiCloudInstanceId string
    The GUID of the service instance associated with an account.
    PiNetworkId string
    The Network ID to attach to this cloud connection.
    Timeouts PiCloudConnectionNetworkAttachTimeouts
    PiCloudConnectionId string
    The Cloud Connection ID.
    PiCloudConnectionNetworkAttachId string
    (String) The unique identifier of cloud connection network attachment. The ID is composed of <pi_cloud_instance_id>/<pi_cloud_connection_id>/<pi_network_id>.
    PiCloudInstanceId string
    The GUID of the service instance associated with an account.
    PiNetworkId string
    The Network ID to attach to this cloud connection.
    Timeouts PiCloudConnectionNetworkAttachTimeoutsArgs
    piCloudConnectionId String
    The Cloud Connection ID.
    piCloudConnectionNetworkAttachId String
    (String) The unique identifier of cloud connection network attachment. The ID is composed of <pi_cloud_instance_id>/<pi_cloud_connection_id>/<pi_network_id>.
    piCloudInstanceId String
    The GUID of the service instance associated with an account.
    piNetworkId String
    The Network ID to attach to this cloud connection.
    timeouts PiCloudConnectionNetworkAttachTimeouts
    piCloudConnectionId string
    The Cloud Connection ID.
    piCloudConnectionNetworkAttachId string
    (String) The unique identifier of cloud connection network attachment. The ID is composed of <pi_cloud_instance_id>/<pi_cloud_connection_id>/<pi_network_id>.
    piCloudInstanceId string
    The GUID of the service instance associated with an account.
    piNetworkId string
    The Network ID to attach to this cloud connection.
    timeouts PiCloudConnectionNetworkAttachTimeouts
    pi_cloud_connection_id str
    The Cloud Connection ID.
    pi_cloud_connection_network_attach_id str
    (String) The unique identifier of cloud connection network attachment. The ID is composed of <pi_cloud_instance_id>/<pi_cloud_connection_id>/<pi_network_id>.
    pi_cloud_instance_id str
    The GUID of the service instance associated with an account.
    pi_network_id str
    The Network ID to attach to this cloud connection.
    timeouts PiCloudConnectionNetworkAttachTimeoutsArgs
    piCloudConnectionId String
    The Cloud Connection ID.
    piCloudConnectionNetworkAttachId String
    (String) The unique identifier of cloud connection network attachment. The ID is composed of <pi_cloud_instance_id>/<pi_cloud_connection_id>/<pi_network_id>.
    piCloudInstanceId String
    The GUID of the service instance associated with an account.
    piNetworkId String
    The Network ID to attach to this cloud connection.
    timeouts Property Map

    Supporting Types

    PiCloudConnectionNetworkAttachTimeouts, PiCloudConnectionNetworkAttachTimeoutsArgs

    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

    $ pulumi import ibm:index/piCloudConnectionNetworkAttach:PiCloudConnectionNetworkAttach example d7bec597-4726-451f-8a63-e62e6f19c32c/cea6651a-bc0a-4438-9f8a-a0770bbf3ebb/4726d7be-c597-4438-9f8a-cea6651abc0a
    

    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.
    ibm logo
    ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud