From c6575f229b2e863d0c08e095f47773dc33c40d68 Mon Sep 17 00:00:00 2001 From: jasvinder-DevOps <64634830+jasvinder-DevOps@users.noreply.github.com> Date: Mon, 11 May 2020 03:22:40 +0530 Subject: [PATCH 1/2] Update jenkins-run-terraform.sh --- jenkins-packer-demo/scripts/jenkins-run-terraform.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins-packer-demo/scripts/jenkins-run-terraform.sh b/jenkins-packer-demo/scripts/jenkins-run-terraform.sh index 24f8e29a..e4b28cb4 100755 --- a/jenkins-packer-demo/scripts/jenkins-run-terraform.sh +++ b/jenkins-packer-demo/scripts/jenkins-run-terraform.sh @@ -1,6 +1,6 @@ #!/bin/bash set -ex -AWS_REGION="eu-west-1" +AWS_REGION="us-west-2" cd jenkins-packer-demo S3_BUCKET=`aws s3 ls --region $AWS_REGION |grep terraform-state |tail -n1 |cut -d ' ' -f3` sed -i 's/terraform-state-xx70dpnh/'${S3_BUCKET}'/' backend.tf From 8e710f160c44fda8d2294a4395bc4a638a1db9ad Mon Sep 17 00:00:00 2001 From: jasvinder-DevOps <64634830+jasvinder-DevOps@users.noreply.github.com> Date: Mon, 11 May 2020 03:47:23 +0530 Subject: [PATCH 2/2] Update jenkins-run-terraform.sh --- jenkins-packer-demo/scripts/jenkins-run-terraform.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins-packer-demo/scripts/jenkins-run-terraform.sh b/jenkins-packer-demo/scripts/jenkins-run-terraform.sh index e4b28cb4..b6a732c6 100755 --- a/jenkins-packer-demo/scripts/jenkins-run-terraform.sh +++ b/jenkins-packer-demo/scripts/jenkins-run-terraform.sh @@ -3,7 +3,7 @@ set -ex AWS_REGION="us-west-2" cd jenkins-packer-demo S3_BUCKET=`aws s3 ls --region $AWS_REGION |grep terraform-state |tail -n1 |cut -d ' ' -f3` -sed -i 's/terraform-state-xx70dpnh/'${S3_BUCKET}'/' backend.tf +sed -i 's/terraform-state-yee5uc6z/'${S3_BUCKET}'/' backend.tf sed -i 's/#//g' backend.tf aws s3 cp s3://${S3_BUCKET}/amivar.tf amivar.tf --region $AWS_REGION terraform init