diff --git a/codebuild/buildspec.yml b/codebuild/buildspec.yml index 55051c8..a886ac8 100644 --- a/codebuild/buildspec.yml +++ b/codebuild/buildspec.yml @@ -30,6 +30,7 @@ phases: on-failure: ABORT commands: - echo "Installing terraform ${TF_VERSION}..." + - mkdir -p "$TF_PLUGIN_CACHE_DIR" /root/.terraform.d/plugin-cache - | curl -sLo /tmp/tf.zip "https://releases.hashicorp.com/terraform/${TF_VERSION}/terraform_${TF_VERSION}_linux_amd64.zip" - unzip -q /tmp/tf.zip -d /usr/local/bin && rm /tmp/tf.zip @@ -40,7 +41,6 @@ phases: - tf --version - pip3 install --quiet requests - echo "Warming provider cache from S3..." - - mkdir -p "$TF_PLUGIN_CACHE_DIR" /root/.terraform.d/plugin-cache - aws s3 sync "${PROVIDER_CACHE_S3}/" "$TF_PLUGIN_CACHE_DIR/" --region "$PROVIDER_CACHE_S3_REGION" --quiet || true pre_build: @@ -72,7 +72,6 @@ phases: tf init -input=false fi - tf workspace select "$TF_WORKSPACE" echo "Active workspace: $(tf workspace show)" build: