github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/e2e/terraform/main.tf (about)

     1  provider "aws" {
     2    region = var.region
     3  }
     4  
     5  data "aws_caller_identity" "current" {
     6  }
     7  
     8  resource "random_pet" "e2e" {
     9  }
    10  
    11  resource "random_password" "windows_admin_password" {
    12    length           = 20
    13    special          = true
    14    override_special = "_%@"
    15  }
    16  
    17  locals {
    18    random_name = "${var.name}-${random_pet.e2e.id}"
    19  }
    20  
    21  # Generates keys to use for provisioning and access
    22  module "keys" {
    23    name    = local.random_name
    24    path    = "${path.root}/keys"
    25    source  = "mitchellh/dynamic-keys/aws"
    26    version = "v2.0.0"
    27  }