2018-12-17 17:40:09 +00:00
|
|
|
provider "aws" {
|
2019-10-14 15:27:08 +00:00
|
|
|
region = var.region
|
2018-12-17 17:40:09 +00:00
|
|
|
}
|
|
|
|
|
2020-08-26 21:00:36 +00:00
|
|
|
data "aws_caller_identity" "current" {
|
|
|
|
}
|
|
|
|
|
2019-10-14 15:27:08 +00:00
|
|
|
resource "random_pet" "e2e" {
|
|
|
|
}
|
2018-12-17 17:40:09 +00:00
|
|
|
|
2019-11-19 16:06:10 +00:00
|
|
|
resource "random_password" "windows_admin_password" {
|
|
|
|
length = 20
|
|
|
|
special = true
|
|
|
|
override_special = "_%@"
|
|
|
|
}
|
|
|
|
|
2018-12-17 17:40:09 +00:00
|
|
|
locals {
|
|
|
|
random_name = "${var.name}-${random_pet.e2e.id}"
|
|
|
|
}
|
|
|
|
|
|
|
|
# Generates keys to use for provisioning and access
|
|
|
|
module "keys" {
|
2019-10-14 15:27:08 +00:00
|
|
|
name = local.random_name
|
|
|
|
path = "${path.root}/keys"
|
|
|
|
source = "mitchellh/dynamic-keys/aws"
|
|
|
|
version = "v2.0.0"
|
2018-12-17 17:40:09 +00:00
|
|
|
}
|