ibm.PiWorkspace
Explore with Pulumi AI
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:
- Pi
Datacenter string - Target location or environment to create the resource instance.
- Pi
Name string - A descriptive name used to identify the workspace.
- Pi
Resource stringGroup Id - 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 string - Plan associated with the offering; Valid values are
public
orprivate
. The default value ispublic
. - List<string>
- List of user tags attached to the resource.
- Pi
Workspace stringId - (String) Workspace ID.
- Timeouts
Pi
Workspace Timeouts
- Pi
Datacenter string - Target location or environment to create the resource instance.
- Pi
Name string - A descriptive name used to identify the workspace.
- Pi
Resource stringGroup Id - 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 string - Plan associated with the offering; Valid values are
public
orprivate
. The default value ispublic
. - []string
- List of user tags attached to the resource.
- Pi
Workspace stringId - (String) Workspace ID.
- Timeouts
Pi
Workspace Timeouts Args
- pi
Datacenter String - Target location or environment to create the resource instance.
- pi
Name String - A descriptive name used to identify the workspace.
- pi
Resource StringGroup Id - 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 String - Plan associated with the offering; Valid values are
public
orprivate
. The default value ispublic
. - List<String>
- List of user tags attached to the resource.
- pi
Workspace StringId - (String) Workspace ID.
- timeouts
Pi
Workspace Timeouts
- pi
Datacenter string - Target location or environment to create the resource instance.
- pi
Name string - A descriptive name used to identify the workspace.
- pi
Resource stringGroup Id - 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 string - Plan associated with the offering; Valid values are
public
orprivate
. The default value ispublic
. - string[]
- List of user tags attached to the resource.
- pi
Workspace stringId - (String) Workspace ID.
- timeouts
Pi
Workspace Timeouts
- 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_ strgroup_ id - 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
orprivate
. The default value ispublic
. - Sequence[str]
- List of user tags attached to the resource.
- pi_
workspace_ strid - (String) Workspace ID.
- timeouts
Pi
Workspace Timeouts Args
- pi
Datacenter String - Target location or environment to create the resource instance.
- pi
Name String - A descriptive name used to identify the workspace.
- pi
Resource StringGroup Id - 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 String - Plan associated with the offering; Valid values are
public
orprivate
. The default value ispublic
. - List<String>
- List of user tags attached to the resource.
- pi
Workspace StringId - (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.
- Pi
Workspace Dictionary<string, string>Details - Workspace information.
- Crn string
- (String) Workspace crn.
- Id string
- The provider-assigned unique ID for this managed resource.
- Pi
Workspace map[string]stringDetails - Workspace information.
- crn String
- (String) Workspace crn.
- id String
- The provider-assigned unique ID for this managed resource.
- pi
Workspace Map<String,String>Details - Workspace information.
- crn string
- (String) Workspace crn.
- id string
- The provider-assigned unique ID for this managed resource.
- pi
Workspace {[key: string]: string}Details - Workspace information.
- crn str
- (String) Workspace crn.
- id str
- The provider-assigned unique ID for this managed resource.
- pi_
workspace_ Mapping[str, str]details - Workspace information.
- crn String
- (String) Workspace crn.
- id String
- The provider-assigned unique ID for this managed resource.
- pi
Workspace Map<String>Details - Workspace information.
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.
- Crn string
- (String) Workspace crn.
- Pi
Datacenter string - Target location or environment to create the resource instance.
- Pi
Name string - A descriptive name used to identify the workspace.
- Pi
Plan string - Plan associated with the offering; Valid values are
public
orprivate
. The default value ispublic
. - Pi
Resource stringGroup Id - The ID of the resource group where you want to create the workspace. You can retrieve the value from data source
ibm.ResourceGroup
. - List<string>
- List of user tags attached to the resource.
- Pi
Workspace Dictionary<string, string>Details - Workspace information.
- Pi
Workspace stringId - (String) Workspace ID.
- Timeouts
Pi
Workspace Timeouts
- Crn string
- (String) Workspace crn.
- Pi
Datacenter string - Target location or environment to create the resource instance.
- Pi
Name string - A descriptive name used to identify the workspace.
- Pi
Plan string - Plan associated with the offering; Valid values are
public
orprivate
. The default value ispublic
. - Pi
Resource stringGroup Id - The ID of the resource group where you want to create the workspace. You can retrieve the value from data source
ibm.ResourceGroup
. - []string
- List of user tags attached to the resource.
- Pi
Workspace map[string]stringDetails - Workspace information.
- Pi
Workspace stringId - (String) Workspace ID.
- Timeouts
Pi
Workspace Timeouts Args
- crn String
- (String) Workspace crn.
- pi
Datacenter String - Target location or environment to create the resource instance.
- pi
Name String - A descriptive name used to identify the workspace.
- pi
Plan String - Plan associated with the offering; Valid values are
public
orprivate
. The default value ispublic
. - pi
Resource StringGroup Id - The ID of the resource group where you want to create the workspace. You can retrieve the value from data source
ibm.ResourceGroup
. - List<String>
- List of user tags attached to the resource.
- pi
Workspace Map<String,String>Details - Workspace information.
- pi
Workspace StringId - (String) Workspace ID.
- timeouts
Pi
Workspace Timeouts
- crn string
- (String) Workspace crn.
- pi
Datacenter string - Target location or environment to create the resource instance.
- pi
Name string - A descriptive name used to identify the workspace.
- pi
Plan string - Plan associated with the offering; Valid values are
public
orprivate
. The default value ispublic
. - pi
Resource stringGroup Id - The ID of the resource group where you want to create the workspace. You can retrieve the value from data source
ibm.ResourceGroup
. - string[]
- List of user tags attached to the resource.
- pi
Workspace {[key: string]: string}Details - Workspace information.
- pi
Workspace stringId - (String) Workspace ID.
- timeouts
Pi
Workspace Timeouts
- 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
orprivate
. The default value ispublic
. - pi_
resource_ strgroup_ id - The ID of the resource group where you want to create the workspace. You can retrieve the value from data source
ibm.ResourceGroup
. - Sequence[str]
- List of user tags attached to the resource.
- pi_
workspace_ Mapping[str, str]details - Workspace information.
- pi_
workspace_ strid - (String) Workspace ID.
- timeouts
Pi
Workspace Timeouts Args
- crn String
- (String) Workspace crn.
- pi
Datacenter String - Target location or environment to create the resource instance.
- pi
Name String - A descriptive name used to identify the workspace.
- pi
Plan String - Plan associated with the offering; Valid values are
public
orprivate
. The default value ispublic
. - pi
Resource StringGroup Id - The ID of the resource group where you want to create the workspace. You can retrieve the value from data source
ibm.ResourceGroup
. - List<String>
- List of user tags attached to the resource.
- pi
Workspace Map<String>Details - Workspace information.
- pi
Workspace StringId - (String) Workspace ID.
- timeouts Property Map
Supporting Types
PiWorkspaceTimeouts, PiWorkspaceTimeoutsArgs
Package Details
- Repository
- ibm ibm-cloud/terraform-provider-ibm
- License
- Notes
- This Pulumi package is based on the
ibm
Terraform Provider.