diff --git a/bin/account-ids-by-name.sh b/bin/account-ids-by-name.sh index a12df150..a79c3e66 100755 --- a/bin/account-ids-by-name.sh +++ b/bin/account-ids-by-name.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Prints a JSON dictionary that maps account names to account ids for the list # of accounts given by the terraform backend files of the form # ..s3.tfbackend in the infra/accounts directory. diff --git a/bin/check-database-roles.sh b/bin/check-database-roles.sh index fd192617..fed12b08 100755 --- a/bin/check-database-roles.sh +++ b/bin/check-database-roles.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # ----------------------------------------------------------------------------- # Script that invokes the database role-manager AWS Lambda function to check # that the Postgres users were configured properly. diff --git a/bin/check-github-actions-auth.sh b/bin/check-github-actions-auth.sh index 2c5ec695..3f0c1f5a 100755 --- a/bin/check-github-actions-auth.sh +++ b/bin/check-github-actions-auth.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -euo pipefail GITHUB_ACTIONS_ROLE=$1 diff --git a/bin/configure-monitoring-secret.sh b/bin/configure-monitoring-secret.sh index b91a84f7..1ba00d27 100755 --- a/bin/configure-monitoring-secret.sh +++ b/bin/configure-monitoring-secret.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # ----------------------------------------------------------------------------- # This script creates SSM parameter for storing integration URL for incident management # services. Script creates new SSM attribute or updates existing. diff --git a/bin/create-or-update-database-roles.sh b/bin/create-or-update-database-roles.sh index af98f25a..99b9c4f4 100755 --- a/bin/create-or-update-database-roles.sh +++ b/bin/create-or-update-database-roles.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # ----------------------------------------------------------------------------- # Script that invokes the database role-manager AWS Lambda function to create # or update the Postgres user roles for a particular environment. diff --git a/bin/create-tfbackend.sh b/bin/create-tfbackend.sh index b2887758..37fa46ed 100755 --- a/bin/create-tfbackend.sh +++ b/bin/create-tfbackend.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # ----------------------------------------------------------------------------- # This script creates a terraform backend config file for a terraform module. # It is not meant to be used directly. Instead, it is called by other scripts diff --git a/bin/current-account-alias.sh b/bin/current-account-alias.sh index f7003fc3..3d66b0fa 100755 --- a/bin/current-account-alias.sh +++ b/bin/current-account-alias.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Print the current AWS account alias set -euo pipefail echo -n "$(aws iam list-account-aliases --query "AccountAliases" --max-items 1 --output text)" diff --git a/bin/current-account-config-name.sh b/bin/current-account-config-name.sh index f7bd3b1c..e187a751 100755 --- a/bin/current-account-config-name.sh +++ b/bin/current-account-config-name.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Print the config name for the current AWS account # Do this by getting the current account and searching for a file in # infra/accounts that matches "..s3.tfbackend". diff --git a/bin/current-account-id.sh b/bin/current-account-id.sh index 92f368bf..f9edf363 100755 --- a/bin/current-account-id.sh +++ b/bin/current-account-id.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Print the current AWS account id set -euo pipefail echo -n "$(aws sts get-caller-identity --query "Account" --output text)" diff --git a/bin/current-region.sh b/bin/current-region.sh index c25b2c11..4d629263 100755 --- a/bin/current-region.sh +++ b/bin/current-region.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Print the current AWS region set -euo pipefail echo -n "$(aws configure list | grep region | awk '{print $2}')" diff --git a/bin/deploy-release.sh b/bin/deploy-release.sh index a5cf2219..4b112e8a 100755 --- a/bin/deploy-release.sh +++ b/bin/deploy-release.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -euo pipefail APP_NAME=$1 diff --git a/bin/lint-markdown.sh b/bin/lint-markdown.sh index d70a06e3..4d6486bb 100755 --- a/bin/lint-markdown.sh +++ b/bin/lint-markdown.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # To make things simpler, ensure we're in the repo's root directory (one directory up) before # running, regardless where the user is when invoking this script. diff --git a/bin/publish-release.sh b/bin/publish-release.sh index a835c12a..56021a32 100755 --- a/bin/publish-release.sh +++ b/bin/publish-release.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -euo pipefail diff --git a/bin/run-command.sh b/bin/run-command.sh index 304ff505..84b9b1c6 100755 --- a/bin/run-command.sh +++ b/bin/run-command.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # ----------------------------------------------------------------------------- # Run an application command using the application image # diff --git a/bin/run-database-migrations.sh b/bin/run-database-migrations.sh index 3c81ebcb..c90d19b1 100755 --- a/bin/run-database-migrations.sh +++ b/bin/run-database-migrations.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # ----------------------------------------------------------------------------- # Run database migrations # 1. Update the application's task definition with the latest build, but diff --git a/bin/set-up-current-account.sh b/bin/set-up-current-account.sh index b253c0fe..6f5171e3 100755 --- a/bin/set-up-current-account.sh +++ b/bin/set-up-current-account.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # ----------------------------------------------------------------------------- # This script sets up the terraform backend for the AWS account that you are # currently authenticated into and creates the terraform backend config file. diff --git a/bin/terraform-apply.sh b/bin/terraform-apply.sh index dc6f8fc0..4de1cb0c 100755 --- a/bin/terraform-apply.sh +++ b/bin/terraform-apply.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # ----------------------------------------------------------------------------- # Convenience script for running terraform apply for the specified module and configuration name. # The configuration name is used to determine which .tfvars file to use for the -var-file diff --git a/bin/terraform-init-and-apply.sh b/bin/terraform-init-and-apply.sh index 70896ceb..5c574c3d 100755 --- a/bin/terraform-init-and-apply.sh +++ b/bin/terraform-init-and-apply.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # ----------------------------------------------------------------------------- # Convenience script for running terraform init followed by terraform apply # See ./bin/terraform-init.sh and ./bin/terraform-apply.sh for more details. diff --git a/bin/terraform-init.sh b/bin/terraform-init.sh index 7cc22fdf..13626101 100755 --- a/bin/terraform-init.sh +++ b/bin/terraform-init.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # ----------------------------------------------------------------------------- # Convenience script for running terraform init for the specified module and configuration name. # The configuration name is used to determine which .tfbackend file to use for the -backend-config diff --git a/template-only-bin/destroy-account.sh b/template-only-bin/destroy-account.sh index f3e58e05..25bb2b38 100755 --- a/template-only-bin/destroy-account.sh +++ b/template-only-bin/destroy-account.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Do not use this script on your project. This script is only used for testing # the platform bootstrap process. set -euxo pipefail diff --git a/template-only-bin/destroy-app-build-repository.sh b/template-only-bin/destroy-app-build-repository.sh index 72ef06e7..afe3e936 100755 --- a/template-only-bin/destroy-app-build-repository.sh +++ b/template-only-bin/destroy-app-build-repository.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Do not use this script on your project. This script is only used for testing # the platform bootstrap process. set -euxo pipefail diff --git a/template-only-bin/destroy-app-service.sh b/template-only-bin/destroy-app-service.sh index 8e371728..2fb91d43 100755 --- a/template-only-bin/destroy-app-service.sh +++ b/template-only-bin/destroy-app-service.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Do not use this script on your project. This script is only used for testing # the platform bootstrap process. set -euxo pipefail diff --git a/template-only-bin/destroy-network.sh b/template-only-bin/destroy-network.sh index d2130c35..9d8071de 100755 --- a/template-only-bin/destroy-network.sh +++ b/template-only-bin/destroy-network.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Do not use this script on your project. This script is only used for testing # the platform bootstrap process. set -euxo pipefail diff --git a/template-only-bin/download-and-install-template.sh b/template-only-bin/download-and-install-template.sh index ce4c12fa..ee893af0 100755 --- a/template-only-bin/download-and-install-template.sh +++ b/template-only-bin/download-and-install-template.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -euo pipefail echo "Fetch latest version of template-infra" diff --git a/template-only-bin/install-template.sh b/template-only-bin/install-template.sh index 69ba395c..284bfcc0 100755 --- a/template-only-bin/install-template.sh +++ b/template-only-bin/install-template.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This script installs the template-infra to your project. Run # This script from your project's root directory. diff --git a/template-only-bin/set-up-project.sh b/template-only-bin/set-up-project.sh index ec8859c0..8af35184 100755 --- a/template-only-bin/set-up-project.sh +++ b/template-only-bin/set-up-project.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -euo pipefail PROJECT_NAME=$1 diff --git a/template-only-bin/update-template.sh b/template-only-bin/update-template.sh index 2acf18b5..642fb8ce 100755 --- a/template-only-bin/update-template.sh +++ b/template-only-bin/update-template.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # ----------------------------------------------------------------------------- # This script updates template-infra in your project. Run # This script from your project's root directory.