Harness v0.4.4 published on Tuesday, Nov 12, 2024 by Pulumi
harness.platform.getWorkspace
Explore with Pulumi AI
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
- Org
Id string - Organization Identifier
- Project
Id string - Project Identifier
- Description string
- Description of the Workspace
- Environment
Variables List<GetWorkspace Environment Variable> - Environment variables configured on the workspace
- Repository
Branch string - Repository Branch in which the code should be accessed
- Repository
Commit string - Repository Tag in which the code should be accessed
- Repository
Sha string - Repository SHA in which the code should be accessed
- Terraform
Variable List<GetFiles Workspace Terraform Variable File> - Terraform
Variables List<GetWorkspace Terraform Variable>
- Identifier string
- Identifier of the Workspace
- Org
Id string - Organization Identifier
- Project
Id string - Project Identifier
- Description string
- Description of the Workspace
- Environment
Variables []GetWorkspace Environment Variable - Environment variables configured on the workspace
- Repository
Branch string - Repository Branch in which the code should be accessed
- Repository
Commit string - Repository Tag in which the code should be accessed
- Repository
Sha string - Repository SHA in which the code should be accessed
- Terraform
Variable []GetFiles Workspace Terraform Variable File - Terraform
Variables []GetWorkspace Terraform Variable
- identifier String
- Identifier of the Workspace
- org
Id String - Organization Identifier
- project
Id String - Project Identifier
- description String
- Description of the Workspace
- environment
Variables List<GetWorkspace Environment Variable> - Environment variables configured on the workspace
- repository
Branch String - Repository Branch in which the code should be accessed
- repository
Commit String - Repository Tag in which the code should be accessed
- repository
Sha String - Repository SHA in which the code should be accessed
- terraform
Variable List<GetFiles Workspace Terraform Variable File> - terraform
Variables List<GetWorkspace Terraform Variable>
- identifier string
- Identifier of the Workspace
- org
Id string - Organization Identifier
- project
Id string - Project Identifier
- description string
- Description of the Workspace
- environment
Variables GetWorkspace Environment Variable[] - Environment variables configured on the workspace
- repository
Branch string - Repository Branch in which the code should be accessed
- repository
Commit string - Repository Tag in which the code should be accessed
- repository
Sha string - Repository SHA in which the code should be accessed
- terraform
Variable GetFiles Workspace Terraform Variable File[] - terraform
Variables GetWorkspace Terraform Variable[]
- 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[GetWorkspace Environment Variable] - 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_ Sequence[Getfiles Workspace Terraform Variable File] - terraform_
variables Sequence[GetWorkspace Terraform Variable]
- identifier String
- Identifier of the Workspace
- org
Id String - Organization Identifier
- project
Id String - Project Identifier
- description String
- Description of the Workspace
- environment
Variables List<Property Map> - Environment variables configured on the workspace
- repository
Branch String - Repository Branch in which the code should be accessed
- repository
Commit String - Repository Tag in which the code should be accessed
- repository
Sha String - Repository SHA in which the code should be accessed
- terraform
Variable List<Property Map>Files - terraform
Variables List<Property Map>
getWorkspace Result
The following output properties are available:
- Cost
Estimation boolEnabled - If enabled cost estimation operations will be performed in this workspace
- Default
Pipelines Dictionary<string, string> - Description string
- Description of the Workspace
- Environment
Variables List<GetWorkspace Environment Variable> - 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
- Org
Id string - Organization Identifier
- Project
Id string - Project Identifier
- Provider
Connector string - Provider Connector is the reference to the connector for the infrastructure provider
- Provisioner
Type string - Provisioner type defines the provisioning tool to use.
- Provisioner
Version string - Provisioner Version defines the tool version to use
- Repository string
- Repository is the name of the repository to use
- Repository
Branch string - Repository Branch in which the code should be accessed
- Repository
Commit string - Repository Tag in which the code should be accessed
- Repository
Connector string - Repository Connector is the reference to the connector to use for this code
- Repository
Path string - Repository Path is the path in which the infra code resides
- Repository
Sha string - Repository SHA in which the code should be accessed
- Terraform
Variable List<GetFiles Workspace Terraform Variable File> - Terraform
Variables List<GetWorkspace Terraform Variable>
- Cost
Estimation boolEnabled - If enabled cost estimation operations will be performed in this workspace
- Default
Pipelines map[string]string - Description string
- Description of the Workspace
- Environment
Variables []GetWorkspace Environment Variable - 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
- Org
Id string - Organization Identifier
- Project
Id string - Project Identifier
- Provider
Connector string - Provider Connector is the reference to the connector for the infrastructure provider
- Provisioner
Type string - Provisioner type defines the provisioning tool to use.
- Provisioner
Version string - Provisioner Version defines the tool version to use
- Repository string
- Repository is the name of the repository to use
- Repository
Branch string - Repository Branch in which the code should be accessed
- Repository
Commit string - Repository Tag in which the code should be accessed
- Repository
Connector string - Repository Connector is the reference to the connector to use for this code
- Repository
Path string - Repository Path is the path in which the infra code resides
- Repository
Sha string - Repository SHA in which the code should be accessed
- Terraform
Variable []GetFiles Workspace Terraform Variable File - Terraform
Variables []GetWorkspace Terraform Variable
- cost
Estimation BooleanEnabled - If enabled cost estimation operations will be performed in this workspace
- default
Pipelines Map<String,String> - description String
- Description of the Workspace
- environment
Variables List<GetWorkspace Environment Variable> - 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
- org
Id String - Organization Identifier
- project
Id String - Project Identifier
- provider
Connector String - Provider Connector is the reference to the connector for the infrastructure provider
- provisioner
Type String - Provisioner type defines the provisioning tool to use.
- provisioner
Version String - Provisioner Version defines the tool version to use
- repository String
- Repository is the name of the repository to use
- repository
Branch String - Repository Branch in which the code should be accessed
- repository
Commit String - Repository Tag in which the code should be accessed
- repository
Connector String - Repository Connector is the reference to the connector to use for this code
- repository
Path String - Repository Path is the path in which the infra code resides
- repository
Sha String - Repository SHA in which the code should be accessed
- terraform
Variable List<GetFiles Workspace Terraform Variable File> - terraform
Variables List<GetWorkspace Terraform Variable>
- cost
Estimation booleanEnabled - If enabled cost estimation operations will be performed in this workspace
- default
Pipelines {[key: string]: string} - description string
- Description of the Workspace
- environment
Variables GetWorkspace Environment Variable[] - 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
- org
Id string - Organization Identifier
- project
Id string - Project Identifier
- provider
Connector string - Provider Connector is the reference to the connector for the infrastructure provider
- provisioner
Type string - Provisioner type defines the provisioning tool to use.
- provisioner
Version string - Provisioner Version defines the tool version to use
- repository string
- Repository is the name of the repository to use
- repository
Branch string - Repository Branch in which the code should be accessed
- repository
Commit string - Repository Tag in which the code should be accessed
- repository
Connector string - Repository Connector is the reference to the connector to use for this code
- repository
Path string - Repository Path is the path in which the infra code resides
- repository
Sha string - Repository SHA in which the code should be accessed
- terraform
Variable GetFiles Workspace Terraform Variable File[] - terraform
Variables GetWorkspace Terraform Variable[]
- cost_
estimation_ boolenabled - 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[GetWorkspace Environment Variable] - 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_ Sequence[Getfiles Workspace Terraform Variable File] - terraform_
variables Sequence[GetWorkspace Terraform Variable]
- cost
Estimation BooleanEnabled - If enabled cost estimation operations will be performed in this workspace
- default
Pipelines Map<String> - description String
- Description of the Workspace
- environment
Variables 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
- org
Id String - Organization Identifier
- project
Id String - Project Identifier
- provider
Connector String - Provider Connector is the reference to the connector for the infrastructure provider
- provisioner
Type String - Provisioner type defines the provisioning tool to use.
- provisioner
Version String - Provisioner Version defines the tool version to use
- repository String
- Repository is the name of the repository to use
- repository
Branch String - Repository Branch in which the code should be accessed
- repository
Commit String - Repository Tag in which the code should be accessed
- repository
Connector String - Repository Connector is the reference to the connector to use for this code
- repository
Path String - Repository Path is the path in which the infra code resides
- repository
Sha String - Repository SHA in which the code should be accessed
- terraform
Variable List<Property Map>Files - terraform
Variables List<Property Map>
Supporting Types
GetWorkspaceEnvironmentVariable
- 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
GetWorkspaceTerraformVariable
- 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
GetWorkspaceTerraformVariableFile
- 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 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
Connector string - Repository connector is the reference to the connector used to fetch the variables.
- 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
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
Connector string - Repository connector is the reference to the connector used to fetch the variables.
- 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
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
Connector String - Repository connector is the reference to the connector used to fetch the variables.
- 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
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
Connector string - Repository connector is the reference to the connector used to fetch the variables.
- 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_
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.
- 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
Connector String - Repository connector is the reference to the connector used to fetch the variables.
- 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.
Package Details
- Repository
- harness pulumi/pulumi-harness
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
harness
Terraform Provider.