Files
nomad/e2e/terraform/main.tf
Tim Gross a29f9b6fc0 keyring: E2E testing for KMS/rotation (#23601)
In #23580 we're implementing support for encrypting Nomad's key material with
external KMS providers or Vault Transit. This changeset breaks out the E2E
infrastructure and testing from that PR to keep the review manageable.

Ref: https://hashicorp.atlassian.net/browse/NET-10334
Ref: https://github.com/hashicorp/nomad/issues/14852
Ref: https://github.com/hashicorp/nomad/pull/23580
2024-07-19 13:49:48 -04:00

35 lines
647 B
HCL

# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: BUSL-1.1
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"
}
data "aws_kms_alias" "e2e" {
name = "alias/${var.aws_kms_alias}"
}