Apply for invite to IaCP

scalr_workspace

Manage the state of workspaces in Scalr. Create, update and destroy

Syntax

resource scalr_workspace example {
  name              = "{workspace-name}"
  organization      = "{environment-id}"
  auto_apply        = {true|false}
  operations        = {true|false}
  queue_all_runs    = {true|false}
  ssh_key_id        = "{ssh-key-id}"
  terraform_version = "{x.y.z}"
  vcs_repo {
      identifier          = "{org/:repo}"
      branch              = "{branch-name}"
      ingress_submodules  = {true|false}
      oauth_token_id      = "{vcs_provider_id}"
  }
  working_directory = "{dir_name}"
}

Arguments

Argument

Required

Description

name

Yes

Name of the workspace.

organization

Yes

ID of the organization (Scalr environment).

auto_apply

No

Set (true/false) to configure if terrafrom apply should automatically run when terraform plan ends without error. Defaults to false.

operations

No

Set (true/false) to configure workspace remote execution. When false only used to store state. Defaults to true.

queue_all_runs

No

Set (true/false) to configure queuing all runs. When false one manually triggered run is required. Defaults to true.

ssh_key_id

No

SSH Key to be assocaited with the workspace.

terraform_version

No

Set the required Terraform version for this workspace.

vcs_repo

No

Arguments for a linked to VCS repository if any, otherwise omit.

     identifier

Yes (if vcs_repo)

VCS repository ID in the format :org/:repo.

     ingress_submodules

Yes (if vcs_repo)

Set (true/false) to configure if submodules should be pulled into the workspace when cloning the VCS repository into Scalr. Defaults to false.

     oauth_token_id

Yes (if vcs_repo)

The OAuth token ID of the VCS provider.

     branch

No

The VCS repo branch, if any.

working_directory

No

Set if a sub-directory to run Terraform will be used.

Attributes

All arguments plus:

Attribute

Description

id

The workspace ID in the format <ORGANIZATION>/<WORKSPACE>.

external_id

The workspace external ID in the format ws-<RANDOM STRING>.

created_by

Details of the user that created the workspace.

     username

Username of creator.

     email

Email address of creator.

     full_name

Full name of creator.