acres / bin /cfn /ecs-deploy
Patrick Walukagga
Dependency updates
632bf0d
raw
history blame contribute delete
793 Bytes
#! /usr/bin/env bash
set -e # stop the execution of the script if it fails
CFN_PATH="/Users/patrickcmd/Projects/sunbirdai/Acres/infra/ecs_fargate.yml"
CONFIG_PATH="/Users/patrickcmd/Projects/sunbirdai/Acres/infra/ecs_config.toml"
echo $CFN_PATH
cfn-lint $CFN_PATH
BUCKET=$(cfn-toml key deploy.bucket -t $CONFIG_PATH)
REGION=$(cfn-toml key deploy.region -t $CONFIG_PATH)
STACK_NAME=$(cfn-toml key deploy.stack_name -t $CONFIG_PATH)
PARAMETERS=$(cfn-toml params v2 -t $CONFIG_PATH)
aws cloudformation deploy \
--stack-name $STACK_NAME \
--s3-bucket $BUCKET \
--s3-prefix acres-rag \
--region $REGION \
--template-file "$CFN_PATH" \
--no-execute-changeset \
--tags group=acres-rag \
--parameter-overrides $PARAMETERS \
--capabilities CAPABILITY_NAMED_IAM \
--profile acres