Skip to content

Commit

Permalink
fix stage deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
casey-rapnicki-bixal committed Nov 18, 2024
1 parent 0104095 commit 632993b
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/terraform-deploy-infra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,17 @@ jobs:
uses: actions/checkout@v4
- name: Set env.BRANCH
run: |
BRANCH=develop
#BRANCH=$(echo $GITHUB_REF | cut -d'/' -f 3)
BRANCH=$(echo $GITHUB_REF | cut -d'/' -f 3)
case ${BRANCH} in
develop)
CF_SPACE="dev"
;;
main)
CF_SPACE="prod"
;;
stage)
CF_SPACE="staging"
;;
esac
echo "BRANCH=${BRANCH}" >> $GITHUB_ENV
echo "CF_SPACE=${CF_SPACE}" >> $GITHUB_ENV
Expand Down
31 changes: 31 additions & 0 deletions terraform/infra/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,37 @@ locals {
)
}

#################################
##
## __ _
## / _\ |_ __ _ __ _ ___
## \ \| __/ _` |/ _` |/ _ \
## _\ \ || (_| | (_| | __/
## \__/\__\__,_|\__, |\___|
## |___/
##
#################################

stage = merge(
{
## Applications to deploy.
apps = local.globals.apps
services = local.globals.services
},
{
## Passwords that need to be generated for this environment.
## These will actually use the sha256 result from the random module.
passwords = {
hash_salt = {
length = 32
}
cron_key = {
length = 32
}
}
}
)

## Map of the 'all' environement and the current workspace settings.
env = merge(try(local.envs.all, {}), try(local.envs[terraform.workspace], {}))

Expand Down

0 comments on commit 632993b

Please sign in to comment.