Skip to content

Commit

Permalink
Remove terraform -refresh-only commands (#586)
Browse files Browse the repository at this point in the history
  • Loading branch information
rocketnova authored Apr 19, 2024
1 parent bc61186 commit b8ab422
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/actions/configure-aws-credentials/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ runs:
echo "::group::AWS account authentication details"
terraform -chdir=infra/project-config init > /dev/null
terraform -chdir=infra/project-config apply -refresh-only -auto-approve> /dev/null
terraform -chdir=infra/project-config apply -auto-approve > /dev/null
AWS_REGION=$(terraform -chdir=infra/project-config output -raw default_region)
echo "AWS_REGION=$AWS_REGION"
GITHUB_ACTIONS_ROLE_NAME=$(terraform -chdir=infra/project-config output -raw github_actions_role_name)
echo "GITHUB_ACTIONS_ROLE_NAME=$GITHUB_ACTIONS_ROLE_NAME"
terraform -chdir=infra/${{ inputs.app_name }}/app-config init > /dev/null
terraform -chdir=infra/${{ inputs.app_name }}/app-config apply -refresh-only -auto-approve> /dev/null
terraform -chdir=infra/${{ inputs.app_name }}/app-config apply -auto-approve > /dev/null
ACCOUNT_NAME=$(terraform -chdir=infra/${{ inputs.app_name }}/app-config output -json account_names_by_environment | jq -r .${{ inputs.environment }})
echo "ACCOUNT_NAME=$ACCOUNT_NAME"
Expand Down
2 changes: 1 addition & 1 deletion bin/configure-monitoring-secret.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ENVIRONMENT=$2
INTEGRATION_ENDPOINT_URL=$3

terraform -chdir="infra/$APP_NAME/app-config" init > /dev/null
terraform -chdir="infra/$APP_NAME/app-config" apply -refresh-only -auto-approve> /dev/null
terraform -chdir="infra/$APP_NAME/app-config" apply -auto-approve > /dev/null

HAS_INCIDENT_MANAGEMENT_SERVICE=$(terraform -chdir="infra/$APP_NAME/app-config" output -raw has_incident_management_service)
if [ "$HAS_INCIDENT_MANAGEMENT_SERVICE" = "false" ]; then
Expand Down
2 changes: 1 addition & 1 deletion bin/publish-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ echo " IMAGE_TAG=$IMAGE_TAG"

# Need to init module when running in CD since GitHub actions does a fresh checkout of repo
terraform -chdir="infra/$APP_NAME/app-config" init > /dev/null
terraform -chdir="infra/$APP_NAME/app-config" apply -refresh-only -auto-approve> /dev/null
terraform -chdir="infra/$APP_NAME/app-config" apply -auto-approve > /dev/null
IMAGE_REPOSITORY_NAME=$(terraform -chdir="infra/$APP_NAME/app-config" output -raw image_repository_name)

REGION=$(./bin/current-region.sh)
Expand Down
2 changes: 1 addition & 1 deletion bin/run-database-migrations.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ echo
echo "Step 0. Check if app has a database"

terraform -chdir="infra/$APP_NAME/app-config" init > /dev/null
terraform -chdir="infra/$APP_NAME/app-config" apply -refresh-only -auto-approve> /dev/null
terraform -chdir="infra/$APP_NAME/app-config" apply -auto-approve > /dev/null
HAS_DATABASE=$(terraform -chdir="infra/$APP_NAME/app-config" output -raw has_database)
if [ "$HAS_DATABASE" = "false" ]; then
echo "Application does not have a database, no migrations to run"
Expand Down
2 changes: 1 addition & 1 deletion bin/set-up-current-account.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ ACCOUNT_ID=$(./bin/current-account-id.sh)
REGION=$(./bin/current-region.sh)

# Get project name
terraform -chdir="infra/project-config" apply -refresh-only -auto-approve> /dev/null
terraform -chdir="infra/project-config" apply -auto-approve > /dev/null
PROJECT_NAME=$(terraform -chdir=infra/project-config output -raw project_name)

TF_STATE_BUCKET_NAME="$PROJECT_NAME-$ACCOUNT_ID-$REGION-tf"
Expand Down

0 comments on commit b8ab422

Please sign in to comment.