Skip to content

Commit fc6ac72

Browse files
Add docs for explorer workspace tags [TF-30537]
1 parent 80e64be commit fc6ac72

File tree

1 file changed

+12
-1
lines changed
  • content/terraform-docs-common/docs/cloud-docs/api-docs

1 file changed

+12
-1
lines changed

content/terraform-docs-common/docs/cloud-docs/api-docs/explorer.mdx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ fields available for each view type are detailed below:
126126
| `resources_drifted` | `number` | The count of resources that drift was detected for. |
127127
| `resources_undrifted` | `number` | The count of resources that drift was not detected for. |
128128
| `state_version_terraform_version` | `string` | The Terraform version used to create the current run's state file. |
129+
| `tags` | `string` | A comma separated list of tags (keys and key:value pairs) applied to this workspace. |
129130
| `vcs_repo_identifier` | `string` | The name of the repository configured for this workspace, if available. |
130131
| `workspace_created_at` | `datetime` | The time this workspace was created. |
131132
| `workspace_name` | `string` | The name of this workspace. |
@@ -265,7 +266,15 @@ _Show data for all workspaces with `test` in their name_
265266
```shell
266267
curl \
267268
--header "Authorization: Bearer $TOKEN" \
268-
'https://app.terraform.io/api/v2/organizations/$ORG_NAME/explorer?type=workspaces&&filter%5B0%5D%5Bworkspace_name%5D%5Bcontains%5D%5B0%5D=test'
269+
'https://app.terraform.io/api/v2/organizations/$ORG_NAME/explorer?type=workspaces&filter%5B0%5D%5Bworkspace_name%5D%5Bcontains%5D%5B0%5D=test'
270+
```
271+
272+
_Show data for all workspaces with the tag key `billing` having value `tier2`_
273+
274+
```shell
275+
curl \
276+
--header "Authorization: Bearer $TOKEN" \
277+
'https://app.terraform.io/api/v2/organizations/$ORG_NAME/explorer?type=workspaces&filter%5B0%5D%5Btags%5D%5Bcontains%5D%5B0%5D=billing:tier2'
269278
```
270279

271280
**View Type: `modules`**
@@ -352,6 +361,7 @@ _Show data for all workspaces_
352361
"resources-drifted": 0,
353362
"resources-undrifted": 0,
354363
"state-version-terraform-version": "1.5.7",
364+
"tags": "",
355365
"vcs-repo-identifier": null,
356366
"workspace-created-at": "2023-10-17T21:56:45.570+00:00",
357367
"workspace-name": "payments-service",
@@ -384,6 +394,7 @@ _Show data for all workspaces_
384394
"resources-drifted": 3,
385395
"resources-undrifted": 3,
386396
"state-version-terraform-version": "1.4.5",
397+
"tags": "billing:tier1, project_customer",
387398
"vcs-repo-identifier": "acmecorp/api",
388399
"workspace-created-at": "2023-04-25T17:09:14.960+00:00",
389400
"workspace-name": "api-service",

0 commit comments

Comments
 (0)