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

ibm.PiWorkspace

Explore with Pulumi AI

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

    Create or Delete a PowerVS Workspace

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const group = ibm.getResourceGroup({
        name: "test",
    });
    const powervsServiceInstance = new ibm.PiWorkspace("powervsServiceInstance", {
        piName: "test-name",
        piDatacenter: "us-east",
        piResourceGroupId: group.then(group => group.id),
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    group = ibm.get_resource_group(name="test")
    powervs_service_instance = ibm.PiWorkspace("powervsServiceInstance",
        pi_name="test-name",
        pi_datacenter="us-east",
        pi_resource_group_id=group.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 {
    		group, err := ibm.LookupResourceGroup(ctx, &ibm.LookupResourceGroupArgs{
    			Name: pulumi.StringRef("test"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = ibm.NewPiWorkspace(ctx, "powervsServiceInstance", &ibm.PiWorkspaceArgs{
    			PiName:            pulumi.String("test-name"),
    			PiDatacenter:      pulumi.String("us-east"),
    			PiResourceGroupId: pulumi.String(group.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 @group = Ibm.GetResourceGroup.Invoke(new()
        {
            Name = "test",
        });
    
        var powervsServiceInstance = new Ibm.PiWorkspace("powervsServiceInstance", new()
        {
            PiName = "test-name",
            PiDatacenter = "us-east",
            PiResourceGroupId = @group.Apply(@group => @group.Apply(getResourceGroupResult => getResourceGroupResult.Id)),
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.IbmFunctions;
    import com.pulumi.ibm.inputs.GetResourceGroupArgs;
    import com.pulumi.ibm.PiWorkspace;
    import com.pulumi.ibm.PiWorkspaceArgs;
    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) {
            final var group = IbmFunctions.getResourceGroup(GetResourceGroupArgs.builder()
                .name("test")
                .build());
    
            var powervsServiceInstance = new PiWorkspace("powervsServiceInstance", PiWorkspaceArgs.builder()
                .piName("test-name")
                .piDatacenter("us-east")
                .piResourceGroupId(group.applyValue(getResourceGroupResult -> getResourceGroupResult.id()))
                .build());
    
        }
    }
    
    resources:
      powervsServiceInstance:
        type: ibm:PiWorkspace
        properties:
          piName: test-name
          piDatacenter: us-east
          piResourceGroupId: ${group.id}
    variables:
      group:
        fn::invoke:
          function: ibm:getResourceGroup
          arguments:
            name: test
    

    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

    Create PiWorkspace Resource

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

    Constructor syntax

    new PiWorkspace(name: string, args: PiWorkspaceArgs, opts?: CustomResourceOptions);
    @overload
    def PiWorkspace(resource_name: str,
                    args: PiWorkspaceArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def PiWorkspace(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    pi_datacenter: Optional[str] = None,
                    pi_name: Optional[str] = None,
                    pi_resource_group_id: Optional[str] = None,
                    pi_plan: Optional[str] = None,
                    pi_user_tags: Optional[Sequence[str]] = None,
                    pi_workspace_id: Optional[str] = None,
                    timeouts: Optional[PiWorkspaceTimeoutsArgs] = None)
    func NewPiWorkspace(ctx *Context, name string, args PiWorkspaceArgs, opts ...ResourceOption) (*PiWorkspace, error)
    public PiWorkspace(string name, PiWorkspaceArgs args, CustomResourceOptions? opts = null)
    public PiWorkspace(String name, PiWorkspaceArgs args)
    public PiWorkspace(String name, PiWorkspaceArgs args, CustomResourceOptions options)
    
    type: ibm:PiWorkspace
    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 PiWorkspaceArgs
    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 PiWorkspaceArgs
    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 PiWorkspaceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PiWorkspaceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PiWorkspaceArgs
    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 piWorkspaceResource = new Ibm.PiWorkspace("piWorkspaceResource", new()
    {
        PiDatacenter = "string",
        PiName = "string",
        PiResourceGroupId = "string",
        PiPlan = "string",
        PiUserTags = new[]
        {
            "string",
        },
        PiWorkspaceId = "string",
        Timeouts = new Ibm.Inputs.PiWorkspaceTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
            Update = "string",
        },
    });
    
    example, err := ibm.NewPiWorkspace(ctx, "piWorkspaceResource", &ibm.PiWorkspaceArgs{
    	PiDatacenter:      pulumi.String("string"),
    	PiName:            pulumi.String("string"),
    	PiResourceGroupId: pulumi.String("string"),
    	PiPlan:            pulumi.String("string"),
    	PiUserTags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	PiWorkspaceId: pulumi.String("string"),
    	Timeouts: &ibm.PiWorkspaceTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    		Update: pulumi.String("string"),
    	},
    })
    
    var piWorkspaceResource = new PiWorkspace("piWorkspaceResource", PiWorkspaceArgs.builder()
        .piDatacenter("string")
        .piName("string")
        .piResourceGroupId("string")
        .piPlan("string")
        .piUserTags("string")
        .piWorkspaceId("string")
        .timeouts(PiWorkspaceTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .update("string")
            .build())
        .build());
    
    pi_workspace_resource = ibm.PiWorkspace("piWorkspaceResource",
        pi_datacenter="string",
        pi_name="string",
        pi_resource_group_id="string",
        pi_plan="string",
        pi_user_tags=["string"],
        pi_workspace_id="string",
        timeouts={
            "create": "string",
            "delete": "string",
            "update": "string",
        })
    
    const piWorkspaceResource = new ibm.PiWorkspace("piWorkspaceResource", {
        piDatacenter: "string",
        piName: "string",
        piResourceGroupId: "string",
        piPlan: "string",
        piUserTags: ["string"],
        piWorkspaceId: "string",
        timeouts: {
            create: "string",
            "delete": "string",
            update: "string",
        },
    });
    
    type: ibm:PiWorkspace
    properties:
        piDatacenter: string
        piName: string
        piPlan: string
        piResourceGroupId: string
        piUserTags:
            - string
        piWorkspaceId: string
        timeouts:
            create: string
            delete: string
            update: string
    

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

    PiDatacenter string
    Target location or environment to create the resource instance.
    PiName string
    A descriptive name used to identify the workspace.
    PiResourceGroupId string
    The ID of the resource group where you want to create the workspace. You can retrieve the value from data source ibm.ResourceGroup.
    PiPlan string
    Plan associated with the offering; Valid values are public or private. The default value is public.
    PiUserTags List<string>
    List of user tags attached to the resource.
    PiWorkspaceId string
    (String) Workspace ID.
    Timeouts PiWorkspaceTimeouts
    PiDatacenter string
    Target location or environment to create the resource instance.
    PiName string
    A descriptive name used to identify the workspace.
    PiResourceGroupId string
    The ID of the resource group where you want to create the workspace. You can retrieve the value from data source ibm.ResourceGroup.
    PiPlan string
    Plan associated with the offering; Valid values are public or private. The default value is public.
    PiUserTags []string
    List of user tags attached to the resource.
    PiWorkspaceId string
    (String) Workspace ID.
    Timeouts PiWorkspaceTimeoutsArgs
    piDatacenter String
    Target location or environment to create the resource instance.
    piName String
    A descriptive name used to identify the workspace.
    piResourceGroupId String
    The ID of the resource group where you want to create the workspace. You can retrieve the value from data source ibm.ResourceGroup.
    piPlan String
    Plan associated with the offering; Valid values are public or private. The default value is public.
    piUserTags List<String>
    List of user tags attached to the resource.
    piWorkspaceId String
    (String) Workspace ID.
    timeouts PiWorkspaceTimeouts
    piDatacenter string
    Target location or environment to create the resource instance.
    piName string
    A descriptive name used to identify the workspace.
    piResourceGroupId string
    The ID of the resource group where you want to create the workspace. You can retrieve the value from data source ibm.ResourceGroup.
    piPlan string
    Plan associated with the offering; Valid values are public or private. The default value is public.
    piUserTags string[]
    List of user tags attached to the resource.
    piWorkspaceId string
    (String) Workspace ID.
    timeouts PiWorkspaceTimeouts
    pi_datacenter str
    Target location or environment to create the resource instance.
    pi_name str
    A descriptive name used to identify the workspace.
    pi_resource_group_id str
    The ID of the resource group where you want to create the workspace. You can retrieve the value from data source ibm.ResourceGroup.
    pi_plan str
    Plan associated with the offering; Valid values are public or private. The default value is public.
    pi_user_tags Sequence[str]
    List of user tags attached to the resource.
    pi_workspace_id str
    (String) Workspace ID.
    timeouts PiWorkspaceTimeoutsArgs
    piDatacenter String
    Target location or environment to create the resource instance.
    piName String
    A descriptive name used to identify the workspace.
    piResourceGroupId String
    The ID of the resource group where you want to create the workspace. You can retrieve the value from data source ibm.ResourceGroup.
    piPlan String
    Plan associated with the offering; Valid values are public or private. The default value is public.
    piUserTags List<String>
    List of user tags attached to the resource.
    piWorkspaceId String
    (String) Workspace ID.
    timeouts Property Map

    Outputs

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

    Crn string
    (String) Workspace crn.
    Id string
    The provider-assigned unique ID for this managed resource.
    PiWorkspaceDetails Dictionary<string, string>
    Workspace information.

    Deprecated: Deprecated

    Crn string
    (String) Workspace crn.
    Id string
    The provider-assigned unique ID for this managed resource.
    PiWorkspaceDetails map[string]string
    Workspace information.

    Deprecated: Deprecated

    crn String
    (String) Workspace crn.
    id String
    The provider-assigned unique ID for this managed resource.
    piWorkspaceDetails Map<String,String>
    Workspace information.

    Deprecated: Deprecated

    crn string
    (String) Workspace crn.
    id string
    The provider-assigned unique ID for this managed resource.
    piWorkspaceDetails {[key: string]: string}
    Workspace information.

    Deprecated: Deprecated

    crn str
    (String) Workspace crn.
    id str
    The provider-assigned unique ID for this managed resource.
    pi_workspace_details Mapping[str, str]
    Workspace information.

    Deprecated: Deprecated

    crn String
    (String) Workspace crn.
    id String
    The provider-assigned unique ID for this managed resource.
    piWorkspaceDetails Map<String>
    Workspace information.

    Deprecated: Deprecated

    Look up Existing PiWorkspace Resource

    Get an existing PiWorkspace 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?: PiWorkspaceState, opts?: CustomResourceOptions): PiWorkspace
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            crn: Optional[str] = None,
            pi_datacenter: Optional[str] = None,
            pi_name: Optional[str] = None,
            pi_plan: Optional[str] = None,
            pi_resource_group_id: Optional[str] = None,
            pi_user_tags: Optional[Sequence[str]] = None,
            pi_workspace_details: Optional[Mapping[str, str]] = None,
            pi_workspace_id: Optional[str] = None,
            timeouts: Optional[PiWorkspaceTimeoutsArgs] = None) -> PiWorkspace
    func GetPiWorkspace(ctx *Context, name string, id IDInput, state *PiWorkspaceState, opts ...ResourceOption) (*PiWorkspace, error)
    public static PiWorkspace Get(string name, Input<string> id, PiWorkspaceState? state, CustomResourceOptions? opts = null)
    public static PiWorkspace get(String name, Output<String> id, PiWorkspaceState state, CustomResourceOptions options)
    resources:  _:    type: ibm:PiWorkspace    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:
    Crn string
    (String) Workspace crn.
    PiDatacenter string
    Target location or environment to create the resource instance.
    PiName string
    A descriptive name used to identify the workspace.
    PiPlan string
    Plan associated with the offering; Valid values are public or private. The default value is public.
    PiResourceGroupId string
    The ID of the resource group where you want to create the workspace. You can retrieve the value from data source ibm.ResourceGroup.
    PiUserTags List<string>
    List of user tags attached to the resource.
    PiWorkspaceDetails Dictionary<string, string>
    Workspace information.

    Deprecated: Deprecated

    PiWorkspaceId string
    (String) Workspace ID.
    Timeouts PiWorkspaceTimeouts
    Crn string
    (String) Workspace crn.
    PiDatacenter string
    Target location or environment to create the resource instance.
    PiName string
    A descriptive name used to identify the workspace.
    PiPlan string
    Plan associated with the offering; Valid values are public or private. The default value is public.
    PiResourceGroupId string
    The ID of the resource group where you want to create the workspace. You can retrieve the value from data source ibm.ResourceGroup.
    PiUserTags []string
    List of user tags attached to the resource.
    PiWorkspaceDetails map[string]string
    Workspace information.

    Deprecated: Deprecated

    PiWorkspaceId string
    (String) Workspace ID.
    Timeouts PiWorkspaceTimeoutsArgs
    crn String
    (String) Workspace crn.
    piDatacenter String
    Target location or environment to create the resource instance.
    piName String
    A descriptive name used to identify the workspace.
    piPlan String
    Plan associated with the offering; Valid values are public or private. The default value is public.
    piResourceGroupId String
    The ID of the resource group where you want to create the workspace. You can retrieve the value from data source ibm.ResourceGroup.
    piUserTags List<String>
    List of user tags attached to the resource.
    piWorkspaceDetails Map<String,String>
    Workspace information.

    Deprecated: Deprecated

    piWorkspaceId String
    (String) Workspace ID.
    timeouts PiWorkspaceTimeouts
    crn string
    (String) Workspace crn.
    piDatacenter string
    Target location or environment to create the resource instance.
    piName string
    A descriptive name used to identify the workspace.
    piPlan string
    Plan associated with the offering; Valid values are public or private. The default value is public.
    piResourceGroupId string
    The ID of the resource group where you want to create the workspace. You can retrieve the value from data source ibm.ResourceGroup.
    piUserTags string[]
    List of user tags attached to the resource.
    piWorkspaceDetails {[key: string]: string}
    Workspace information.

    Deprecated: Deprecated

    piWorkspaceId string
    (String) Workspace ID.
    timeouts PiWorkspaceTimeouts
    crn str
    (String) Workspace crn.
    pi_datacenter str
    Target location or environment to create the resource instance.
    pi_name str
    A descriptive name used to identify the workspace.
    pi_plan str
    Plan associated with the offering; Valid values are public or private. The default value is public.
    pi_resource_group_id str
    The ID of the resource group where you want to create the workspace. You can retrieve the value from data source ibm.ResourceGroup.
    pi_user_tags Sequence[str]
    List of user tags attached to the resource.
    pi_workspace_details Mapping[str, str]
    Workspace information.

    Deprecated: Deprecated

    pi_workspace_id str
    (String) Workspace ID.
    timeouts PiWorkspaceTimeoutsArgs
    crn String
    (String) Workspace crn.
    piDatacenter String
    Target location or environment to create the resource instance.
    piName String
    A descriptive name used to identify the workspace.
    piPlan String
    Plan associated with the offering; Valid values are public or private. The default value is public.
    piResourceGroupId String
    The ID of the resource group where you want to create the workspace. You can retrieve the value from data source ibm.ResourceGroup.
    piUserTags List<String>
    List of user tags attached to the resource.
    piWorkspaceDetails Map<String>
    Workspace information.

    Deprecated: Deprecated

    piWorkspaceId String
    (String) Workspace ID.
    timeouts Property Map

    Supporting Types

    PiWorkspaceTimeouts, PiWorkspaceTimeoutsArgs

    Create string
    Delete string
    Update string
    Create string
    Delete string
    Update string
    create String
    delete String
    update String
    create string
    delete string
    update string
    create str
    delete str
    update str
    create String
    delete String
    update String

    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