open-nomad/e2e/terraform/main.tf
Tim Gross 70c262eb95
E2E: terraform provisioner upgrades (#12652)
While working on infrastructure for testing the UI in E2E, we needed
to upgrade the certificate provider. Performing a provider upgrade via
the TF `init -upgrade` brought in updates for the file and AWS
providers as well. These updates include deprecating the use of
`sensitive_content` fields, removing CA algorithm parameters that can
be inferred from keys, and removing the requirement to manually
specify AWS assume role parameters in the provider config if they're
available in the calling environment's AWS config file (as they are
via doormat or our E2E environment).
2022-04-19 14:27:14 -04:00

28 lines
508 B
HCL

provider "aws" {
region = var.region
}
data "aws_caller_identity" "current" {
}
resource "random_pet" "e2e" {
}
resource "random_password" "windows_admin_password" {
length = 20
special = true
override_special = "_%@"
}
locals {
random_name = "${var.name}-${random_pet.e2e.id}"
}
# Generates keys to use for provisioning and access
module "keys" {
name = local.random_name
path = "${path.root}/keys"
source = "mitchellh/dynamic-keys/aws"
version = "v2.0.0"
}