Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
data "azurerm_key_vault_secret" "mailjet-smtp-username" {
name = "mailjet-smtp-username"
key_vault_id = "${data.azurerm_key_vault.firmhouse.id}"
}
data "azurerm_key_vault_secret" "mailjet-smtp-password" {
name = "mailjet-smtp-password"
key_vault_id = "${data.azurerm_key_vault.firmhouse.id}"
}
data "azurerm_key_vault_secret" "dispatch-database-password" {
name = "dispatch-database-password"
key_vault_id = "${data.azurerm_key_vault.firmhouse.id}"
}
resource "kubernetes_secret" "dispatch-staging" {
metadata {
name = "dispatch-env"
namespace = "platform-staging"
}
data = {
DATABASE_URL = "postgres://dispatch:${data.azurerm_key_vault_secret.dispatch-database-password.value}@dbservice.aivencloud.com:16199/dispatch_production?sslmode=require"
SMTP_HOST = "in-v3.mailjet.com"
SMTP_PASSWORD = "${data.azurerm_key_vault_secret.mailjet-smtp-password.value}"
SMTP_USERNAME = "${data.azurerm_key_vault_secret.mailjet-smtp-username.value}"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment