harness.platform.Workspace
Explore with Pulumi AI
Resource for managing Workspaces
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as harness from "@pulumi/harness";
const example = new harness.platform.Workspace("example", {
name: "example",
identifier: "example",
orgId: testHarnessPlatformOrganization.id,
projectId: testHarnessPlatformProject.id,
provisionerType: "terraform",
provisionerVersion: "1.5.6",
repository: "https://github.com/org/repo",
repositoryBranch: "main",
repositoryPath: "tf/aws/basic",
costEstimationEnabled: true,
providerConnector: test.id,
repositoryConnector: test.id,
terraformVariables: [
{
key: "key1",
value: "val1",
valueType: "string",
},
{
key: "key2",
value: "val2",
valueType: "string",
},
],
environmentVariables: [
{
key: "key1",
value: "val1",
valueType: "string",
},
{
key: "key2",
value: "val2",
valueType: "string",
},
],
terraformVariableFiles: [
{
repository: "https://github.com/org/repo",
repositoryBranch: "main",
repositoryPath: "tf/gcp/basic",
repositoryConnector: test.id,
},
{
repository: "https://github.com/org/repo",
repositoryCommit: "v1.0.0",
repositoryPath: "tf/aws/basic",
repositoryConnector: test.id,
},
{
repository: "https://github.com/org/repo",
repositorySha: "349d90bb9c90f4a3482981c259080de31609e6f6",
repositoryPath: "tf/aws/basic",
repositoryConnector: test.id,
},
],
});
import pulumi
import pulumi_harness as harness
example = harness.platform.Workspace("example",
name="example",
identifier="example",
org_id=test_harness_platform_organization["id"],
project_id=test_harness_platform_project["id"],
provisioner_type="terraform",
provisioner_version="1.5.6",
repository="https://github.com/org/repo",
repository_branch="main",
repository_path="tf/aws/basic",
cost_estimation_enabled=True,
provider_connector=test["id"],
repository_connector=test["id"],
terraform_variables=[
{
"key": "key1",
"value": "val1",
"value_type": "string",
},
{
"key": "key2",
"value": "val2",
"value_type": "string",
},
],
environment_variables=[
{
"key": "key1",
"value": "val1",
"value_type": "string",
},
{
"key": "key2",
"value": "val2",
"value_type": "string",
},
],
terraform_variable_files=[
{
"repository": "https://github.com/org/repo",
"repository_branch": "main",
"repository_path": "tf/gcp/basic",
"repository_connector": test["id"],
},
{
"repository": "https://github.com/org/repo",
"repository_commit": "v1.0.0",
"repository_path": "tf/aws/basic",
"repository_connector": test["id"],
},
{
"repository": "https://github.com/org/repo",
"repository_sha": "349d90bb9c90f4a3482981c259080de31609e6f6",
"repository_path": "tf/aws/basic",
"repository_connector": test["id"],
},
])
package main
import (
"github.com/pulumi/pulumi-harness/sdk/go/harness/platform"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := platform.NewWorkspace(ctx, "example", &platform.WorkspaceArgs{
Name: pulumi.String("example"),
Identifier: pulumi.String("example"),
OrgId: pulumi.Any(testHarnessPlatformOrganization.Id),
ProjectId: pulumi.Any(testHarnessPlatformProject.Id),
ProvisionerType: pulumi.String("terraform"),
ProvisionerVersion: pulumi.String("1.5.6"),
Repository: pulumi.String("https://github.com/org/repo"),
RepositoryBranch: pulumi.String("main"),
RepositoryPath: pulumi.String("tf/aws/basic"),
CostEstimationEnabled: pulumi.Bool(true),
ProviderConnector: pulumi.Any(test.Id),
RepositoryConnector: pulumi.Any(test.Id),
TerraformVariables: platform.WorkspaceTerraformVariableArray{
&platform.WorkspaceTerraformVariableArgs{
Key: pulumi.String("key1"),
Value: pulumi.String("val1"),
ValueType: pulumi.String("string"),
},
&platform.WorkspaceTerraformVariableArgs{
Key: pulumi.String("key2"),
Value: pulumi.String("val2"),
ValueType: pulumi.String("string"),
},
},
EnvironmentVariables: platform.WorkspaceEnvironmentVariableArray{
&platform.WorkspaceEnvironmentVariableArgs{
Key: pulumi.String("key1"),
Value: pulumi.String("val1"),
ValueType: pulumi.String("string"),
},
&platform.WorkspaceEnvironmentVariableArgs{
Key: pulumi.String("key2"),
Value: pulumi.String("val2"),
ValueType: pulumi.String("string"),
},
},
TerraformVariableFiles: platform.WorkspaceTerraformVariableFileArray{
&platform.WorkspaceTerraformVariableFileArgs{
Repository: pulumi.String("https://github.com/org/repo"),
RepositoryBranch: pulumi.String("main"),
RepositoryPath: pulumi.String("tf/gcp/basic"),
RepositoryConnector: pulumi.Any(test.Id),
},
&platform.WorkspaceTerraformVariableFileArgs{
Repository: pulumi.String("https://github.com/org/repo"),
RepositoryCommit: pulumi.String("v1.0.0"),
RepositoryPath: pulumi.String("tf/aws/basic"),
RepositoryConnector: pulumi.Any(test.Id),
},
&platform.WorkspaceTerraformVariableFileArgs{
Repository: pulumi.String("https://github.com/org/repo"),
RepositorySha: pulumi.String("349d90bb9c90f4a3482981c259080de31609e6f6"),
RepositoryPath: pulumi.String("tf/aws/basic"),
RepositoryConnector: pulumi.Any(test.Id),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Harness = Pulumi.Harness;
return await Deployment.RunAsync(() =>
{
var example = new Harness.Platform.Workspace("example", new()
{
Name = "example",
Identifier = "example",
OrgId = testHarnessPlatformOrganization.Id,
ProjectId = testHarnessPlatformProject.Id,
ProvisionerType = "terraform",
ProvisionerVersion = "1.5.6",
Repository = "https://github.com/org/repo",
RepositoryBranch = "main",
RepositoryPath = "tf/aws/basic",
CostEstimationEnabled = true,
ProviderConnector = test.Id,
RepositoryConnector = test.Id,
TerraformVariables = new[]
{
new Harness.Platform.Inputs.WorkspaceTerraformVariableArgs
{
Key = "key1",
Value = "val1",
ValueType = "string",
},
new Harness.Platform.Inputs.WorkspaceTerraformVariableArgs
{
Key = "key2",
Value = "val2",
ValueType = "string",
},
},
EnvironmentVariables = new[]
{
new Harness.Platform.Inputs.WorkspaceEnvironmentVariableArgs
{
Key = "key1",
Value = "val1",
ValueType = "string",
},
new Harness.Platform.Inputs.WorkspaceEnvironmentVariableArgs
{
Key = "key2",
Value = "val2",
ValueType = "string",
},
},
TerraformVariableFiles = new[]
{
new Harness.Platform.Inputs.WorkspaceTerraformVariableFileArgs
{
Repository = "https://github.com/org/repo",
RepositoryBranch = "main",
RepositoryPath = "tf/gcp/basic",
RepositoryConnector = test.Id,
},
new Harness.Platform.Inputs.WorkspaceTerraformVariableFileArgs
{
Repository = "https://github.com/org/repo",
RepositoryCommit = "v1.0.0",
RepositoryPath = "tf/aws/basic",
RepositoryConnector = test.Id,
},
new Harness.Platform.Inputs.WorkspaceTerraformVariableFileArgs
{
Repository = "https://github.com/org/repo",
RepositorySha = "349d90bb9c90f4a3482981c259080de31609e6f6",
RepositoryPath = "tf/aws/basic",
RepositoryConnector = test.Id,
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.harness.platform.Workspace;
import com.pulumi.harness.platform.WorkspaceArgs;
import com.pulumi.harness.platform.inputs.WorkspaceTerraformVariableArgs;
import com.pulumi.harness.platform.inputs.WorkspaceEnvironmentVariableArgs;
import com.pulumi.harness.platform.inputs.WorkspaceTerraformVariableFileArgs;
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 Workspace("example", WorkspaceArgs.builder()
.name("example")
.identifier("example")
.orgId(testHarnessPlatformOrganization.id())
.projectId(testHarnessPlatformProject.id())
.provisionerType("terraform")
.provisionerVersion("1.5.6")
.repository("https://github.com/org/repo")
.repositoryBranch("main")
.repositoryPath("tf/aws/basic")
.costEstimationEnabled(true)
.providerConnector(test.id())
.repositoryConnector(test.id())
.terraformVariables(
WorkspaceTerraformVariableArgs.builder()
.key("key1")
.value("val1")
.valueType("string")
.build(),
WorkspaceTerraformVariableArgs.builder()
.key("key2")
.value("val2")
.valueType("string")
.build())
.environmentVariables(
WorkspaceEnvironmentVariableArgs.builder()
.key("key1")
.value("val1")
.valueType("string")
.build(),
WorkspaceEnvironmentVariableArgs.builder()
.key("key2")
.value("val2")
.valueType("string")
.build())
.terraformVariableFiles(
WorkspaceTerraformVariableFileArgs.builder()
.repository("https://github.com/org/repo")
.repositoryBranch("main")
.repositoryPath("tf/gcp/basic")
.repositoryConnector(test.id())
.build(),
WorkspaceTerraformVariableFileArgs.builder()
.repository("https://github.com/org/repo")
.repositoryCommit("v1.0.0")
.repositoryPath("tf/aws/basic")
.repositoryConnector(test.id())
.build(),
WorkspaceTerraformVariableFileArgs.builder()
.repository("https://github.com/org/repo")
.repositorySha("349d90bb9c90f4a3482981c259080de31609e6f6")
.repositoryPath("tf/aws/basic")
.repositoryConnector(test.id())
.build())
.build());
}
}
resources:
example:
type: harness:platform:Workspace
properties:
name: example
identifier: example
orgId: ${testHarnessPlatformOrganization.id}
projectId: ${testHarnessPlatformProject.id}
provisionerType: terraform
provisionerVersion: 1.5.6
repository: https://github.com/org/repo
repositoryBranch: main
repositoryPath: tf/aws/basic
costEstimationEnabled: true
providerConnector: ${test.id}
repositoryConnector: ${test.id}
terraformVariables:
- key: key1
value: val1
valueType: string
- key: key2
value: val2
valueType: string
environmentVariables:
- key: key1
value: val1
valueType: string
- key: key2
value: val2
valueType: string
terraformVariableFiles:
- repository: https://github.com/org/repo
repositoryBranch: main
repositoryPath: tf/gcp/basic
repositoryConnector: ${test.id}
- repository: https://github.com/org/repo
repositoryCommit: v1.0.0
repositoryPath: tf/aws/basic
repositoryConnector: ${test.id}
- repository: https://github.com/org/repo
repositorySha: 349d90bb9c90f4a3482981c259080de31609e6f6
repositoryPath: tf/aws/basic
repositoryConnector: ${test.id}
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,
repository_path: Optional[str] = None,
project_id: Optional[str] = None,
provider_connector: Optional[str] = None,
provisioner_type: Optional[str] = None,
identifier: Optional[str] = None,
cost_estimation_enabled: Optional[bool] = None,
org_id: Optional[str] = None,
provisioner_version: Optional[str] = None,
repository_connector: Optional[str] = None,
repository: Optional[str] = None,
tags: Optional[Sequence[str]] = None,
default_pipelines: Optional[Mapping[str, str]] = None,
repository_branch: Optional[str] = None,
repository_commit: Optional[str] = None,
terraform_variables: Optional[Sequence[WorkspaceTerraformVariableArgs]] = None,
name: Optional[str] = None,
repository_sha: Optional[str] = None,
environment_variables: Optional[Sequence[WorkspaceEnvironmentVariableArgs]] = None,
terraform_variable_files: Optional[Sequence[WorkspaceTerraformVariableFileArgs]] = None,
description: Optional[str] = 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: harness:platform: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 Harness.Platform.Workspace("workspaceResource", new()
{
RepositoryPath = "string",
ProjectId = "string",
ProviderConnector = "string",
ProvisionerType = "string",
Identifier = "string",
CostEstimationEnabled = false,
OrgId = "string",
ProvisionerVersion = "string",
RepositoryConnector = "string",
Repository = "string",
Tags = new[]
{
"string",
},
DefaultPipelines =
{
{ "string", "string" },
},
RepositoryBranch = "string",
RepositoryCommit = "string",
TerraformVariables = new[]
{
new Harness.Platform.Inputs.WorkspaceTerraformVariableArgs
{
Key = "string",
Value = "string",
ValueType = "string",
},
},
Name = "string",
RepositorySha = "string",
EnvironmentVariables = new[]
{
new Harness.Platform.Inputs.WorkspaceEnvironmentVariableArgs
{
Key = "string",
Value = "string",
ValueType = "string",
},
},
TerraformVariableFiles = new[]
{
new Harness.Platform.Inputs.WorkspaceTerraformVariableFileArgs
{
Repository = "string",
RepositoryConnector = "string",
RepositoryBranch = "string",
RepositoryCommit = "string",
RepositoryPath = "string",
RepositorySha = "string",
},
},
Description = "string",
});
example, err := platform.NewWorkspace(ctx, "workspaceResource", &platform.WorkspaceArgs{
RepositoryPath: pulumi.String("string"),
ProjectId: pulumi.String("string"),
ProviderConnector: pulumi.String("string"),
ProvisionerType: pulumi.String("string"),
Identifier: pulumi.String("string"),
CostEstimationEnabled: pulumi.Bool(false),
OrgId: pulumi.String("string"),
ProvisionerVersion: pulumi.String("string"),
RepositoryConnector: pulumi.String("string"),
Repository: pulumi.String("string"),
Tags: pulumi.StringArray{
pulumi.String("string"),
},
DefaultPipelines: pulumi.StringMap{
"string": pulumi.String("string"),
},
RepositoryBranch: pulumi.String("string"),
RepositoryCommit: pulumi.String("string"),
TerraformVariables: platform.WorkspaceTerraformVariableArray{
&platform.WorkspaceTerraformVariableArgs{
Key: pulumi.String("string"),
Value: pulumi.String("string"),
ValueType: pulumi.String("string"),
},
},
Name: pulumi.String("string"),
RepositorySha: pulumi.String("string"),
EnvironmentVariables: platform.WorkspaceEnvironmentVariableArray{
&platform.WorkspaceEnvironmentVariableArgs{
Key: pulumi.String("string"),
Value: pulumi.String("string"),
ValueType: pulumi.String("string"),
},
},
TerraformVariableFiles: platform.WorkspaceTerraformVariableFileArray{
&platform.WorkspaceTerraformVariableFileArgs{
Repository: pulumi.String("string"),
RepositoryConnector: pulumi.String("string"),
RepositoryBranch: pulumi.String("string"),
RepositoryCommit: pulumi.String("string"),
RepositoryPath: pulumi.String("string"),
RepositorySha: pulumi.String("string"),
},
},
Description: pulumi.String("string"),
})
var workspaceResource = new Workspace("workspaceResource", WorkspaceArgs.builder()
.repositoryPath("string")
.projectId("string")
.providerConnector("string")
.provisionerType("string")
.identifier("string")
.costEstimationEnabled(false)
.orgId("string")
.provisionerVersion("string")
.repositoryConnector("string")
.repository("string")
.tags("string")
.defaultPipelines(Map.of("string", "string"))
.repositoryBranch("string")
.repositoryCommit("string")
.terraformVariables(WorkspaceTerraformVariableArgs.builder()
.key("string")
.value("string")
.valueType("string")
.build())
.name("string")
.repositorySha("string")
.environmentVariables(WorkspaceEnvironmentVariableArgs.builder()
.key("string")
.value("string")
.valueType("string")
.build())
.terraformVariableFiles(WorkspaceTerraformVariableFileArgs.builder()
.repository("string")
.repositoryConnector("string")
.repositoryBranch("string")
.repositoryCommit("string")
.repositoryPath("string")
.repositorySha("string")
.build())
.description("string")
.build());
workspace_resource = harness.platform.Workspace("workspaceResource",
repository_path="string",
project_id="string",
provider_connector="string",
provisioner_type="string",
identifier="string",
cost_estimation_enabled=False,
org_id="string",
provisioner_version="string",
repository_connector="string",
repository="string",
tags=["string"],
default_pipelines={
"string": "string",
},
repository_branch="string",
repository_commit="string",
terraform_variables=[{
"key": "string",
"value": "string",
"value_type": "string",
}],
name="string",
repository_sha="string",
environment_variables=[{
"key": "string",
"value": "string",
"value_type": "string",
}],
terraform_variable_files=[{
"repository": "string",
"repository_connector": "string",
"repository_branch": "string",
"repository_commit": "string",
"repository_path": "string",
"repository_sha": "string",
}],
description="string")
const workspaceResource = new harness.platform.Workspace("workspaceResource", {
repositoryPath: "string",
projectId: "string",
providerConnector: "string",
provisionerType: "string",
identifier: "string",
costEstimationEnabled: false,
orgId: "string",
provisionerVersion: "string",
repositoryConnector: "string",
repository: "string",
tags: ["string"],
defaultPipelines: {
string: "string",
},
repositoryBranch: "string",
repositoryCommit: "string",
terraformVariables: [{
key: "string",
value: "string",
valueType: "string",
}],
name: "string",
repositorySha: "string",
environmentVariables: [{
key: "string",
value: "string",
valueType: "string",
}],
terraformVariableFiles: [{
repository: "string",
repositoryConnector: "string",
repositoryBranch: "string",
repositoryCommit: "string",
repositoryPath: "string",
repositorySha: "string",
}],
description: "string",
});
type: harness:platform:Workspace
properties:
costEstimationEnabled: false
defaultPipelines:
string: string
description: string
environmentVariables:
- key: string
value: string
valueType: string
identifier: string
name: string
orgId: string
projectId: string
providerConnector: string
provisionerType: string
provisionerVersion: string
repository: string
repositoryBranch: string
repositoryCommit: string
repositoryConnector: string
repositoryPath: string
repositorySha: string
tags:
- string
terraformVariableFiles:
- repository: string
repositoryBranch: string
repositoryCommit: string
repositoryConnector: string
repositoryPath: string
repositorySha: string
terraformVariables:
- key: string
value: string
valueType: string
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:
- Cost
Estimation boolEnabled - Cost estimation enabled determines if cost estimation operations are performed.
- Identifier string
- Unique identifier of the resource.
- Org
Id string - Unique identifier of the organization.
- Project
Id string - Unique identifier of the project.
- Provider
Connector string - Provider connector is the reference to the connector for the infrastructure provider
- Provisioner
Type string - Provisioner
Version string - Repository string
- Repository is the name of the repository to fetch the code from.
- Repository
Connector string - Repository connector is the reference to the connector used to fetch the code.
- Repository
Path string - Repository path is the path in which the code resides.
- Default
Pipelines Dictionary<string, string> - Default pipelines associated with this workspace
- Description string
- Description of the resource.
- Environment
Variables List<WorkspaceEnvironment Variable> - Environment variables configured on the workspace
- Name string
- Name of the resource.
- Repository
Branch string - Repository branch is the name of the branch to fetch the code from. This cannot be set if repository commit or sha is set.
- Repository
Commit string - Repository commit is tag to fetch the code from. This cannot be set if repository branch or sha is set.
- Repository
Sha string - Repository commit is sha to fetch the code from. This cannot be set if repository branch or commit is set.
- List<string>
- Tags to associate with the resource.
- Terraform
Variable List<WorkspaceFiles Terraform Variable File> - Terraform
Variables List<WorkspaceTerraform Variable>
- Cost
Estimation boolEnabled - Cost estimation enabled determines if cost estimation operations are performed.
- Identifier string
- Unique identifier of the resource.
- Org
Id string - Unique identifier of the organization.
- Project
Id string - Unique identifier of the project.
- Provider
Connector string - Provider connector is the reference to the connector for the infrastructure provider
- Provisioner
Type string - Provisioner
Version string - Repository string
- Repository is the name of the repository to fetch the code from.
- Repository
Connector string - Repository connector is the reference to the connector used to fetch the code.
- Repository
Path string - Repository path is the path in which the code resides.
- Default
Pipelines map[string]string - Default pipelines associated with this workspace
- Description string
- Description of the resource.
- Environment
Variables []WorkspaceEnvironment Variable Args - Environment variables configured on the workspace
- Name string
- Name of the resource.
- Repository
Branch string - Repository branch is the name of the branch to fetch the code from. This cannot be set if repository commit or sha is set.
- Repository
Commit string - Repository commit is tag to fetch the code from. This cannot be set if repository branch or sha is set.
- Repository
Sha string - Repository commit is sha to fetch the code from. This cannot be set if repository branch or commit is set.
- []string
- Tags to associate with the resource.
- Terraform
Variable []WorkspaceFiles Terraform Variable File Args - Terraform
Variables []WorkspaceTerraform Variable Args
- cost
Estimation BooleanEnabled - Cost estimation enabled determines if cost estimation operations are performed.
- identifier String
- Unique identifier of the resource.
- org
Id String - Unique identifier of the organization.
- project
Id String - Unique identifier of the project.
- provider
Connector String - Provider connector is the reference to the connector for the infrastructure provider
- provisioner
Type String - provisioner
Version String - repository String
- Repository is the name of the repository to fetch the code from.
- repository
Connector String - Repository connector is the reference to the connector used to fetch the code.
- repository
Path String - Repository path is the path in which the code resides.
- default
Pipelines Map<String,String> - Default pipelines associated with this workspace
- description String
- Description of the resource.
- environment
Variables List<WorkspaceEnvironment Variable> - Environment variables configured on the workspace
- name String
- Name of the resource.
- repository
Branch String - Repository branch is the name of the branch to fetch the code from. This cannot be set if repository commit or sha is set.
- repository
Commit String - Repository commit is tag to fetch the code from. This cannot be set if repository branch or sha is set.
- repository
Sha String - Repository commit is sha to fetch the code from. This cannot be set if repository branch or commit is set.
- List<String>
- Tags to associate with the resource.
- terraform
Variable List<WorkspaceFiles Terraform Variable File> - terraform
Variables List<WorkspaceTerraform Variable>
- cost
Estimation booleanEnabled - Cost estimation enabled determines if cost estimation operations are performed.
- identifier string
- Unique identifier of the resource.
- org
Id string - Unique identifier of the organization.
- project
Id string - Unique identifier of the project.
- provider
Connector string - Provider connector is the reference to the connector for the infrastructure provider
- provisioner
Type string - provisioner
Version string - repository string
- Repository is the name of the repository to fetch the code from.
- repository
Connector string - Repository connector is the reference to the connector used to fetch the code.
- repository
Path string - Repository path is the path in which the code resides.
- default
Pipelines {[key: string]: string} - Default pipelines associated with this workspace
- description string
- Description of the resource.
- environment
Variables WorkspaceEnvironment Variable[] - Environment variables configured on the workspace
- name string
- Name of the resource.
- repository
Branch string - Repository branch is the name of the branch to fetch the code from. This cannot be set if repository commit or sha is set.
- repository
Commit string - Repository commit is tag to fetch the code from. This cannot be set if repository branch or sha is set.
- repository
Sha string - Repository commit is sha to fetch the code from. This cannot be set if repository branch or commit is set.
- string[]
- Tags to associate with the resource.
- terraform
Variable WorkspaceFiles Terraform Variable File[] - terraform
Variables WorkspaceTerraform Variable[]
- cost_
estimation_ boolenabled - Cost estimation enabled determines if cost estimation operations are performed.
- identifier str
- Unique identifier of the resource.
- org_
id str - Unique identifier of the organization.
- project_
id str - Unique identifier of the project.
- provider_
connector str - Provider connector is the reference to the connector for the infrastructure provider
- provisioner_
type str - provisioner_
version str - repository str
- Repository is the name of the repository to fetch the code from.
- repository_
connector str - Repository connector is the reference to the connector used to fetch the code.
- repository_
path str - Repository path is the path in which the code resides.
- default_
pipelines Mapping[str, str] - Default pipelines associated with this workspace
- description str
- Description of the resource.
- environment_
variables Sequence[WorkspaceEnvironment Variable Args] - Environment variables configured on the workspace
- name str
- Name of the resource.
- repository_
branch str - Repository branch is the name of the branch to fetch the code from. This cannot be set if repository commit or sha is set.
- repository_
commit str - Repository commit is tag to fetch the code from. This cannot be set if repository branch or sha is set.
- repository_
sha str - Repository commit is sha to fetch the code from. This cannot be set if repository branch or commit is set.
- Sequence[str]
- Tags to associate with the resource.
- terraform_
variable_ Sequence[Workspacefiles Terraform Variable File Args] - terraform_
variables Sequence[WorkspaceTerraform Variable Args]
- cost
Estimation BooleanEnabled - Cost estimation enabled determines if cost estimation operations are performed.
- identifier String
- Unique identifier of the resource.
- org
Id String - Unique identifier of the organization.
- project
Id String - Unique identifier of the project.
- provider
Connector String - Provider connector is the reference to the connector for the infrastructure provider
- provisioner
Type String - provisioner
Version String - repository String
- Repository is the name of the repository to fetch the code from.
- repository
Connector String - Repository connector is the reference to the connector used to fetch the code.
- repository
Path String - Repository path is the path in which the code resides.
- default
Pipelines Map<String> - Default pipelines associated with this workspace
- description String
- Description of the resource.
- environment
Variables List<Property Map> - Environment variables configured on the workspace
- name String
- Name of the resource.
- repository
Branch String - Repository branch is the name of the branch to fetch the code from. This cannot be set if repository commit or sha is set.
- repository
Commit String - Repository commit is tag to fetch the code from. This cannot be set if repository branch or sha is set.
- repository
Sha String - Repository commit is sha to fetch the code from. This cannot be set if repository branch or commit is set.
- List<String>
- Tags to associate with the resource.
- terraform
Variable List<Property Map>Files - terraform
Variables List<Property Map>
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,
cost_estimation_enabled: Optional[bool] = None,
default_pipelines: Optional[Mapping[str, str]] = None,
description: Optional[str] = None,
environment_variables: Optional[Sequence[WorkspaceEnvironmentVariableArgs]] = None,
identifier: Optional[str] = None,
name: Optional[str] = None,
org_id: Optional[str] = None,
project_id: Optional[str] = None,
provider_connector: Optional[str] = None,
provisioner_type: Optional[str] = None,
provisioner_version: Optional[str] = None,
repository: Optional[str] = None,
repository_branch: Optional[str] = None,
repository_commit: Optional[str] = None,
repository_connector: Optional[str] = None,
repository_path: Optional[str] = None,
repository_sha: Optional[str] = None,
tags: Optional[Sequence[str]] = None,
terraform_variable_files: Optional[Sequence[WorkspaceTerraformVariableFileArgs]] = None,
terraform_variables: Optional[Sequence[WorkspaceTerraformVariableArgs]] = 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)
Resource lookup is not supported in YAML
- 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.
- Cost
Estimation boolEnabled - Cost estimation enabled determines if cost estimation operations are performed.
- Default
Pipelines Dictionary<string, string> - Default pipelines associated with this workspace
- Description string
- Description of the resource.
- Environment
Variables List<WorkspaceEnvironment Variable> - Environment variables configured on the workspace
- Identifier string
- Unique identifier of the resource.
- Name string
- Name of the resource.
- Org
Id string - Unique identifier of the organization.
- Project
Id string - Unique identifier of the project.
- Provider
Connector string - Provider connector is the reference to the connector for the infrastructure provider
- Provisioner
Type string - Provisioner
Version string - Repository string
- Repository is the name of the repository to fetch the code from.
- Repository
Branch string - Repository branch is the name of the branch to fetch the code from. This cannot be set if repository commit or sha is set.
- Repository
Commit string - Repository commit is tag to fetch the code from. This cannot be set if repository branch or sha is set.
- Repository
Connector string - Repository connector is the reference to the connector used to fetch the code.
- Repository
Path string - Repository path is the path in which the code resides.
- Repository
Sha string - Repository commit is sha to fetch the code from. This cannot be set if repository branch or commit is set.
- List<string>
- Tags to associate with the resource.
- Terraform
Variable List<WorkspaceFiles Terraform Variable File> - Terraform
Variables List<WorkspaceTerraform Variable>
- Cost
Estimation boolEnabled - Cost estimation enabled determines if cost estimation operations are performed.
- Default
Pipelines map[string]string - Default pipelines associated with this workspace
- Description string
- Description of the resource.
- Environment
Variables []WorkspaceEnvironment Variable Args - Environment variables configured on the workspace
- Identifier string
- Unique identifier of the resource.
- Name string
- Name of the resource.
- Org
Id string - Unique identifier of the organization.
- Project
Id string - Unique identifier of the project.
- Provider
Connector string - Provider connector is the reference to the connector for the infrastructure provider
- Provisioner
Type string - Provisioner
Version string - Repository string
- Repository is the name of the repository to fetch the code from.
- Repository
Branch string - Repository branch is the name of the branch to fetch the code from. This cannot be set if repository commit or sha is set.
- Repository
Commit string - Repository commit is tag to fetch the code from. This cannot be set if repository branch or sha is set.
- Repository
Connector string - Repository connector is the reference to the connector used to fetch the code.
- Repository
Path string - Repository path is the path in which the code resides.
- Repository
Sha string - Repository commit is sha to fetch the code from. This cannot be set if repository branch or commit is set.
- []string
- Tags to associate with the resource.
- Terraform
Variable []WorkspaceFiles Terraform Variable File Args - Terraform
Variables []WorkspaceTerraform Variable Args
- cost
Estimation BooleanEnabled - Cost estimation enabled determines if cost estimation operations are performed.
- default
Pipelines Map<String,String> - Default pipelines associated with this workspace
- description String
- Description of the resource.
- environment
Variables List<WorkspaceEnvironment Variable> - Environment variables configured on the workspace
- identifier String
- Unique identifier of the resource.
- name String
- Name of the resource.
- org
Id String - Unique identifier of the organization.
- project
Id String - Unique identifier of the project.
- provider
Connector String - Provider connector is the reference to the connector for the infrastructure provider
- provisioner
Type String - provisioner
Version String - repository String
- Repository is the name of the repository to fetch the code from.
- repository
Branch String - Repository branch is the name of the branch to fetch the code from. This cannot be set if repository commit or sha is set.
- repository
Commit String - Repository commit is tag to fetch the code from. This cannot be set if repository branch or sha is set.
- repository
Connector String - Repository connector is the reference to the connector used to fetch the code.
- repository
Path String - Repository path is the path in which the code resides.
- repository
Sha String - Repository commit is sha to fetch the code from. This cannot be set if repository branch or commit is set.
- List<String>
- Tags to associate with the resource.
- terraform
Variable List<WorkspaceFiles Terraform Variable File> - terraform
Variables List<WorkspaceTerraform Variable>
- cost
Estimation booleanEnabled - Cost estimation enabled determines if cost estimation operations are performed.
- default
Pipelines {[key: string]: string} - Default pipelines associated with this workspace
- description string
- Description of the resource.
- environment
Variables WorkspaceEnvironment Variable[] - Environment variables configured on the workspace
- identifier string
- Unique identifier of the resource.
- name string
- Name of the resource.
- org
Id string - Unique identifier of the organization.
- project
Id string - Unique identifier of the project.
- provider
Connector string - Provider connector is the reference to the connector for the infrastructure provider
- provisioner
Type string - provisioner
Version string - repository string
- Repository is the name of the repository to fetch the code from.
- repository
Branch string - Repository branch is the name of the branch to fetch the code from. This cannot be set if repository commit or sha is set.
- repository
Commit string - Repository commit is tag to fetch the code from. This cannot be set if repository branch or sha is set.
- repository
Connector string - Repository connector is the reference to the connector used to fetch the code.
- repository
Path string - Repository path is the path in which the code resides.
- repository
Sha string - Repository commit is sha to fetch the code from. This cannot be set if repository branch or commit is set.
- string[]
- Tags to associate with the resource.
- terraform
Variable WorkspaceFiles Terraform Variable File[] - terraform
Variables WorkspaceTerraform Variable[]
- cost_
estimation_ boolenabled - Cost estimation enabled determines if cost estimation operations are performed.
- default_
pipelines Mapping[str, str] - Default pipelines associated with this workspace
- description str
- Description of the resource.
- environment_
variables Sequence[WorkspaceEnvironment Variable Args] - Environment variables configured on the workspace
- identifier str
- Unique identifier of the resource.
- name str
- Name of the resource.
- org_
id str - Unique identifier of the organization.
- project_
id str - Unique identifier of the project.
- provider_
connector str - Provider connector is the reference to the connector for the infrastructure provider
- provisioner_
type str - provisioner_
version str - repository str
- Repository is the name of the repository to fetch the code from.
- repository_
branch str - Repository branch is the name of the branch to fetch the code from. This cannot be set if repository commit or sha is set.
- repository_
commit str - Repository commit is tag to fetch the code from. This cannot be set if repository branch or sha is set.
- repository_
connector str - Repository connector is the reference to the connector used to fetch the code.
- repository_
path str - Repository path is the path in which the code resides.
- repository_
sha str - Repository commit is sha to fetch the code from. This cannot be set if repository branch or commit is set.
- Sequence[str]
- Tags to associate with the resource.
- terraform_
variable_ Sequence[Workspacefiles Terraform Variable File Args] - terraform_
variables Sequence[WorkspaceTerraform Variable Args]
- cost
Estimation BooleanEnabled - Cost estimation enabled determines if cost estimation operations are performed.
- default
Pipelines Map<String> - Default pipelines associated with this workspace
- description String
- Description of the resource.
- environment
Variables List<Property Map> - Environment variables configured on the workspace
- identifier String
- Unique identifier of the resource.
- name String
- Name of the resource.
- org
Id String - Unique identifier of the organization.
- project
Id String - Unique identifier of the project.
- provider
Connector String - Provider connector is the reference to the connector for the infrastructure provider
- provisioner
Type String - provisioner
Version String - repository String
- Repository is the name of the repository to fetch the code from.
- repository
Branch String - Repository branch is the name of the branch to fetch the code from. This cannot be set if repository commit or sha is set.
- repository
Commit String - Repository commit is tag to fetch the code from. This cannot be set if repository branch or sha is set.
- repository
Connector String - Repository connector is the reference to the connector used to fetch the code.
- repository
Path String - Repository path is the path in which the code resides.
- repository
Sha String - Repository commit is sha to fetch the code from. This cannot be set if repository branch or commit is set.
- List<String>
- Tags to associate with the resource.
- terraform
Variable List<Property Map>Files - terraform
Variables List<Property Map>
Supporting Types
WorkspaceEnvironmentVariable, WorkspaceEnvironmentVariableArgs
- Key string
- Key is the identifier for the variable. Must be unique within the workspace.
- Value string
- Value is the value of the variable. For string value types this field should contain the value of the variable. For secret value types this should contain a reference to a valid harness secret.
- Value
Type string - Value type indicates the value type of the variable. Currently we support string and secret.
- Key string
- Key is the identifier for the variable. Must be unique within the workspace.
- Value string
- Value is the value of the variable. For string value types this field should contain the value of the variable. For secret value types this should contain a reference to a valid harness secret.
- Value
Type string - Value type indicates the value type of the variable. Currently we support string and secret.
- key String
- Key is the identifier for the variable. Must be unique within the workspace.
- value String
- Value is the value of the variable. For string value types this field should contain the value of the variable. For secret value types this should contain a reference to a valid harness secret.
- value
Type String - Value type indicates the value type of the variable. Currently we support string and secret.
- key string
- Key is the identifier for the variable. Must be unique within the workspace.
- value string
- Value is the value of the variable. For string value types this field should contain the value of the variable. For secret value types this should contain a reference to a valid harness secret.
- value
Type string - Value type indicates the value type of the variable. Currently we support string and secret.
- key str
- Key is the identifier for the variable. Must be unique within the workspace.
- value str
- Value is the value of the variable. For string value types this field should contain the value of the variable. For secret value types this should contain a reference to a valid harness secret.
- value_
type str - Value type indicates the value type of the variable. Currently we support string and secret.
- key String
- Key is the identifier for the variable. Must be unique within the workspace.
- value String
- Value is the value of the variable. For string value types this field should contain the value of the variable. For secret value types this should contain a reference to a valid harness secret.
- value
Type String - Value type indicates the value type of the variable. Currently we support string and secret.
WorkspaceTerraformVariable, WorkspaceTerraformVariableArgs
- Key string
- Key is the identifier for the variable. Must be unique within the workspace.
- Value string
- Value is the value of the variable. For string value types this field should contain the value of the variable. For secret value types this should contain a reference to a valid harness secret.
- Value
Type string - Value type indicates the value type of the variable. Currently we support string and secret.
- Key string
- Key is the identifier for the variable. Must be unique within the workspace.
- Value string
- Value is the value of the variable. For string value types this field should contain the value of the variable. For secret value types this should contain a reference to a valid harness secret.
- Value
Type string - Value type indicates the value type of the variable. Currently we support string and secret.
- key String
- Key is the identifier for the variable. Must be unique within the workspace.
- value String
- Value is the value of the variable. For string value types this field should contain the value of the variable. For secret value types this should contain a reference to a valid harness secret.
- value
Type String - Value type indicates the value type of the variable. Currently we support string and secret.
- key string
- Key is the identifier for the variable. Must be unique within the workspace.
- value string
- Value is the value of the variable. For string value types this field should contain the value of the variable. For secret value types this should contain a reference to a valid harness secret.
- value
Type string - Value type indicates the value type of the variable. Currently we support string and secret.
- key str
- Key is the identifier for the variable. Must be unique within the workspace.
- value str
- Value is the value of the variable. For string value types this field should contain the value of the variable. For secret value types this should contain a reference to a valid harness secret.
- value_
type str - Value type indicates the value type of the variable. Currently we support string and secret.
- key String
- Key is the identifier for the variable. Must be unique within the workspace.
- value String
- Value is the value of the variable. For string value types this field should contain the value of the variable. For secret value types this should contain a reference to a valid harness secret.
- value
Type String - Value type indicates the value type of the variable. Currently we support string and secret.
WorkspaceTerraformVariableFile, WorkspaceTerraformVariableFileArgs
- Repository string
- Repository is the name of the repository to fetch the code from.
- Repository
Connector string - Repository connector is the reference to the connector used to fetch the variables.
- Repository
Branch string - Repository branch is the name of the branch to fetch the variables from. This cannot be set if repository commit or sha is set
- Repository
Commit string - Repository commit is tag to fetch the variables from. This cannot be set if repository branch or sha is set.
- Repository
Path string - Repository path is the path in which the variables reside.
- Repository
Sha string - Repository commit is sha to fetch the variables from. This cannot be set if repository branch or commit is set.
- Repository string
- Repository is the name of the repository to fetch the code from.
- Repository
Connector string - Repository connector is the reference to the connector used to fetch the variables.
- Repository
Branch string - Repository branch is the name of the branch to fetch the variables from. This cannot be set if repository commit or sha is set
- Repository
Commit string - Repository commit is tag to fetch the variables from. This cannot be set if repository branch or sha is set.
- Repository
Path string - Repository path is the path in which the variables reside.
- Repository
Sha string - Repository commit is sha to fetch the variables from. This cannot be set if repository branch or commit is set.
- repository String
- Repository is the name of the repository to fetch the code from.
- repository
Connector String - Repository connector is the reference to the connector used to fetch the variables.
- repository
Branch String - Repository branch is the name of the branch to fetch the variables from. This cannot be set if repository commit or sha is set
- repository
Commit String - Repository commit is tag to fetch the variables from. This cannot be set if repository branch or sha is set.
- repository
Path String - Repository path is the path in which the variables reside.
- repository
Sha String - Repository commit is sha to fetch the variables from. This cannot be set if repository branch or commit is set.
- repository string
- Repository is the name of the repository to fetch the code from.
- repository
Connector string - Repository connector is the reference to the connector used to fetch the variables.
- repository
Branch string - Repository branch is the name of the branch to fetch the variables from. This cannot be set if repository commit or sha is set
- repository
Commit string - Repository commit is tag to fetch the variables from. This cannot be set if repository branch or sha is set.
- repository
Path string - Repository path is the path in which the variables reside.
- repository
Sha string - Repository commit is sha to fetch the variables from. This cannot be set if repository branch or commit is set.
- repository str
- Repository is the name of the repository to fetch the code from.
- repository_
connector str - Repository connector is the reference to the connector used to fetch the variables.
- repository_
branch str - Repository branch is the name of the branch to fetch the variables from. This cannot be set if repository commit or sha is set
- repository_
commit str - Repository commit is tag to fetch the variables from. This cannot be set if repository branch or sha is set.
- repository_
path str - Repository path is the path in which the variables reside.
- repository_
sha str - Repository commit is sha to fetch the variables from. This cannot be set if repository branch or commit is set.
- repository String
- Repository is the name of the repository to fetch the code from.
- repository
Connector String - Repository connector is the reference to the connector used to fetch the variables.
- repository
Branch String - Repository branch is the name of the branch to fetch the variables from. This cannot be set if repository commit or sha is set
- repository
Commit String - Repository commit is tag to fetch the variables from. This cannot be set if repository branch or sha is set.
- repository
Path String - Repository path is the path in which the variables reside.
- repository
Sha String - Repository commit is sha to fetch the variables from. This cannot be set if repository branch or commit is set.
Import
$ pulumi import harness:platform/workspace:Workspace example <org_id>/<project_id>/<slo_id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- harness pulumi/pulumi-harness
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
harness
Terraform Provider.