Skip to content

Commit

Permalink
outputs added and success using example
Browse files Browse the repository at this point in the history
  • Loading branch information
tyler180 committed Aug 7, 2024
1 parent 95c25bc commit 30b9dea
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/complete/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ provider "aws" {
data "aws_availability_zones" "available" {}

locals {
region = "us-east-1"
region = "us-west-2"
name = "amg-ex-${replace(basename(path.cwd), "_", "-")}"
description = "AWS Managed Grafana service for ${local.name}"

Expand Down Expand Up @@ -98,17 +98,17 @@ module "managed_grafana" {

workspace_sa_tokens = {
viewer = {
token_name = "viewer"
token_name = "viewer-example"
sa_account = "viewer"
seconds_to_live = 3600
}
editor = {
token_name = "editor"
token_name = "editor-example"
sa_account = "editor"
seconds_to_live = 3600
}
admin = {
token_name = "admin"
token_name = "admin-example"
sa_account = "admin"
seconds_to_live = 3600
}
Expand Down
11 changes: 11 additions & 0 deletions examples/complete/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,17 @@ output "workspace_grafana_version" {
output "workspace_api_keys" {
description = "The workspace API keys created including their attributes"
value = module.managed_grafana.workspace_api_keys
sensitive = true
}

################################################################################
# Serivce accounts token
################################################################################

output "workspace_sa_tokens" {
description = "The workspace API keys created including their attributes"
value = module.managed_grafana.workspace_sa_tokens
sensitive = true
}

################################################################################
Expand Down
9 changes: 9 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@ output "workspace_api_keys" {
value = aws_grafana_workspace_api_key.this
}

################################################################################
# Workspace serivce accounts token
################################################################################

output "workspace_sa_tokens" {
description = "The workspace API keys created including their attributes"
value = { for k, v in aws_grafana_workspace_service_account_token.this : k => v.key }
}

################################################################################
# Workspace IAM Role
################################################################################
Expand Down

0 comments on commit 30b9dea

Please sign in to comment.