Skip to content

Instantly share code, notes, and snippets.

@jungopro
Created October 5, 2018 18:14
resource "random_string" "password" {
length = 14
min_upper = 2
min_lower = 2
min_numeric = 2
min_special = 2
}
resource "azurerm_key_vault_secret" "secret" {
name = "${var.secret_name}"
value = "${random_string.password.result}"
vault_uri = "${var.vault_uri}"
tags {
environment = "${var.resource_group_name}"
}
}
output "password_result" {
value = "${random_string.password.result}"
}
output "secrets" {
value = ["${azurerm_key_vault_secret.secret.*.value}"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment