36 lines
568 B
HCL
36 lines
568 B
HCL
terraform {
|
|
required_providers {
|
|
azurerm = {
|
|
source = "hashicorp/azurerm"
|
|
}
|
|
|
|
random = {
|
|
source = "hashicorp/random"
|
|
}
|
|
}
|
|
|
|
backend "azurerm" {}
|
|
}
|
|
|
|
provider "azurerm" {
|
|
features {}
|
|
}
|
|
|
|
resource "random_password" "user1" {
|
|
length = 12
|
|
min_lower = 1
|
|
min_upper = 1
|
|
min_numeric = 1
|
|
min_special = 1
|
|
special = true
|
|
override_special = "!@#$"
|
|
}
|
|
|
|
resource "terraform_data" "password" {
|
|
input = random_password.user1.result
|
|
}
|
|
|
|
output "user1" {
|
|
value = terraform_data.password.output
|
|
}
|