Skip to content

Commit

Permalink
Randomize SSM parameter name for GF token
Browse files Browse the repository at this point in the history
  • Loading branch information
bonclay7 committed May 8, 2024
1 parent cc82136 commit 3c3e5f1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions modules/eks-monitoring/add-ons/external-secrets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ This deploys an EKS Cluster with the External Secrets Operator. The cluster is p
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 3.72 |
| <a name="provider_kubectl"></a> [kubectl](#provider\_kubectl) | >= 2.0.3 |
| <a name="provider_random"></a> [random](#provider\_random) | n/a |

## Modules

Expand All @@ -35,6 +36,7 @@ This deploys an EKS Cluster with the External Secrets Operator. The cluster is p
| [aws_ssm_parameter.secret](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ssm_parameter) | resource |
| [kubectl_manifest.cluster_secretstore](https://registry.terraform.io/providers/alekc/kubectl/latest/docs/resources/manifest) | resource |
| [kubectl_manifest.secret](https://registry.terraform.io/providers/alekc/kubectl/latest/docs/resources/manifest) | resource |
| [random_uuid.grafana_key_suffix](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/uuid) | resource |
| [aws_region.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/region) | data source |

## Inputs
Expand Down
5 changes: 4 additions & 1 deletion modules/eks-monitoring/add-ons/external-secrets/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,11 @@ YAML
depends_on = [module.external_secrets]
}

resource "random_uuid" "grafana_key_suffix" {
}

resource "aws_ssm_parameter" "secret" {
name = "/terraform-accelerator/grafana-api-key"
name = "/terraform-accelerator/grafana-api-key/${random_uuid.grafana_key_suffix.result}"
description = "SSM Secret to store grafana API Key"
type = "SecureString"
value = jsonencode({
Expand Down

0 comments on commit 3c3e5f1

Please sign in to comment.