File tree Expand file tree Collapse file tree
apps/java-spring-ai-agents/scripts Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,13 +5,6 @@ echo "=============================================="
55echo " 01-setup.sh - Environment Setup"
66echo " =============================================="
77
8- # Get account ID and region
9- ACCOUNT_ID=$( aws sts get-caller-identity --query Account --output text --no-cli-pager)
10- AWS_REGION=$( aws configure get region)
11-
12- echo " Account: ${ACCOUNT_ID} "
13- echo " Region: ${AWS_REGION} "
14-
158# # Creating the environment directory
169
1710echo " "
6760 ~ /environment/backoffice/src/main/resources/application.properties
6861fi
6962
70- # Add basic variables to .envrc if not already in the environment
63+ # Verify required environment variables
7164if [ -z " ${AWS_REGION} " ]; then
72- AWS_REGION=$( aws configure get region)
65+ echo " Error: AWS_REGION is not set"
66+ exit 1
7367fi
7468if [ -z " ${ACCOUNT_ID} " ]; then
7569 ACCOUNT_ID=$( aws sts get-caller-identity --query Account --output text --no-cli-pager)
7670fi
7771
78- grep -q " AWS_REGION=" ~ /environment/.envrc 2> /dev/null || \
79- echo " export AWS_REGION=${AWS_REGION} " >> ~ /environment/.envrc
80- grep -q " ACCOUNT_ID=" ~ /environment/.envrc 2> /dev/null || \
81- echo " export ACCOUNT_ID=${ACCOUNT_ID} " >> ~ /environment/.envrc
72+ echo " Account: ${ACCOUNT_ID} "
73+ echo " Region: ${AWS_REGION} "
8274
8375# # Setting up direnv
8476
You can’t perform that action at this time.
0 commit comments