Skip to content

Commit

Permalink
Add data for vault secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
johnake committed Aug 24, 2023
1 parent 2ad42e8 commit b42b844
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions terraform/aks/data.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
data "azurerm_key_vault" "infra_secret_vault" {
count = var.deploy_postgres ? 0 : 1
name = var.key_vault_name
resource_group_name = var.key_vault_resource_group
}
data "azurerm_key_vault_secret" "db_url" {
count = length(data.azurerm_key_vault.infra_secret_vault)==0 ? 0 : 1
name = var.review_url_db_name
key_vault_id = data.azurerm_key_vault.infra_secret_vault[0].id
}
data "azurerm_key_vault_secret" "redis_url" {
count = length(data.azurerm_key_vault.infra_secret_vault)==0 ? 0 : 1
name = var.review_url_redis_name
key_vault_id = data.azurerm_key_vault.infra_secret_vault[0].id
}

0 comments on commit b42b844

Please sign in to comment.