HC-vault-on-aws-FORK/outputs.tf

24 lines
997 B
Terraform
Raw Normal View History

# Here for debugging the compiled userdata.sh file.
resource "local_file" "userdata_compiled" {
content = templatefile("${path.module}/files/userdata_template.sh", {
VAULT_VERSION = var.vault_version
VAULT_CLUSTER_NAME = var.main_project_tag
2020-04-14 01:31:14 +00:00
VAULT_DNS = var.domain_name
VAULT_KMS_KEY_ID = aws_kms_key.seal.key_id
VAULT_CLUSTER_REGION = data.aws_region.current.name
VAULT_DYNAMODB_TABLE = var.dynamodb_table_name # dynamodb resource doesn't return name....
VAULT_S3_BUCKET_NAME = aws_s3_bucket.vault_data.id
})
filename = "${path.module}/tmp/userdata_compiled.sh"
}
# Output the vault credentials script
resource "local_file" "vault_credentials" {
content = templatefile("${path.module}/files/vault_credentials_template.sh", {
AWS_PROFILE = var.aws_profile
AWS_REGION = data.aws_region.current.name
AWS_S3_BUCKET = aws_s3_bucket.vault_data.id
AWS_KMS_KEY_ID = aws_kms_key.seal.key_id
})
filename = "${path.module}/tmp/vault_credentials.sh"
}