output load balancer dns name

This commit is contained in:
J Cole Morrison 2020-04-15 20:26:52 -07:00
parent 09323580c8
commit 97a39ed3dc
2 changed files with 5 additions and 0 deletions

View File

@ -4,3 +4,7 @@
aws --profile ${AWS_PROFILE} --region ${AWS_REGION} s3 cp s3://${AWS_S3_BUCKET}/vault_creds_encrypted ./temp/vault_creds_encrypted
aws --profile ${AWS_PROFILE} --region ${AWS_REGION} kms decrypt --key-id ${AWS_KMS_KEY_ID} --ciphertext-blob fileb://temp/vault_creds_encrypted --output text --query Plaintext | base64 --decode > ./temp/vault_creds_decrypted
echo "Vault crednetials decrypted. Find them at ./temp/vault_creds_decrypted"
echo "----"
echo "Load Balancer DNS Name: ${LOAD_BALANCER_DNS_NAME}"

View File

@ -19,6 +19,7 @@ resource "local_file" "vault_credentials" {
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"
}