Skip to content

Commit

Permalink
fix TF long name to shorter name (#47)
Browse files Browse the repository at this point in the history
fix TF bucket and table name to lower case

Co-authored-by: Zahi Ben Shabat <zshabat@amazon.com>
  • Loading branch information
z-sourcecode and Zahi Ben Shabat authored Oct 13, 2023
1 parent b0442cf commit 60e6657
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ do
fi

# Create bucket for state and resource group
ENV_IDENTIFIER="$TARGET_ENV_NAME-$PREFIX-$TARGET_ENV_PROVIDER_NAME-$APP_NAME"
STATE_BUCKET_NAME="opa-tf-state-bucket-$ENV_IDENTIFIER"
ENV_IDENTIFIER=$(echo "$PREFIX-$TARGET_ENV_PROVIDER_NAME-$APP_NAME" | tr '[:upper:]' '[:lower:]')
STATE_BUCKET_NAME="opa-tf-state-$ENV_IDENTIFIER"
# limit bucket name to 63 characters max
STATE_BUCKET_NAME=$(echo "${STATE_BUCKET_NAME:0:63}")
echo "STATE_BUCKET_NAME for $TARGET_ENV_PROVIDER_NAME is $STATE_BUCKET_NAME"
Expand Down

0 comments on commit 60e6657

Please sign in to comment.