Data Source: scalr_workspace_ids

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

Example Usage

data "scalr_workspace_ids" "app-frontend" {
  names          = ["app-frontend-prod", "app-frontend-dev1", "app-frontend-staging"]
  environment_id = "env-xxxxxxxxxx"

data "scalr_workspace_ids" "all" {
  names          = ["*"]
  environment_id = "env-xxxxxxxxxx"



  • environment_id (String) ID of the environment, in the format env-<RANDOM STRING>.
  • names (List of String) A list of names to search for. If a name does not exist, it will not throw an error, it will just not exist in the returned output. Use ["*"] to select all workspaces.


  • id (String) The ID of this resource.
  • ids (Map of String) A map of workspace names and their opaque IDs, in the format env_id/name.