Skip to content

Commit

Permalink
Merge pull request #48 from ConseilsTI/v0.0.47
Browse files Browse the repository at this point in the history
v0.0.47
  • Loading branch information
benyboy84 authored Mar 19, 2024
2 parents a4347c9 + 8fded3c commit 5f670bc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions resources_hcp_vault_secrets.tf
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# The following code block is used to create the Hashicorp Vault Secret app where team token will be stored.

resource "hcp_vault_secrets_app" "this" {
app_name = local.hcp_vault_secrets_app_name
app_name = local.hcp_vault_secrets_app_name
description = ""
}

# The following code blode is used to create secret in Hashicorp Vault.

resource "hcp_vault_secrets_secret" "this" {
for_each = nonsensitive({ for team in local.tfc_teams : team.name => team if try(team.token, false) == true })
app_name = local.hcp_vault_secrets_app_name
app_name = hcp_vault_secrets_app.this.app_name
secret_name = lower(replace(each.value.name, "/\\W|_|\\s/", "_"))
secret_value = module.tfe_teams[each.value.name].token
}

0 comments on commit 5f670bc

Please sign in to comment.