scalr_workspace_ids

Obtain a map of workspace IDs based on the names provided. Wildcards are accepted.

Syntax

data scalr_workspace_ids example1 {
  names        = ["{name}", "{name}", ...]
  organization = "{environment-id}"
}

data scalr_workspace_ids example2 {
  names        = ["*"]
  organization = "{environment-id}"
}

Arguments

Argument

Required

Description

names

Yes

List of workspace names to return ID’s for. If there are no matches this data source will return empty maps, it will not return an error. Use [ "*"] to return a map of all workspaces.

organization

Yes

ID of the organization (Scalr environment). The data source will return an error if this ID does not match.

Attributes

All arguments plus:

Attribute

Description

ids

A map of workspace IDs in the format <ORGANIZATION>/<WORKSPACE>.

external_ids

A map of workspace external IDs in the format ws-<RANDOM STRING>.