From 96133ffe2c83a82ebcfae650f60aaf086d3cf86c Mon Sep 17 00:00:00 2001 From: Dmitry Kireev Date: Wed, 20 Jan 2021 18:01:50 +0200 Subject: [PATCH] Pass profile to the proxy command. --- variables.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/variables.tf b/variables.tf index bd544a3..9dba0f1 100644 --- a/variables.tf +++ b/variables.tf @@ -41,7 +41,7 @@ variable "allowed_cidr_blocks" { locals { name = "${var.env}-bastion" proxycommand = <<-EOT - ProxyCommand sh -c "aws ssm start-session --target %h --document-name AWS-StartSSHSession --parameters 'portNumber=%p'" + ProxyCommand sh -c "aws --profile=${var.aws_profile} ssm start-session --target %h --document-name AWS-StartSSHSession --parameters 'portNumber=%p'" EOT ssh_config = concat([ "# SSH over Session Manager",