diff --git a/jenkins-packer-demo/scripts/jenkins-run-terraform.sh b/jenkins-packer-demo/scripts/jenkins-run-terraform.sh index 24f8e29a..b6a732c6 100755 --- a/jenkins-packer-demo/scripts/jenkins-run-terraform.sh +++ b/jenkins-packer-demo/scripts/jenkins-run-terraform.sh @@ -1,9 +1,9 @@ #!/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 +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