Skip to content

Commit

Permalink
update to aadd file label
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Jun 23, 2022
1 parent 0a0d06d commit 8628cc8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vpn/vpn-config.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ locals {
site = v.site
environment = lookup(v, "environment", "")
sequence = lookup(v, "sequence", "")
file_label = join("-", compact([v.site, lookup(v, "environment", ""), lookup(v, "sequence", "")]))
label = lookup(v, "label", var.vpc_full_name)
full_label = format("aws:%v:%v:%v:%v", local.region, local.account_id, aws_vpn_connection.vpn[k].id, lookup(v, "label", var.vpc_full_name))
customer_address = aws_customer_gateway.vpn[k].ip_address
Expand Down Expand Up @@ -40,7 +41,7 @@ resource "null_resource" "generate_configs" {
}
provisioner "local-exec" {
working_dir = "${path.root}/vpn-configs"
command = "aws ec2 get-vpn-connection-device-sample-configuration --vpn-connection-id ${each.value.vpn_connection_id} --vpn-connection-device-type-id 48548f98 --internet-key-exchange-version ikev1 --output text > ${each.value.label}.${each.value.vpn_connection_id}.txt"
command = "aws ec2 get-vpn-connection-device-sample-configuration --vpn-connection-id ${each.value.vpn_connection_id} --vpn-connection-device-type-id 48548f98 --internet-key-exchange-version ikev1 --output text > ${each.value.file_label}.${each.value.vpn_connection_id}.txt"
environment = {
AWS_PROFILE = var.profile
AWS_REGION = local.region
Expand Down

0 comments on commit 8628cc8

Please sign in to comment.