Skip to content

Commit d2e19e9

Browse files
feat: Add workspace ID as output attribute (#11)
* Expose workspace id as an output * chore: Update docs and pre-commit * chore: Add ID to example and update output description Co-authored-by: Bryant Biggs <[email protected]>
1 parent 4bbfb6c commit d2e19e9

File tree

5 files changed

+14
-2
lines changed

5 files changed

+14
-2
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/antonbabenko/pre-commit-terraform
3-
rev: v1.76.0
3+
rev: v1.77.0
44
hooks:
55
- id: terraform_fmt
66
- id: terraform_validate
@@ -23,7 +23,7 @@ repos:
2323
- '--args=--only=terraform_standard_module_structure'
2424
- '--args=--only=terraform_workspace_remote'
2525
- repo: https://github.com/pre-commit/pre-commit-hooks
26-
rev: v4.3.0
26+
rev: v4.4.0
2727
hooks:
2828
- id: check-merge-conflict
2929
- id: end-of-file-fixer

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ No modules.
170170
| <a name="output_workspace_iam_role_arn"></a> [workspace\_iam\_role\_arn](#output\_workspace\_iam\_role\_arn) | IAM role ARN of the Grafana workspace |
171171
| <a name="output_workspace_iam_role_name"></a> [workspace\_iam\_role\_name](#output\_workspace\_iam\_role\_name) | IAM role name of the Grafana workspace |
172172
| <a name="output_workspace_iam_role_unique_id"></a> [workspace\_iam\_role\_unique\_id](#output\_workspace\_iam\_role\_unique\_id) | Stable and unique string identifying the IAM role |
173+
| <a name="output_workspace_id"></a> [workspace\_id](#output\_workspace\_id) | The ID of the Grafana workspace |
173174
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
174175

175176
## License

examples/complete/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ No inputs.
6060
| <a name="output_workspace_iam_role_arn"></a> [workspace\_iam\_role\_arn](#output\_workspace\_iam\_role\_arn) | IAM role ARN of the Grafana workspace |
6161
| <a name="output_workspace_iam_role_name"></a> [workspace\_iam\_role\_name](#output\_workspace\_iam\_role\_name) | IAM role name of the Grafana workspace |
6262
| <a name="output_workspace_iam_role_unique_id"></a> [workspace\_iam\_role\_unique\_id](#output\_workspace\_iam\_role\_unique\_id) | Stable and unique string identifying the IAM role |
63+
| <a name="output_workspace_id"></a> [workspace\_id](#output\_workspace\_id) | The ID of the Grafana workspace |
6364
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
6465

6566
Apache-2.0 Licensed. See [LICENSE](https://github.com/terraform-aws-modules/terraform-aws-managed-service-grafana/blob/main/LICENSE).

examples/complete/outputs.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ output "workspace_arn" {
77
value = module.managed_grafana.workspace_arn
88
}
99

10+
output "workspace_id" {
11+
description = "The ID of the Grafana workspace"
12+
value = module.managed_grafana.workspace_id
13+
}
14+
1015
output "workspace_endpoint" {
1116
description = "The endpoint of the Grafana workspace"
1217
value = module.managed_grafana.workspace_endpoint

outputs.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ output "workspace_arn" {
77
value = try(aws_grafana_workspace.this[0].arn, null)
88
}
99

10+
output "workspace_id" {
11+
description = "The ID of the Grafana workspace"
12+
value = try(aws_grafana_workspace.this[0].id, null)
13+
}
14+
1015
output "workspace_endpoint" {
1116
description = "The endpoint of the Grafana workspace"
1217
value = try(aws_grafana_workspace.this[0].endpoint, null)

0 commit comments

Comments
 (0)