1. Packages
  2. Harness Provider
  3. API Docs
  4. platform
  5. getWorkspace
Harness v0.4.4 published on Tuesday, Nov 12, 2024 by Pulumi

harness.platform.getWorkspace

Explore with Pulumi AI

harness logo
Harness v0.4.4 published on Tuesday, Nov 12, 2024 by Pulumi

    Data source for retrieving workspaces.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as harness from "@pulumi/harness";
    
    const test = harness.platform.getWorkspace({
        identifier: "identifier",
        orgId: "org_id",
        projectId: "project_id",
    });
    
    import pulumi
    import pulumi_harness as harness
    
    test = harness.platform.get_workspace(identifier="identifier",
        org_id="org_id",
        project_id="project_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.LookupWorkspace(ctx, &platform.LookupWorkspaceArgs{
    			Identifier: "identifier",
    			OrgId:      "org_id",
    			ProjectId:  "project_id",
    		}, nil)
    		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 test = Harness.Platform.GetWorkspace.Invoke(new()
        {
            Identifier = "identifier",
            OrgId = "org_id",
            ProjectId = "project_id",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.harness.platform.PlatformFunctions;
    import com.pulumi.harness.platform.inputs.GetWorkspaceArgs;
    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 test = PlatformFunctions.getWorkspace(GetWorkspaceArgs.builder()
                .identifier("identifier")
                .orgId("org_id")
                .projectId("project_id")
                .build());
    
        }
    }
    
    variables:
      test:
        fn::invoke:
          Function: harness:platform:getWorkspace
          Arguments:
            identifier: identifier
            orgId: org_id
            projectId: project_id
    

    Using getWorkspace

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getWorkspace(args: GetWorkspaceArgs, opts?: InvokeOptions): Promise<GetWorkspaceResult>
    function getWorkspaceOutput(args: GetWorkspaceOutputArgs, opts?: InvokeOptions): Output<GetWorkspaceResult>
    def get_workspace(description: Optional[str] = None,
                      environment_variables: Optional[Sequence[GetWorkspaceEnvironmentVariable]] = None,
                      identifier: Optional[str] = None,
                      org_id: Optional[str] = None,
                      project_id: Optional[str] = None,
                      repository_branch: Optional[str] = None,
                      repository_commit: Optional[str] = None,
                      repository_sha: Optional[str] = None,
                      terraform_variable_files: Optional[Sequence[GetWorkspaceTerraformVariableFile]] = None,
                      terraform_variables: Optional[Sequence[GetWorkspaceTerraformVariable]] = None,
                      opts: Optional[InvokeOptions] = None) -> GetWorkspaceResult
    def get_workspace_output(description: Optional[pulumi.Input[str]] = None,
                      environment_variables: Optional[pulumi.Input[Sequence[pulumi.Input[GetWorkspaceEnvironmentVariableArgs]]]] = None,
                      identifier: Optional[pulumi.Input[str]] = None,
                      org_id: Optional[pulumi.Input[str]] = None,
                      project_id: Optional[pulumi.Input[str]] = None,
                      repository_branch: Optional[pulumi.Input[str]] = None,
                      repository_commit: Optional[pulumi.Input[str]] = None,
                      repository_sha: Optional[pulumi.Input[str]] = None,
                      terraform_variable_files: Optional[pulumi.Input[Sequence[pulumi.Input[GetWorkspaceTerraformVariableFileArgs]]]] = None,
                      terraform_variables: Optional[pulumi.Input[Sequence[pulumi.Input[GetWorkspaceTerraformVariableArgs]]]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetWorkspaceResult]
    func LookupWorkspace(ctx *Context, args *LookupWorkspaceArgs, opts ...InvokeOption) (*LookupWorkspaceResult, error)
    func LookupWorkspaceOutput(ctx *Context, args *LookupWorkspaceOutputArgs, opts ...InvokeOption) LookupWorkspaceResultOutput

    > Note: This function is named LookupWorkspace in the Go SDK.

    public static class GetWorkspace 
    {
        public static Task<GetWorkspaceResult> InvokeAsync(GetWorkspaceArgs args, InvokeOptions? opts = null)
        public static Output<GetWorkspaceResult> Invoke(GetWorkspaceInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetWorkspaceResult> getWorkspace(GetWorkspaceArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: harness:platform/getWorkspace:getWorkspace
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Identifier string
    Identifier of the Workspace
    OrgId string
    Organization Identifier
    ProjectId string
    Project Identifier
    Description string
    Description of the Workspace
    EnvironmentVariables List<GetWorkspaceEnvironmentVariable>
    Environment variables configured on the workspace
    RepositoryBranch string
    Repository Branch in which the code should be accessed
    RepositoryCommit string
    Repository Tag in which the code should be accessed
    RepositorySha string
    Repository SHA in which the code should be accessed
    TerraformVariableFiles List<GetWorkspaceTerraformVariableFile>
    TerraformVariables List<GetWorkspaceTerraformVariable>
    Identifier string
    Identifier of the Workspace
    OrgId string
    Organization Identifier
    ProjectId string
    Project Identifier
    Description string
    Description of the Workspace
    EnvironmentVariables []GetWorkspaceEnvironmentVariable
    Environment variables configured on the workspace
    RepositoryBranch string
    Repository Branch in which the code should be accessed
    RepositoryCommit string
    Repository Tag in which the code should be accessed
    RepositorySha string
    Repository SHA in which the code should be accessed
    TerraformVariableFiles []GetWorkspaceTerraformVariableFile
    TerraformVariables []GetWorkspaceTerraformVariable
    identifier String
    Identifier of the Workspace
    orgId String
    Organization Identifier
    projectId String
    Project Identifier
    description String
    Description of the Workspace
    environmentVariables List<GetWorkspaceEnvironmentVariable>
    Environment variables configured on the workspace
    repositoryBranch String
    Repository Branch in which the code should be accessed
    repositoryCommit String
    Repository Tag in which the code should be accessed
    repositorySha String
    Repository SHA in which the code should be accessed
    terraformVariableFiles List<GetWorkspaceTerraformVariableFile>
    terraformVariables List<GetWorkspaceTerraformVariable>
    identifier string
    Identifier of the Workspace
    orgId string
    Organization Identifier
    projectId string
    Project Identifier
    description string
    Description of the Workspace
    environmentVariables GetWorkspaceEnvironmentVariable[]
    Environment variables configured on the workspace
    repositoryBranch string
    Repository Branch in which the code should be accessed
    repositoryCommit string
    Repository Tag in which the code should be accessed
    repositorySha string
    Repository SHA in which the code should be accessed
    terraformVariableFiles GetWorkspaceTerraformVariableFile[]
    terraformVariables GetWorkspaceTerraformVariable[]
    identifier str
    Identifier of the Workspace
    org_id str
    Organization Identifier
    project_id str
    Project Identifier
    description str
    Description of the Workspace
    environment_variables Sequence[GetWorkspaceEnvironmentVariable]
    Environment variables configured on the workspace
    repository_branch str
    Repository Branch in which the code should be accessed
    repository_commit str
    Repository Tag in which the code should be accessed
    repository_sha str
    Repository SHA in which the code should be accessed
    terraform_variable_files Sequence[GetWorkspaceTerraformVariableFile]
    terraform_variables Sequence[GetWorkspaceTerraformVariable]
    identifier String
    Identifier of the Workspace
    orgId String
    Organization Identifier
    projectId String
    Project Identifier
    description String
    Description of the Workspace
    environmentVariables List<Property Map>
    Environment variables configured on the workspace
    repositoryBranch String
    Repository Branch in which the code should be accessed
    repositoryCommit String
    Repository Tag in which the code should be accessed
    repositorySha String
    Repository SHA in which the code should be accessed
    terraformVariableFiles List<Property Map>
    terraformVariables List<Property Map>

    getWorkspace Result

    The following output properties are available:

    CostEstimationEnabled bool
    If enabled cost estimation operations will be performed in this workspace
    DefaultPipelines Dictionary<string, string>
    Description string
    Description of the Workspace
    EnvironmentVariables List<GetWorkspaceEnvironmentVariable>
    Environment variables configured on the workspace
    Id string
    The provider-assigned unique ID for this managed resource.
    Identifier string
    Identifier of the Workspace
    Name string
    Name of the Workspace
    OrgId string
    Organization Identifier
    ProjectId string
    Project Identifier
    ProviderConnector string
    Provider Connector is the reference to the connector for the infrastructure provider
    ProvisionerType string
    Provisioner type defines the provisioning tool to use.
    ProvisionerVersion string
    Provisioner Version defines the tool version to use
    Repository string
    Repository is the name of the repository to use
    RepositoryBranch string
    Repository Branch in which the code should be accessed
    RepositoryCommit string
    Repository Tag in which the code should be accessed
    RepositoryConnector string
    Repository Connector is the reference to the connector to use for this code
    RepositoryPath string
    Repository Path is the path in which the infra code resides
    RepositorySha string
    Repository SHA in which the code should be accessed
    TerraformVariableFiles List<GetWorkspaceTerraformVariableFile>
    TerraformVariables List<GetWorkspaceTerraformVariable>
    CostEstimationEnabled bool
    If enabled cost estimation operations will be performed in this workspace
    DefaultPipelines map[string]string
    Description string
    Description of the Workspace
    EnvironmentVariables []GetWorkspaceEnvironmentVariable
    Environment variables configured on the workspace
    Id string
    The provider-assigned unique ID for this managed resource.
    Identifier string
    Identifier of the Workspace
    Name string
    Name of the Workspace
    OrgId string
    Organization Identifier
    ProjectId string
    Project Identifier
    ProviderConnector string
    Provider Connector is the reference to the connector for the infrastructure provider
    ProvisionerType string
    Provisioner type defines the provisioning tool to use.
    ProvisionerVersion string
    Provisioner Version defines the tool version to use
    Repository string
    Repository is the name of the repository to use
    RepositoryBranch string
    Repository Branch in which the code should be accessed
    RepositoryCommit string
    Repository Tag in which the code should be accessed
    RepositoryConnector string
    Repository Connector is the reference to the connector to use for this code
    RepositoryPath string
    Repository Path is the path in which the infra code resides
    RepositorySha string
    Repository SHA in which the code should be accessed
    TerraformVariableFiles []GetWorkspaceTerraformVariableFile
    TerraformVariables []GetWorkspaceTerraformVariable
    costEstimationEnabled Boolean
    If enabled cost estimation operations will be performed in this workspace
    defaultPipelines Map<String,String>
    description String
    Description of the Workspace
    environmentVariables List<GetWorkspaceEnvironmentVariable>
    Environment variables configured on the workspace
    id String
    The provider-assigned unique ID for this managed resource.
    identifier String
    Identifier of the Workspace
    name String
    Name of the Workspace
    orgId String
    Organization Identifier
    projectId String
    Project Identifier
    providerConnector String
    Provider Connector is the reference to the connector for the infrastructure provider
    provisionerType String
    Provisioner type defines the provisioning tool to use.
    provisionerVersion String
    Provisioner Version defines the tool version to use
    repository String
    Repository is the name of the repository to use
    repositoryBranch String
    Repository Branch in which the code should be accessed
    repositoryCommit String
    Repository Tag in which the code should be accessed
    repositoryConnector String
    Repository Connector is the reference to the connector to use for this code
    repositoryPath String
    Repository Path is the path in which the infra code resides
    repositorySha String
    Repository SHA in which the code should be accessed
    terraformVariableFiles List<GetWorkspaceTerraformVariableFile>
    terraformVariables List<GetWorkspaceTerraformVariable>
    costEstimationEnabled boolean
    If enabled cost estimation operations will be performed in this workspace
    defaultPipelines {[key: string]: string}
    description string
    Description of the Workspace
    environmentVariables GetWorkspaceEnvironmentVariable[]
    Environment variables configured on the workspace
    id string
    The provider-assigned unique ID for this managed resource.
    identifier string
    Identifier of the Workspace
    name string
    Name of the Workspace
    orgId string
    Organization Identifier
    projectId string
    Project Identifier
    providerConnector string
    Provider Connector is the reference to the connector for the infrastructure provider
    provisionerType string
    Provisioner type defines the provisioning tool to use.
    provisionerVersion string
    Provisioner Version defines the tool version to use
    repository string
    Repository is the name of the repository to use
    repositoryBranch string
    Repository Branch in which the code should be accessed
    repositoryCommit string
    Repository Tag in which the code should be accessed
    repositoryConnector string
    Repository Connector is the reference to the connector to use for this code
    repositoryPath string
    Repository Path is the path in which the infra code resides
    repositorySha string
    Repository SHA in which the code should be accessed
    terraformVariableFiles GetWorkspaceTerraformVariableFile[]
    terraformVariables GetWorkspaceTerraformVariable[]
    cost_estimation_enabled bool
    If enabled cost estimation operations will be performed in this workspace
    default_pipelines Mapping[str, str]
    description str
    Description of the Workspace
    environment_variables Sequence[GetWorkspaceEnvironmentVariable]
    Environment variables configured on the workspace
    id str
    The provider-assigned unique ID for this managed resource.
    identifier str
    Identifier of the Workspace
    name str
    Name of the Workspace
    org_id str
    Organization Identifier
    project_id str
    Project Identifier
    provider_connector str
    Provider Connector is the reference to the connector for the infrastructure provider
    provisioner_type str
    Provisioner type defines the provisioning tool to use.
    provisioner_version str
    Provisioner Version defines the tool version to use
    repository str
    Repository is the name of the repository to use
    repository_branch str
    Repository Branch in which the code should be accessed
    repository_commit str
    Repository Tag in which the code should be accessed
    repository_connector str
    Repository Connector is the reference to the connector to use for this code
    repository_path str
    Repository Path is the path in which the infra code resides
    repository_sha str
    Repository SHA in which the code should be accessed
    terraform_variable_files Sequence[GetWorkspaceTerraformVariableFile]
    terraform_variables Sequence[GetWorkspaceTerraformVariable]
    costEstimationEnabled Boolean
    If enabled cost estimation operations will be performed in this workspace
    defaultPipelines Map<String>
    description String
    Description of the Workspace
    environmentVariables List<Property Map>
    Environment variables configured on the workspace
    id String
    The provider-assigned unique ID for this managed resource.
    identifier String
    Identifier of the Workspace
    name String
    Name of the Workspace
    orgId String
    Organization Identifier
    projectId String
    Project Identifier
    providerConnector String
    Provider Connector is the reference to the connector for the infrastructure provider
    provisionerType String
    Provisioner type defines the provisioning tool to use.
    provisionerVersion String
    Provisioner Version defines the tool version to use
    repository String
    Repository is the name of the repository to use
    repositoryBranch String
    Repository Branch in which the code should be accessed
    repositoryCommit String
    Repository Tag in which the code should be accessed
    repositoryConnector String
    Repository Connector is the reference to the connector to use for this code
    repositoryPath String
    Repository Path is the path in which the infra code resides
    repositorySha String
    Repository SHA in which the code should be accessed
    terraformVariableFiles List<Property Map>
    terraformVariables List<Property Map>

    Supporting Types

    GetWorkspaceEnvironmentVariable

    Key string
    Key is the identifier for the variable`
    Value string
    value is the value of the variable
    ValueType string
    Value type indicates the value type of the variable, text or secret
    Key string
    Key is the identifier for the variable`
    Value string
    value is the value of the variable
    ValueType string
    Value type indicates the value type of the variable, text or secret
    key String
    Key is the identifier for the variable`
    value String
    value is the value of the variable
    valueType String
    Value type indicates the value type of the variable, text or secret
    key string
    Key is the identifier for the variable`
    value string
    value is the value of the variable
    valueType string
    Value type indicates the value type of the variable, text or secret
    key str
    Key is the identifier for the variable`
    value str
    value is the value of the variable
    value_type str
    Value type indicates the value type of the variable, text or secret
    key String
    Key is the identifier for the variable`
    value String
    value is the value of the variable
    valueType String
    Value type indicates the value type of the variable, text or secret

    GetWorkspaceTerraformVariable

    Key string
    Key is the identifier for the variable`
    Value string
    value is the value of the variable
    ValueType string
    Value type indicates the value type of the variable, text or secret
    Key string
    Key is the identifier for the variable`
    Value string
    value is the value of the variable
    ValueType string
    Value type indicates the value type of the variable, text or secret
    key String
    Key is the identifier for the variable`
    value String
    value is the value of the variable
    valueType String
    Value type indicates the value type of the variable, text or secret
    key string
    Key is the identifier for the variable`
    value string
    value is the value of the variable
    valueType string
    Value type indicates the value type of the variable, text or secret
    key str
    Key is the identifier for the variable`
    value str
    value is the value of the variable
    value_type str
    Value type indicates the value type of the variable, text or secret
    key String
    Key is the identifier for the variable`
    value String
    value is the value of the variable
    valueType String
    Value type indicates the value type of the variable, text or secret

    GetWorkspaceTerraformVariableFile

    Repository string
    Repository is the name of the repository to fetch the code from.
    RepositoryBranch 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
    RepositoryCommit string
    Repository commit is tag to fetch the variables from. This cannot be set if repository branch or sha is set.
    RepositoryConnector string
    Repository connector is the reference to the connector used to fetch the variables.
    RepositoryPath string
    Repository path is the path in which the variables reside.
    RepositorySha 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.
    RepositoryBranch 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
    RepositoryCommit string
    Repository commit is tag to fetch the variables from. This cannot be set if repository branch or sha is set.
    RepositoryConnector string
    Repository connector is the reference to the connector used to fetch the variables.
    RepositoryPath string
    Repository path is the path in which the variables reside.
    RepositorySha 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.
    repositoryBranch 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
    repositoryCommit String
    Repository commit is tag to fetch the variables from. This cannot be set if repository branch or sha is set.
    repositoryConnector String
    Repository connector is the reference to the connector used to fetch the variables.
    repositoryPath String
    Repository path is the path in which the variables reside.
    repositorySha 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.
    repositoryBranch 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
    repositoryCommit string
    Repository commit is tag to fetch the variables from. This cannot be set if repository branch or sha is set.
    repositoryConnector string
    Repository connector is the reference to the connector used to fetch the variables.
    repositoryPath string
    Repository path is the path in which the variables reside.
    repositorySha 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_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_connector str
    Repository connector is the reference to the connector used to fetch the variables.
    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.
    repositoryBranch 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
    repositoryCommit String
    Repository commit is tag to fetch the variables from. This cannot be set if repository branch or sha is set.
    repositoryConnector String
    Repository connector is the reference to the connector used to fetch the variables.
    repositoryPath String
    Repository path is the path in which the variables reside.
    repositorySha String
    Repository commit is sha to fetch the variables from. This cannot be set if repository branch or commit is set.

    Package Details

    Repository
    harness pulumi/pulumi-harness
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the harness Terraform Provider.
    harness logo
    Harness v0.4.4 published on Tuesday, Nov 12, 2024 by Pulumi