Data Source: tfe_workspace_ids

Use this data source to get a map of workspace IDs.

Example Usage

data "tfe_workspace_ids" "app-frontend" {
  names        = ["app-frontend-prod", "app-frontend-dev1", "app-frontend-staging"]
  organization = "my-org-name"
}

data "tfe_workspace_ids" "all" {
  names        = ["*"]
  organization = "my-org-name"
}

data "tfe_workspace_ids" "prod-apps" {
  tag_names    = ["prod", "app", "aws"]
  organization = "my-org-name"
}

data "tfe_workspace_ids" "prod-only" {
  tag_names    = ["prod"]
  exclude_tags = ["app"]
  organization = "my-org-name"
}

Argument Reference

The following arguments are supported. At least one of names or tag_names must be present. Both can be used together.

Attributes Reference

In addition to all arguments above, the following attributes are exported: