Skip to content

This is a Terraform module for simple writing and reading secrets from an Azure Key Vault.

License

Notifications You must be signed in to change notification settings

zodiac403/terraform-azurerm-key-vault-secrets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terraform AzureRM Keyvault Secrets Module

This is a Terraform module for simple writing and reading secrets from an Azure Key Vault.

Usage

Write secrets to Key Vault:

resource "azurerm_key_vault" "example" {
  # your key vault
}

module "secrets" {
  source  = "zodiac403/key-vault-secrets/azurerm"
  version = "1.0.0"

  key_vault_id  = azurerm_key_vault.example.id
  input_secrets = {
    db-connection-string = "[secret connection string]",
    db-password          = "[secret database password]",
  }
  input_tags    = {
    stage = "example",
  }
}

Read secrets from Key Vault:

module "secrets" {
  source  = "zodiac403/key-vault-secrets/azurerm"
  version = "1.0.0"

  key_vault_id   = azurerm_key_vault.example.id
  output_secrets = {
    db_connection_string = "db-connection-string",
    db_password          = "db-password"
  }
}

output "db_connection_string" {
  value = module.secrets.from_key_fault.db_connection_string
}

output "db_password" {
  value = module.secrets.from_key_fault.db_password
}

References

About

This is a Terraform module for simple writing and reading secrets from an Azure Key Vault.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages