scalr_workspace

Data Source: scalr_workspace

Retrieves the details of a single workspace.

Example Usage

data "scalr_workspace" "example1" {
  id             = "ws-xxxxxxxxxx"
  environment_id = "env-xxxxxxxxxx"
}

data "scalr_workspace" "example2" {
  name           = "my-workspace-name"
  environment_id = "env-xxxxxxxxxx"
}

Schema

Required

  • environment_id (String) ID of the environment, in the format env-<RANDOM STRING>.

Optional

  • id (String) ID of the workspace.
  • name (String) Name of the workspace.

Read-Only

  • agent_pool_id (String) The identifier of an agent pool in the format apool-<RANDOM STRING>.
  • auto_apply (Boolean) Boolean indicates if terraform apply will be automatically run when terraform plan ends without error.
  • auto_queue_runs (String) Indicates if runs have to be queued automatically when a new configuration version is uploaded. Supported values are skip_first, always, never, on_create_only:
    • skip_first - after the very first configuration version is uploaded into the workspace the run will not be triggered. But the following configurations will do. This is the default behavior.
    • always - runs will be triggered automatically on every upload of the configuration version.
    • never - configuration versions are uploaded into the workspace, but runs will not be triggered.
    • on_create_only - single run will be triggered only when the workspace is created and the first configuration version is uploaded. Subsequent configurations will not trigger runs.
  • created_by (List of Object) Details of the user that created the workspace. (see below for nested schema)
  • deletion_protection_enabled (Boolean) Boolean, indicates if the workspace has the protection from an accidental state lost. If enabled and the workspace has resource, the deletion will not be allowed.
  • execution_mode (String) Execution mode of the workspace.
  • force_latest_run (Boolean) Boolean indicates if latest new run will be automatically raised in priority.
  • has_resources (Boolean) The presence of active terraform resources in the current state version.
  • hooks (List of Object) List of custom hooks in a workspace. (see below for nested schema)
  • iac_platform (String) The IaC platform used for this workspace.
  • module_version_id (String) The identifier of a module version in the format modver-<RANDOM STRING>.
  • operations (Boolean) Boolean indicates if the workspace is being used for remote execution.
  • remote_backend (Boolean) Manages if Scalr exports the remote backend configuration and state storage for your infrastructure management. Disabling this feature will also prevent the ability to perform state locking, which ensures that concurrent operations do not conflict. Additionally, it will disable the capability to initiate CLI-driven runs through Scalr.
  • tag_ids (List of String) List of tag IDs associated with the workspace.
  • terraform_version (String) The version of Terraform used for this workspace.
  • terragrunt (List of Object) List of terragrunt configurations in a workspace if set. (see below for nested schema)
  • type (String) The type of the Scalr Workspace environment.
  • vcs_provider_id (String) The identifier of a VCS provider in the format vcs-<RANDOM STRING>.
  • vcs_repo (List of Object) If a workspace is linked to a VCS repository this block shows the details, otherwise {} (see below for nested schema)
  • working_directory (String) A relative path that Terraform will execute within.

Nested Schema for created_by

Read-Only:

  • email (String)
  • full_name (String)
  • username (String)

Nested Schema for hooks

Read-Only:

  • post_apply (String)
  • post_plan (String)
  • pre_apply (String)
  • pre_init (String)
  • pre_plan (String)

Nested Schema for terragrunt

Read-Only:

  • include_external_dependencies (Boolean)
  • use_run_all (Boolean)
  • version (String)

Nested Schema for vcs_repo

Read-Only:

  • dry_runs_enabled (Boolean)
  • identifier (String)
  • ingress_submodules (Boolean)
  • path (String)