-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #48 from ConseilsTI/v0.0.47
v0.0.47
- Loading branch information
Showing
1 changed file
with
3 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |