spectrocloud.Workspace
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as spectrocloud from "@pulumi/spectrocloud";
const cluster1 = spectrocloud.getCluster({
name: "vsphere-picard-2",
});
const bsl = spectrocloud.getBackupStorageLocation({
name: "backups-nikolay",
});
const workspace = new spectrocloud.Workspace("workspace", {
clusters: [{
uid: cluster1.then(cluster1 => cluster1.id),
}],
clusterRbacBindings: [
{
type: "ClusterRoleBinding",
role: {
kind: "ClusterRole",
name: "testrole3",
},
subjects: [
{
type: "User",
name: "testRoleUser4",
},
{
type: "Group",
name: "testRoleGroup4",
},
{
type: "ServiceAccount",
name: "testrolesubject3",
namespace: "testrolenamespace",
},
],
},
{
type: "RoleBinding",
namespace: "test5ns",
role: {
kind: "Role",
name: "testrolefromns3",
},
subjects: [
{
type: "User",
name: "testUserRoleFromNS3",
},
{
type: "Group",
name: "testGroupFromNS3",
},
{
type: "ServiceAccount",
name: "testrolesubject3",
namespace: "testrolenamespace",
},
],
},
],
namespaces: [{
name: "test5ns",
resourceAllocation: {
cpu_cores: "2",
memory_MiB: "2048",
},
imagesBlacklists: [
"1",
"2",
"3",
],
}],
backupPolicy: {
schedule: "0 0 * * SUN",
backupLocationId: bsl.then(bsl => bsl.id),
prefix: "prod-backup",
expiryInHour: 7200,
includeDisks: false,
includeClusterResources: true,
includeAllClusters: true,
clusterUids: [cluster1.then(cluster1 => cluster1.id)],
},
});
import pulumi
import pulumi_spectrocloud as spectrocloud
cluster1 = spectrocloud.get_cluster(name="vsphere-picard-2")
bsl = spectrocloud.get_backup_storage_location(name="backups-nikolay")
workspace = spectrocloud.Workspace("workspace",
clusters=[{
"uid": cluster1.id,
}],
cluster_rbac_bindings=[
{
"type": "ClusterRoleBinding",
"role": {
"kind": "ClusterRole",
"name": "testrole3",
},
"subjects": [
{
"type": "User",
"name": "testRoleUser4",
},
{
"type": "Group",
"name": "testRoleGroup4",
},
{
"type": "ServiceAccount",
"name": "testrolesubject3",
"namespace": "testrolenamespace",
},
],
},
{
"type": "RoleBinding",
"namespace": "test5ns",
"role": {
"kind": "Role",
"name": "testrolefromns3",
},
"subjects": [
{
"type": "User",
"name": "testUserRoleFromNS3",
},
{
"type": "Group",
"name": "testGroupFromNS3",
},
{
"type": "ServiceAccount",
"name": "testrolesubject3",
"namespace": "testrolenamespace",
},
],
},
],
namespaces=[{
"name": "test5ns",
"resource_allocation": {
"cpu_cores": "2",
"memory_MiB": "2048",
},
"images_blacklists": [
"1",
"2",
"3",
],
}],
backup_policy={
"schedule": "0 0 * * SUN",
"backup_location_id": bsl.id,
"prefix": "prod-backup",
"expiry_in_hour": 7200,
"include_disks": False,
"include_cluster_resources": True,
"include_all_clusters": True,
"cluster_uids": [cluster1.id],
})
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/spectrocloud/spectrocloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cluster1, err := spectrocloud.GetCluster(ctx, &spectrocloud.GetClusterArgs{
Name: "vsphere-picard-2",
}, nil)
if err != nil {
return err
}
bsl, err := spectrocloud.LookupBackupStorageLocation(ctx, &spectrocloud.LookupBackupStorageLocationArgs{
Name: pulumi.StringRef("backups-nikolay"),
}, nil)
if err != nil {
return err
}
_, err = spectrocloud.NewWorkspace(ctx, "workspace", &spectrocloud.WorkspaceArgs{
Clusters: spectrocloud.WorkspaceClusterArray{
&spectrocloud.WorkspaceClusterArgs{
Uid: pulumi.String(cluster1.Id),
},
},
ClusterRbacBindings: spectrocloud.WorkspaceClusterRbacBindingArray{
&spectrocloud.WorkspaceClusterRbacBindingArgs{
Type: pulumi.String("ClusterRoleBinding"),
Role: pulumi.StringMap{
"kind": pulumi.String("ClusterRole"),
"name": pulumi.String("testrole3"),
},
Subjects: spectrocloud.WorkspaceClusterRbacBindingSubjectArray{
&spectrocloud.WorkspaceClusterRbacBindingSubjectArgs{
Type: pulumi.String("User"),
Name: pulumi.String("testRoleUser4"),
},
&spectrocloud.WorkspaceClusterRbacBindingSubjectArgs{
Type: pulumi.String("Group"),
Name: pulumi.String("testRoleGroup4"),
},
&spectrocloud.WorkspaceClusterRbacBindingSubjectArgs{
Type: pulumi.String("ServiceAccount"),
Name: pulumi.String("testrolesubject3"),
Namespace: pulumi.String("testrolenamespace"),
},
},
},
&spectrocloud.WorkspaceClusterRbacBindingArgs{
Type: pulumi.String("RoleBinding"),
Namespace: pulumi.String("test5ns"),
Role: pulumi.StringMap{
"kind": pulumi.String("Role"),
"name": pulumi.String("testrolefromns3"),
},
Subjects: spectrocloud.WorkspaceClusterRbacBindingSubjectArray{
&spectrocloud.WorkspaceClusterRbacBindingSubjectArgs{
Type: pulumi.String("User"),
Name: pulumi.String("testUserRoleFromNS3"),
},
&spectrocloud.WorkspaceClusterRbacBindingSubjectArgs{
Type: pulumi.String("Group"),
Name: pulumi.String("testGroupFromNS3"),
},
&spectrocloud.WorkspaceClusterRbacBindingSubjectArgs{
Type: pulumi.String("ServiceAccount"),
Name: pulumi.String("testrolesubject3"),
Namespace: pulumi.String("testrolenamespace"),
},
},
},
},
Namespaces: spectrocloud.WorkspaceNamespaceArray{
&spectrocloud.WorkspaceNamespaceArgs{
Name: pulumi.String("test5ns"),
ResourceAllocation: pulumi.StringMap{
"cpu_cores": pulumi.String("2"),
"memory_MiB": pulumi.String("2048"),
},
ImagesBlacklists: pulumi.StringArray{
pulumi.String("1"),
pulumi.String("2"),
pulumi.String("3"),
},
},
},
BackupPolicy: &spectrocloud.WorkspaceBackupPolicyArgs{
Schedule: pulumi.String("0 0 * * SUN"),
BackupLocationId: pulumi.String(bsl.Id),
Prefix: pulumi.String("prod-backup"),
ExpiryInHour: pulumi.Float64(7200),
IncludeDisks: pulumi.Bool(false),
IncludeClusterResources: pulumi.Bool(true),
IncludeAllClusters: pulumi.Bool(true),
ClusterUids: pulumi.StringArray{
pulumi.String(cluster1.Id),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Spectrocloud = Pulumi.Spectrocloud;
return await Deployment.RunAsync(() =>
{
var cluster1 = Spectrocloud.GetCluster.Invoke(new()
{
Name = "vsphere-picard-2",
});
var bsl = Spectrocloud.GetBackupStorageLocation.Invoke(new()
{
Name = "backups-nikolay",
});
var workspace = new Spectrocloud.Workspace("workspace", new()
{
Clusters = new[]
{
new Spectrocloud.Inputs.WorkspaceClusterArgs
{
Uid = cluster1.Apply(getClusterResult => getClusterResult.Id),
},
},
ClusterRbacBindings = new[]
{
new Spectrocloud.Inputs.WorkspaceClusterRbacBindingArgs
{
Type = "ClusterRoleBinding",
Role =
{
{ "kind", "ClusterRole" },
{ "name", "testrole3" },
},
Subjects = new[]
{
new Spectrocloud.Inputs.WorkspaceClusterRbacBindingSubjectArgs
{
Type = "User",
Name = "testRoleUser4",
},
new Spectrocloud.Inputs.WorkspaceClusterRbacBindingSubjectArgs
{
Type = "Group",
Name = "testRoleGroup4",
},
new Spectrocloud.Inputs.WorkspaceClusterRbacBindingSubjectArgs
{
Type = "ServiceAccount",
Name = "testrolesubject3",
Namespace = "testrolenamespace",
},
},
},
new Spectrocloud.Inputs.WorkspaceClusterRbacBindingArgs
{
Type = "RoleBinding",
Namespace = "test5ns",
Role =
{
{ "kind", "Role" },
{ "name", "testrolefromns3" },
},
Subjects = new[]
{
new Spectrocloud.Inputs.WorkspaceClusterRbacBindingSubjectArgs
{
Type = "User",
Name = "testUserRoleFromNS3",
},
new Spectrocloud.Inputs.WorkspaceClusterRbacBindingSubjectArgs
{
Type = "Group",
Name = "testGroupFromNS3",
},
new Spectrocloud.Inputs.WorkspaceClusterRbacBindingSubjectArgs
{
Type = "ServiceAccount",
Name = "testrolesubject3",
Namespace = "testrolenamespace",
},
},
},
},
Namespaces = new[]
{
new Spectrocloud.Inputs.WorkspaceNamespaceArgs
{
Name = "test5ns",
ResourceAllocation =
{
{ "cpu_cores", "2" },
{ "memory_MiB", "2048" },
},
ImagesBlacklists = new[]
{
"1",
"2",
"3",
},
},
},
BackupPolicy = new Spectrocloud.Inputs.WorkspaceBackupPolicyArgs
{
Schedule = "0 0 * * SUN",
BackupLocationId = bsl.Apply(getBackupStorageLocationResult => getBackupStorageLocationResult.Id),
Prefix = "prod-backup",
ExpiryInHour = 7200,
IncludeDisks = false,
IncludeClusterResources = true,
IncludeAllClusters = true,
ClusterUids = new[]
{
cluster1.Apply(getClusterResult => getClusterResult.Id),
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.spectrocloud.SpectrocloudFunctions;
import com.pulumi.spectrocloud.inputs.GetClusterArgs;
import com.pulumi.spectrocloud.inputs.GetBackupStorageLocationArgs;
import com.pulumi.spectrocloud.Workspace;
import com.pulumi.spectrocloud.WorkspaceArgs;
import com.pulumi.spectrocloud.inputs.WorkspaceClusterArgs;
import com.pulumi.spectrocloud.inputs.WorkspaceClusterRbacBindingArgs;
import com.pulumi.spectrocloud.inputs.WorkspaceNamespaceArgs;
import com.pulumi.spectrocloud.inputs.WorkspaceBackupPolicyArgs;
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 cluster1 = SpectrocloudFunctions.getCluster(GetClusterArgs.builder()
.name("vsphere-picard-2")
.build());
final var bsl = SpectrocloudFunctions.getBackupStorageLocation(GetBackupStorageLocationArgs.builder()
.name("backups-nikolay")
.build());
var workspace = new Workspace("workspace", WorkspaceArgs.builder()
.clusters(WorkspaceClusterArgs.builder()
.uid(cluster1.applyValue(getClusterResult -> getClusterResult.id()))
.build())
.clusterRbacBindings(
WorkspaceClusterRbacBindingArgs.builder()
.type("ClusterRoleBinding")
.role(Map.ofEntries(
Map.entry("kind", "ClusterRole"),
Map.entry("name", "testrole3")
))
.subjects(
WorkspaceClusterRbacBindingSubjectArgs.builder()
.type("User")
.name("testRoleUser4")
.build(),
WorkspaceClusterRbacBindingSubjectArgs.builder()
.type("Group")
.name("testRoleGroup4")
.build(),
WorkspaceClusterRbacBindingSubjectArgs.builder()
.type("ServiceAccount")
.name("testrolesubject3")
.namespace("testrolenamespace")
.build())
.build(),
WorkspaceClusterRbacBindingArgs.builder()
.type("RoleBinding")
.namespace("test5ns")
.role(Map.ofEntries(
Map.entry("kind", "Role"),
Map.entry("name", "testrolefromns3")
))
.subjects(
WorkspaceClusterRbacBindingSubjectArgs.builder()
.type("User")
.name("testUserRoleFromNS3")
.build(),
WorkspaceClusterRbacBindingSubjectArgs.builder()
.type("Group")
.name("testGroupFromNS3")
.build(),
WorkspaceClusterRbacBindingSubjectArgs.builder()
.type("ServiceAccount")
.name("testrolesubject3")
.namespace("testrolenamespace")
.build())
.build())
.namespaces(WorkspaceNamespaceArgs.builder()
.name("test5ns")
.resourceAllocation(Map.ofEntries(
Map.entry("cpu_cores", "2"),
Map.entry("memory_MiB", "2048")
))
.imagesBlacklists(
"1",
"2",
"3")
.build())
.backupPolicy(WorkspaceBackupPolicyArgs.builder()
.schedule("0 0 * * SUN")
.backupLocationId(bsl.applyValue(getBackupStorageLocationResult -> getBackupStorageLocationResult.id()))
.prefix("prod-backup")
.expiryInHour(7200)
.includeDisks(false)
.includeClusterResources(true)
.includeAllClusters(true)
.clusterUids(cluster1.applyValue(getClusterResult -> getClusterResult.id()))
.build())
.build());
}
}
resources:
workspace:
type: spectrocloud:Workspace
properties:
clusters:
- uid: ${cluster1.id}
clusterRbacBindings:
- type: ClusterRoleBinding
role:
kind: ClusterRole
name: testrole3
subjects:
- type: User
name: testRoleUser4
- type: Group
name: testRoleGroup4
- type: ServiceAccount
name: testrolesubject3
namespace: testrolenamespace
- type: RoleBinding
namespace: test5ns
role:
kind: Role
name: testrolefromns3
subjects:
- type: User
name: testUserRoleFromNS3
- type: Group
name: testGroupFromNS3
- type: ServiceAccount
name: testrolesubject3
namespace: testrolenamespace
namespaces:
- name: test5ns
resourceAllocation:
cpu_cores: '2'
memory_MiB: '2048'
imagesBlacklists:
- '1'
- '2'
- '3'
backupPolicy:
schedule: 0 0 * * SUN
backupLocationId: ${bsl.id}
prefix: prod-backup
expiryInHour: 7200
includeDisks: false
includeClusterResources: true
includeAllClusters: true
clusterUids:
- ${cluster1.id}
variables:
cluster1:
fn::invoke:
function: spectrocloud:getCluster
arguments:
name: vsphere-picard-2
bsl:
fn::invoke:
function: spectrocloud:getBackupStorageLocation
arguments:
name: backups-nikolay
Create Workspace Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Workspace(name: string, args: WorkspaceArgs, opts?: CustomResourceOptions);
@overload
def Workspace(resource_name: str,
args: WorkspaceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Workspace(resource_name: str,
opts: Optional[ResourceOptions] = None,
clusters: Optional[Sequence[WorkspaceClusterArgs]] = None,
backup_policy: Optional[WorkspaceBackupPolicyArgs] = None,
cluster_rbac_bindings: Optional[Sequence[WorkspaceClusterRbacBindingArgs]] = None,
description: Optional[str] = None,
name: Optional[str] = None,
namespaces: Optional[Sequence[WorkspaceNamespaceArgs]] = None,
tags: Optional[Sequence[str]] = None,
workspace_id: Optional[str] = None,
workspace_quota: Optional[WorkspaceWorkspaceQuotaArgs] = None)
func NewWorkspace(ctx *Context, name string, args WorkspaceArgs, opts ...ResourceOption) (*Workspace, error)
public Workspace(string name, WorkspaceArgs args, CustomResourceOptions? opts = null)
public Workspace(String name, WorkspaceArgs args)
public Workspace(String name, WorkspaceArgs args, CustomResourceOptions options)
type: spectrocloud:Workspace
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 WorkspaceArgs
- 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 WorkspaceArgs
- 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 WorkspaceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WorkspaceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args WorkspaceArgs
- 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 workspaceResource = new Spectrocloud.Workspace("workspaceResource", new()
{
Clusters = new[]
{
new Spectrocloud.Inputs.WorkspaceClusterArgs
{
Uid = "string",
},
},
BackupPolicy = new Spectrocloud.Inputs.WorkspaceBackupPolicyArgs
{
BackupLocationId = "string",
ExpiryInHour = 0,
Prefix = "string",
Schedule = "string",
ClusterUids = new[]
{
"string",
},
IncludeAllClusters = false,
IncludeClusterResources = false,
IncludeClusterResourcesMode = "string",
IncludeDisks = false,
Namespaces = new[]
{
"string",
},
},
ClusterRbacBindings = new[]
{
new Spectrocloud.Inputs.WorkspaceClusterRbacBindingArgs
{
Type = "string",
Namespace = "string",
Role =
{
{ "string", "string" },
},
Subjects = new[]
{
new Spectrocloud.Inputs.WorkspaceClusterRbacBindingSubjectArgs
{
Name = "string",
Type = "string",
Namespace = "string",
},
},
},
},
Description = "string",
Name = "string",
Namespaces = new[]
{
new Spectrocloud.Inputs.WorkspaceNamespaceArgs
{
Name = "string",
ResourceAllocation =
{
{ "string", "string" },
},
ImagesBlacklists = new[]
{
"string",
},
},
},
Tags = new[]
{
"string",
},
WorkspaceId = "string",
WorkspaceQuota = new Spectrocloud.Inputs.WorkspaceWorkspaceQuotaArgs
{
Cpu = 0,
Memory = 0,
},
});
example, err := spectrocloud.NewWorkspace(ctx, "workspaceResource", &spectrocloud.WorkspaceArgs{
Clusters: spectrocloud.WorkspaceClusterArray{
&spectrocloud.WorkspaceClusterArgs{
Uid: pulumi.String("string"),
},
},
BackupPolicy: &spectrocloud.WorkspaceBackupPolicyArgs{
BackupLocationId: pulumi.String("string"),
ExpiryInHour: pulumi.Float64(0),
Prefix: pulumi.String("string"),
Schedule: pulumi.String("string"),
ClusterUids: pulumi.StringArray{
pulumi.String("string"),
},
IncludeAllClusters: pulumi.Bool(false),
IncludeClusterResources: pulumi.Bool(false),
IncludeClusterResourcesMode: pulumi.String("string"),
IncludeDisks: pulumi.Bool(false),
Namespaces: pulumi.StringArray{
pulumi.String("string"),
},
},
ClusterRbacBindings: spectrocloud.WorkspaceClusterRbacBindingArray{
&spectrocloud.WorkspaceClusterRbacBindingArgs{
Type: pulumi.String("string"),
Namespace: pulumi.String("string"),
Role: pulumi.StringMap{
"string": pulumi.String("string"),
},
Subjects: spectrocloud.WorkspaceClusterRbacBindingSubjectArray{
&spectrocloud.WorkspaceClusterRbacBindingSubjectArgs{
Name: pulumi.String("string"),
Type: pulumi.String("string"),
Namespace: pulumi.String("string"),
},
},
},
},
Description: pulumi.String("string"),
Name: pulumi.String("string"),
Namespaces: spectrocloud.WorkspaceNamespaceArray{
&spectrocloud.WorkspaceNamespaceArgs{
Name: pulumi.String("string"),
ResourceAllocation: pulumi.StringMap{
"string": pulumi.String("string"),
},
ImagesBlacklists: pulumi.StringArray{
pulumi.String("string"),
},
},
},
Tags: pulumi.StringArray{
pulumi.String("string"),
},
WorkspaceId: pulumi.String("string"),
WorkspaceQuota: &spectrocloud.WorkspaceWorkspaceQuotaArgs{
Cpu: pulumi.Float64(0),
Memory: pulumi.Float64(0),
},
})
var workspaceResource = new Workspace("workspaceResource", WorkspaceArgs.builder()
.clusters(WorkspaceClusterArgs.builder()
.uid("string")
.build())
.backupPolicy(WorkspaceBackupPolicyArgs.builder()
.backupLocationId("string")
.expiryInHour(0)
.prefix("string")
.schedule("string")
.clusterUids("string")
.includeAllClusters(false)
.includeClusterResources(false)
.includeClusterResourcesMode("string")
.includeDisks(false)
.namespaces("string")
.build())
.clusterRbacBindings(WorkspaceClusterRbacBindingArgs.builder()
.type("string")
.namespace("string")
.role(Map.of("string", "string"))
.subjects(WorkspaceClusterRbacBindingSubjectArgs.builder()
.name("string")
.type("string")
.namespace("string")
.build())
.build())
.description("string")
.name("string")
.namespaces(WorkspaceNamespaceArgs.builder()
.name("string")
.resourceAllocation(Map.of("string", "string"))
.imagesBlacklists("string")
.build())
.tags("string")
.workspaceId("string")
.workspaceQuota(WorkspaceWorkspaceQuotaArgs.builder()
.cpu(0)
.memory(0)
.build())
.build());
workspace_resource = spectrocloud.Workspace("workspaceResource",
clusters=[{
"uid": "string",
}],
backup_policy={
"backup_location_id": "string",
"expiry_in_hour": 0,
"prefix": "string",
"schedule": "string",
"cluster_uids": ["string"],
"include_all_clusters": False,
"include_cluster_resources": False,
"include_cluster_resources_mode": "string",
"include_disks": False,
"namespaces": ["string"],
},
cluster_rbac_bindings=[{
"type": "string",
"namespace": "string",
"role": {
"string": "string",
},
"subjects": [{
"name": "string",
"type": "string",
"namespace": "string",
}],
}],
description="string",
name="string",
namespaces=[{
"name": "string",
"resource_allocation": {
"string": "string",
},
"images_blacklists": ["string"],
}],
tags=["string"],
workspace_id="string",
workspace_quota={
"cpu": 0,
"memory": 0,
})
const workspaceResource = new spectrocloud.Workspace("workspaceResource", {
clusters: [{
uid: "string",
}],
backupPolicy: {
backupLocationId: "string",
expiryInHour: 0,
prefix: "string",
schedule: "string",
clusterUids: ["string"],
includeAllClusters: false,
includeClusterResources: false,
includeClusterResourcesMode: "string",
includeDisks: false,
namespaces: ["string"],
},
clusterRbacBindings: [{
type: "string",
namespace: "string",
role: {
string: "string",
},
subjects: [{
name: "string",
type: "string",
namespace: "string",
}],
}],
description: "string",
name: "string",
namespaces: [{
name: "string",
resourceAllocation: {
string: "string",
},
imagesBlacklists: ["string"],
}],
tags: ["string"],
workspaceId: "string",
workspaceQuota: {
cpu: 0,
memory: 0,
},
});
type: spectrocloud:Workspace
properties:
backupPolicy:
backupLocationId: string
clusterUids:
- string
expiryInHour: 0
includeAllClusters: false
includeClusterResources: false
includeClusterResourcesMode: string
includeDisks: false
namespaces:
- string
prefix: string
schedule: string
clusterRbacBindings:
- namespace: string
role:
string: string
subjects:
- name: string
namespace: string
type: string
type: string
clusters:
- uid: string
description: string
name: string
namespaces:
- imagesBlacklists:
- string
name: string
resourceAllocation:
string: string
tags:
- string
workspaceId: string
workspaceQuota:
cpu: 0
memory: 0
Workspace 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 Workspace resource accepts the following input properties:
- Clusters
List<Workspace
Cluster> - Backup
Policy WorkspaceBackup Policy - The backup policy for the cluster. If not specified, no backups will be taken.
- Cluster
Rbac List<WorkspaceBindings Cluster Rbac Binding> - The RBAC binding for the cluster.
- Description string
- Name string
- Namespaces
List<Workspace
Namespace> - The namespaces for the cluster.
- List<string>
- Workspace
Id string - The ID of this resource.
- Workspace
Quota WorkspaceWorkspace Quota - Workspace quota default limits assigned to the namespace.
- Clusters
[]Workspace
Cluster Args - Backup
Policy WorkspaceBackup Policy Args - The backup policy for the cluster. If not specified, no backups will be taken.
- Cluster
Rbac []WorkspaceBindings Cluster Rbac Binding Args - The RBAC binding for the cluster.
- Description string
- Name string
- Namespaces
[]Workspace
Namespace Args - The namespaces for the cluster.
- []string
- Workspace
Id string - The ID of this resource.
- Workspace
Quota WorkspaceWorkspace Quota Args - Workspace quota default limits assigned to the namespace.
- clusters
List<Workspace
Cluster> - backup
Policy WorkspaceBackup Policy - The backup policy for the cluster. If not specified, no backups will be taken.
- cluster
Rbac List<WorkspaceBindings Cluster Rbac Binding> - The RBAC binding for the cluster.
- description String
- name String
- namespaces
List<Workspace
Namespace> - The namespaces for the cluster.
- List<String>
- workspace
Id String - The ID of this resource.
- workspace
Quota WorkspaceWorkspace Quota - Workspace quota default limits assigned to the namespace.
- clusters
Workspace
Cluster[] - backup
Policy WorkspaceBackup Policy - The backup policy for the cluster. If not specified, no backups will be taken.
- cluster
Rbac WorkspaceBindings Cluster Rbac Binding[] - The RBAC binding for the cluster.
- description string
- name string
- namespaces
Workspace
Namespace[] - The namespaces for the cluster.
- string[]
- workspace
Id string - The ID of this resource.
- workspace
Quota WorkspaceWorkspace Quota - Workspace quota default limits assigned to the namespace.
- clusters
Sequence[Workspace
Cluster Args] - backup_
policy WorkspaceBackup Policy Args - The backup policy for the cluster. If not specified, no backups will be taken.
- cluster_
rbac_ Sequence[Workspacebindings Cluster Rbac Binding Args] - The RBAC binding for the cluster.
- description str
- name str
- namespaces
Sequence[Workspace
Namespace Args] - The namespaces for the cluster.
- Sequence[str]
- workspace_
id str - The ID of this resource.
- workspace_
quota WorkspaceWorkspace Quota Args - Workspace quota default limits assigned to the namespace.
- clusters List<Property Map>
- backup
Policy Property Map - The backup policy for the cluster. If not specified, no backups will be taken.
- cluster
Rbac List<Property Map>Bindings - The RBAC binding for the cluster.
- description String
- name String
- namespaces List<Property Map>
- The namespaces for the cluster.
- List<String>
- workspace
Id String - The ID of this resource.
- workspace
Quota Property Map - Workspace quota default limits assigned to the namespace.
Outputs
All input properties are implicitly available as output properties. Additionally, the Workspace 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 Workspace Resource
Get an existing Workspace 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?: WorkspaceState, opts?: CustomResourceOptions): Workspace
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
backup_policy: Optional[WorkspaceBackupPolicyArgs] = None,
cluster_rbac_bindings: Optional[Sequence[WorkspaceClusterRbacBindingArgs]] = None,
clusters: Optional[Sequence[WorkspaceClusterArgs]] = None,
description: Optional[str] = None,
name: Optional[str] = None,
namespaces: Optional[Sequence[WorkspaceNamespaceArgs]] = None,
tags: Optional[Sequence[str]] = None,
workspace_id: Optional[str] = None,
workspace_quota: Optional[WorkspaceWorkspaceQuotaArgs] = None) -> Workspace
func GetWorkspace(ctx *Context, name string, id IDInput, state *WorkspaceState, opts ...ResourceOption) (*Workspace, error)
public static Workspace Get(string name, Input<string> id, WorkspaceState? state, CustomResourceOptions? opts = null)
public static Workspace get(String name, Output<String> id, WorkspaceState state, CustomResourceOptions options)
resources: _: type: spectrocloud:Workspace 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.
- Backup
Policy WorkspaceBackup Policy - The backup policy for the cluster. If not specified, no backups will be taken.
- Cluster
Rbac List<WorkspaceBindings Cluster Rbac Binding> - The RBAC binding for the cluster.
- Clusters
List<Workspace
Cluster> - Description string
- Name string
- Namespaces
List<Workspace
Namespace> - The namespaces for the cluster.
- List<string>
- Workspace
Id string - The ID of this resource.
- Workspace
Quota WorkspaceWorkspace Quota - Workspace quota default limits assigned to the namespace.
- Backup
Policy WorkspaceBackup Policy Args - The backup policy for the cluster. If not specified, no backups will be taken.
- Cluster
Rbac []WorkspaceBindings Cluster Rbac Binding Args - The RBAC binding for the cluster.
- Clusters
[]Workspace
Cluster Args - Description string
- Name string
- Namespaces
[]Workspace
Namespace Args - The namespaces for the cluster.
- []string
- Workspace
Id string - The ID of this resource.
- Workspace
Quota WorkspaceWorkspace Quota Args - Workspace quota default limits assigned to the namespace.
- backup
Policy WorkspaceBackup Policy - The backup policy for the cluster. If not specified, no backups will be taken.
- cluster
Rbac List<WorkspaceBindings Cluster Rbac Binding> - The RBAC binding for the cluster.
- clusters
List<Workspace
Cluster> - description String
- name String
- namespaces
List<Workspace
Namespace> - The namespaces for the cluster.
- List<String>
- workspace
Id String - The ID of this resource.
- workspace
Quota WorkspaceWorkspace Quota - Workspace quota default limits assigned to the namespace.
- backup
Policy WorkspaceBackup Policy - The backup policy for the cluster. If not specified, no backups will be taken.
- cluster
Rbac WorkspaceBindings Cluster Rbac Binding[] - The RBAC binding for the cluster.
- clusters
Workspace
Cluster[] - description string
- name string
- namespaces
Workspace
Namespace[] - The namespaces for the cluster.
- string[]
- workspace
Id string - The ID of this resource.
- workspace
Quota WorkspaceWorkspace Quota - Workspace quota default limits assigned to the namespace.
- backup_
policy WorkspaceBackup Policy Args - The backup policy for the cluster. If not specified, no backups will be taken.
- cluster_
rbac_ Sequence[Workspacebindings Cluster Rbac Binding Args] - The RBAC binding for the cluster.
- clusters
Sequence[Workspace
Cluster Args] - description str
- name str
- namespaces
Sequence[Workspace
Namespace Args] - The namespaces for the cluster.
- Sequence[str]
- workspace_
id str - The ID of this resource.
- workspace_
quota WorkspaceWorkspace Quota Args - Workspace quota default limits assigned to the namespace.
- backup
Policy Property Map - The backup policy for the cluster. If not specified, no backups will be taken.
- cluster
Rbac List<Property Map>Bindings - The RBAC binding for the cluster.
- clusters List<Property Map>
- description String
- name String
- namespaces List<Property Map>
- The namespaces for the cluster.
- List<String>
- workspace
Id String - The ID of this resource.
- workspace
Quota Property Map - Workspace quota default limits assigned to the namespace.
Supporting Types
WorkspaceBackupPolicy, WorkspaceBackupPolicyArgs
- Backup
Location stringId - The ID of the backup location to use for the backup.
- Expiry
In doubleHour - The number of hours after which the backup will be deleted. For example, if the expiry is set to 24, the backup will be deleted after 24 hours.
- Prefix string
- Prefix for the backup name. The backup name will be of the format \n\n-\n\n-\n\n.
- Schedule string
- The schedule for the backup. The schedule is specified in cron format. For example, to run the backup every day at 1:00 AM, the schedule should be set to
0 1 * * *
. - Cluster
Uids List<string> - The list of cluster UIDs to include in the backup. If
include_all_clusters
is set totrue
, then all clusters will be included. - Include
All boolClusters - Whether to include all clusters in the backup. If set to false, only the clusters specified in
cluster_uids
will be included. - Include
Cluster boolResources - Indicates whether to include cluster resources in the backup. If set to false, only the cluster configuration and disks will be backed up. (Note: Starting with Palette version 4.6, the includeclusterresources attribute will be deprecated, and a new attribute, includeclusterresources_mode, will be introduced.)
- Include
Cluster stringResources Mode - Specifies whether to include the cluster resources in the backup. Supported values are
always
,never
, andauto
. - Include
Disks bool - Whether to include the disks in the backup. If set to false, only the cluster configuration will be backed up.
- Namespaces List<string>
- The list of Kubernetes namespaces to include in the backup. If not specified, all namespaces will be included.
- Backup
Location stringId - The ID of the backup location to use for the backup.
- Expiry
In float64Hour - The number of hours after which the backup will be deleted. For example, if the expiry is set to 24, the backup will be deleted after 24 hours.
- Prefix string
- Prefix for the backup name. The backup name will be of the format \n\n-\n\n-\n\n.
- Schedule string
- The schedule for the backup. The schedule is specified in cron format. For example, to run the backup every day at 1:00 AM, the schedule should be set to
0 1 * * *
. - Cluster
Uids []string - The list of cluster UIDs to include in the backup. If
include_all_clusters
is set totrue
, then all clusters will be included. - Include
All boolClusters - Whether to include all clusters in the backup. If set to false, only the clusters specified in
cluster_uids
will be included. - Include
Cluster boolResources - Indicates whether to include cluster resources in the backup. If set to false, only the cluster configuration and disks will be backed up. (Note: Starting with Palette version 4.6, the includeclusterresources attribute will be deprecated, and a new attribute, includeclusterresources_mode, will be introduced.)
- Include
Cluster stringResources Mode - Specifies whether to include the cluster resources in the backup. Supported values are
always
,never
, andauto
. - Include
Disks bool - Whether to include the disks in the backup. If set to false, only the cluster configuration will be backed up.
- Namespaces []string
- The list of Kubernetes namespaces to include in the backup. If not specified, all namespaces will be included.
- backup
Location StringId - The ID of the backup location to use for the backup.
- expiry
In DoubleHour - The number of hours after which the backup will be deleted. For example, if the expiry is set to 24, the backup will be deleted after 24 hours.
- prefix String
- Prefix for the backup name. The backup name will be of the format \n\n-\n\n-\n\n.
- schedule String
- The schedule for the backup. The schedule is specified in cron format. For example, to run the backup every day at 1:00 AM, the schedule should be set to
0 1 * * *
. - cluster
Uids List<String> - The list of cluster UIDs to include in the backup. If
include_all_clusters
is set totrue
, then all clusters will be included. - include
All BooleanClusters - Whether to include all clusters in the backup. If set to false, only the clusters specified in
cluster_uids
will be included. - include
Cluster BooleanResources - Indicates whether to include cluster resources in the backup. If set to false, only the cluster configuration and disks will be backed up. (Note: Starting with Palette version 4.6, the includeclusterresources attribute will be deprecated, and a new attribute, includeclusterresources_mode, will be introduced.)
- include
Cluster StringResources Mode - Specifies whether to include the cluster resources in the backup. Supported values are
always
,never
, andauto
. - include
Disks Boolean - Whether to include the disks in the backup. If set to false, only the cluster configuration will be backed up.
- namespaces List<String>
- The list of Kubernetes namespaces to include in the backup. If not specified, all namespaces will be included.
- backup
Location stringId - The ID of the backup location to use for the backup.
- expiry
In numberHour - The number of hours after which the backup will be deleted. For example, if the expiry is set to 24, the backup will be deleted after 24 hours.
- prefix string
- Prefix for the backup name. The backup name will be of the format \n\n-\n\n-\n\n.
- schedule string
- The schedule for the backup. The schedule is specified in cron format. For example, to run the backup every day at 1:00 AM, the schedule should be set to
0 1 * * *
. - cluster
Uids string[] - The list of cluster UIDs to include in the backup. If
include_all_clusters
is set totrue
, then all clusters will be included. - include
All booleanClusters - Whether to include all clusters in the backup. If set to false, only the clusters specified in
cluster_uids
will be included. - include
Cluster booleanResources - Indicates whether to include cluster resources in the backup. If set to false, only the cluster configuration and disks will be backed up. (Note: Starting with Palette version 4.6, the includeclusterresources attribute will be deprecated, and a new attribute, includeclusterresources_mode, will be introduced.)
- include
Cluster stringResources Mode - Specifies whether to include the cluster resources in the backup. Supported values are
always
,never
, andauto
. - include
Disks boolean - Whether to include the disks in the backup. If set to false, only the cluster configuration will be backed up.
- namespaces string[]
- The list of Kubernetes namespaces to include in the backup. If not specified, all namespaces will be included.
- backup_
location_ strid - The ID of the backup location to use for the backup.
- expiry_
in_ floathour - The number of hours after which the backup will be deleted. For example, if the expiry is set to 24, the backup will be deleted after 24 hours.
- prefix str
- Prefix for the backup name. The backup name will be of the format \n\n-\n\n-\n\n.
- schedule str
- The schedule for the backup. The schedule is specified in cron format. For example, to run the backup every day at 1:00 AM, the schedule should be set to
0 1 * * *
. - cluster_
uids Sequence[str] - The list of cluster UIDs to include in the backup. If
include_all_clusters
is set totrue
, then all clusters will be included. - include_
all_ boolclusters - Whether to include all clusters in the backup. If set to false, only the clusters specified in
cluster_uids
will be included. - include_
cluster_ boolresources - Indicates whether to include cluster resources in the backup. If set to false, only the cluster configuration and disks will be backed up. (Note: Starting with Palette version 4.6, the includeclusterresources attribute will be deprecated, and a new attribute, includeclusterresources_mode, will be introduced.)
- include_
cluster_ strresources_ mode - Specifies whether to include the cluster resources in the backup. Supported values are
always
,never
, andauto
. - include_
disks bool - Whether to include the disks in the backup. If set to false, only the cluster configuration will be backed up.
- namespaces Sequence[str]
- The list of Kubernetes namespaces to include in the backup. If not specified, all namespaces will be included.
- backup
Location StringId - The ID of the backup location to use for the backup.
- expiry
In NumberHour - The number of hours after which the backup will be deleted. For example, if the expiry is set to 24, the backup will be deleted after 24 hours.
- prefix String
- Prefix for the backup name. The backup name will be of the format \n\n-\n\n-\n\n.
- schedule String
- The schedule for the backup. The schedule is specified in cron format. For example, to run the backup every day at 1:00 AM, the schedule should be set to
0 1 * * *
. - cluster
Uids List<String> - The list of cluster UIDs to include in the backup. If
include_all_clusters
is set totrue
, then all clusters will be included. - include
All BooleanClusters - Whether to include all clusters in the backup. If set to false, only the clusters specified in
cluster_uids
will be included. - include
Cluster BooleanResources - Indicates whether to include cluster resources in the backup. If set to false, only the cluster configuration and disks will be backed up. (Note: Starting with Palette version 4.6, the includeclusterresources attribute will be deprecated, and a new attribute, includeclusterresources_mode, will be introduced.)
- include
Cluster StringResources Mode - Specifies whether to include the cluster resources in the backup. Supported values are
always
,never
, andauto
. - include
Disks Boolean - Whether to include the disks in the backup. If set to false, only the cluster configuration will be backed up.
- namespaces List<String>
- The list of Kubernetes namespaces to include in the backup. If not specified, all namespaces will be included.
WorkspaceCluster, WorkspaceClusterArgs
- Uid string
- Uid string
- uid String
- uid string
- uid str
- uid String
WorkspaceClusterRbacBinding, WorkspaceClusterRbacBindingArgs
- Type string
- The type of the RBAC binding. Can be one of the following values:
RoleBinding
, orClusterRoleBinding
. - Namespace string
- The Kubernetes namespace of the RBAC binding. Required if 'type' is set to 'RoleBinding'.
- Role Dictionary<string, string>
- The role of the RBAC binding. Required if 'type' is set to 'RoleBinding'.
- Subjects
List<Workspace
Cluster Rbac Binding Subject>
- Type string
- The type of the RBAC binding. Can be one of the following values:
RoleBinding
, orClusterRoleBinding
. - Namespace string
- The Kubernetes namespace of the RBAC binding. Required if 'type' is set to 'RoleBinding'.
- Role map[string]string
- The role of the RBAC binding. Required if 'type' is set to 'RoleBinding'.
- Subjects
[]Workspace
Cluster Rbac Binding Subject
- type String
- The type of the RBAC binding. Can be one of the following values:
RoleBinding
, orClusterRoleBinding
. - namespace String
- The Kubernetes namespace of the RBAC binding. Required if 'type' is set to 'RoleBinding'.
- role Map<String,String>
- The role of the RBAC binding. Required if 'type' is set to 'RoleBinding'.
- subjects
List<Workspace
Cluster Rbac Binding Subject>
- type string
- The type of the RBAC binding. Can be one of the following values:
RoleBinding
, orClusterRoleBinding
. - namespace string
- The Kubernetes namespace of the RBAC binding. Required if 'type' is set to 'RoleBinding'.
- role {[key: string]: string}
- The role of the RBAC binding. Required if 'type' is set to 'RoleBinding'.
- subjects
Workspace
Cluster Rbac Binding Subject[]
- type str
- The type of the RBAC binding. Can be one of the following values:
RoleBinding
, orClusterRoleBinding
. - namespace str
- The Kubernetes namespace of the RBAC binding. Required if 'type' is set to 'RoleBinding'.
- role Mapping[str, str]
- The role of the RBAC binding. Required if 'type' is set to 'RoleBinding'.
- subjects
Sequence[Workspace
Cluster Rbac Binding Subject]
- type String
- The type of the RBAC binding. Can be one of the following values:
RoleBinding
, orClusterRoleBinding
. - namespace String
- The Kubernetes namespace of the RBAC binding. Required if 'type' is set to 'RoleBinding'.
- role Map<String>
- The role of the RBAC binding. Required if 'type' is set to 'RoleBinding'.
- subjects List<Property Map>
WorkspaceClusterRbacBindingSubject, WorkspaceClusterRbacBindingSubjectArgs
WorkspaceNamespace, WorkspaceNamespaceArgs
- Name string
- Name of the namespace. This is the name of the Kubernetes namespace in the cluster.
- Resource
Allocation Dictionary<string, string> - Resource allocation for the namespace. This is a map containing the resource type and the resource value. For example,
{cpu_cores: '2', memory_MiB: '2048'}
- Images
Blacklists List<string> - List of images to disallow for the namespace. For example,
['nginx:latest', 'redis:latest']
- Name string
- Name of the namespace. This is the name of the Kubernetes namespace in the cluster.
- Resource
Allocation map[string]string - Resource allocation for the namespace. This is a map containing the resource type and the resource value. For example,
{cpu_cores: '2', memory_MiB: '2048'}
- Images
Blacklists []string - List of images to disallow for the namespace. For example,
['nginx:latest', 'redis:latest']
- name String
- Name of the namespace. This is the name of the Kubernetes namespace in the cluster.
- resource
Allocation Map<String,String> - Resource allocation for the namespace. This is a map containing the resource type and the resource value. For example,
{cpu_cores: '2', memory_MiB: '2048'}
- images
Blacklists List<String> - List of images to disallow for the namespace. For example,
['nginx:latest', 'redis:latest']
- name string
- Name of the namespace. This is the name of the Kubernetes namespace in the cluster.
- resource
Allocation {[key: string]: string} - Resource allocation for the namespace. This is a map containing the resource type and the resource value. For example,
{cpu_cores: '2', memory_MiB: '2048'}
- images
Blacklists string[] - List of images to disallow for the namespace. For example,
['nginx:latest', 'redis:latest']
- name str
- Name of the namespace. This is the name of the Kubernetes namespace in the cluster.
- resource_
allocation Mapping[str, str] - Resource allocation for the namespace. This is a map containing the resource type and the resource value. For example,
{cpu_cores: '2', memory_MiB: '2048'}
- images_
blacklists Sequence[str] - List of images to disallow for the namespace. For example,
['nginx:latest', 'redis:latest']
- name String
- Name of the namespace. This is the name of the Kubernetes namespace in the cluster.
- resource
Allocation Map<String> - Resource allocation for the namespace. This is a map containing the resource type and the resource value. For example,
{cpu_cores: '2', memory_MiB: '2048'}
- images
Blacklists List<String> - List of images to disallow for the namespace. For example,
['nginx:latest', 'redis:latest']
WorkspaceWorkspaceQuota, WorkspaceWorkspaceQuotaArgs
Package Details
- Repository
- spectrocloud spectrocloud/terraform-provider-spectrocloud
- License
- Notes
- This Pulumi package is based on the
spectrocloud
Terraform Provider.