-
Notifications
You must be signed in to change notification settings - Fork 59
/
outputs.tf
44 lines (38 loc) · 1.32 KB
/
outputs.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Here for debugging the compiled userdata.sh file.
resource "local_file" "userdata_compiled" {
content = templatefile("${path.root}/files/userdata_template.sh", {
VAULT_VERSION = var.vault_version
VAULT_CLUSTER_NAME = var.main_project_tag
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.root}/temp/userdata_compiled.sh"
}
# Output the vault credentials script
resource "local_file" "vault_credentials" {
content = templatefile("${path.root}/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
LOAD_BALANCER_DNS_NAME = aws_lb.alb.dns_name
})
filename = "${path.root}/temp/vault_credentials.sh"
}
# Load Balancer DNS - You need to CNAME or Alias this.
output "load_balancer_dns" {
value = aws_lb.alb.dns_name
}
# VPC Values
output "vpc_id" {
value = aws_vpc.vault.id
}
output "vpc_ipv4_cidr" {
value = aws_vpc.vault.cidr_block
}
output "vpc_ipv6_cidr" {
value = aws_vpc.vault.ipv6_cidr_block
}