scalr_workspace_ids
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"
}
Schema
Required
environment_id
(String) ID of the environment, in the formatenv-<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.
Read-Only
id
(String) The ID of this resource.ids
(Map of String) A map of workspace names and their opaque IDs, in the formatenv_id/name
.
Updated 4 months ago