Skip to content

A Terraform module that manages the key-vault resources from the azurerm provider.

License

Notifications You must be signed in to change notification settings

telekom-mms/terraform-azurerm-key-vault

Repository files navigation

key_vault

This module manages the hashicorp/azurerm key_vault resources. For more information see https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs > key_vault

<-- This file is autogenerated, please do not change. -->

Requirements

Name Version
terraform >=1.4
azurerm >=3.51.0, <4.0

Providers

Name Version
azurerm >=3.51.0, <4.0

Resources

Name Type
azurerm_key_vault.key_vault resource
azurerm_key_vault_secret.key_vault_secret resource

Inputs

Name Description Type Default Required
key_vault Resource definition, default settings are defined within locals and merged with var settings. For more information look at Outputs. any {} no
key_vault_secret Resource definition, default settings are defined within locals and merged with var settings. For more information look at Outputs. any {} no

Outputs

Name Description
key_vault Outputs all attributes of resource_type.
key_vault_secret Outputs all attributes of resource_type.
variables Displays all configurable variables passed by the module. default = predefined values per module. merged = result of merging the default values and custom values passed to the module

Examples

Minimal configuration to install the desired resources with the module

data "azurerm_subscription" "current" {}

resource "random_password" "password" {
  for_each = toset(["mysql_root"])

  length  = 16
  special = false
}

module "key_vault" {
  source = "registry.terraform.io/telekom-mms/key-vault/azurerm"
  key_vault = {
    kv-mms = {
      location            = "westeurope"
      resource_group_name = "rg-mms-github"
      tenant_id           = data.azurerm_subscription.current.tenant_id
    }
  }
  key_vault_secret = {
    mysql-root = {
      value        = random_password.password["mysql_root"].result
      key_vault_id = module.key_vault.key_vault["kv-mms"].id
    }
  }
}

Advanced configuration to install the desired resources with the module

data "azurerm_subscription" "current" {}

resource "random_password" "password" {
  for_each = toset(["mysql_root"])

  length  = 16
  special = false
}

module "key_vault" {
  source = "registry.terraform.io/telekom-mms/key-vault/azurerm"
  key_vault = {
    kv-mms = {
      location            = "westeurope"
      resource_group_name = "rg-mms-github"
      tenant_id           = data.azurerm_subscription.current.tenant_id
      network_acls = {
        bypass   = "AzureServices"
        ip_rules = ["172.0.0.2"]
      }
      tags = {
        project     = "mms-github"
        environment = terraform.workspace
        managed-by  = "terraform"
      }
    }
  }
  key_vault_secret = {
    mysql-root = {
      value        = random_password.password["mysql_root"].result
      key_vault_id = module.key_vault.key_vault["kv-mms"].id
      content_type = "password for mysql_root"
      tags = {
        project     = "mms-github"
        environment = terraform.workspace
        managed-by  = "terraform"
      }
    }
  }
}