Skip to content

Commit

Permalink
Created DynamoDb to create openshift user
Browse files Browse the repository at this point in the history
Wait for dynamo_db module before kms executes

Wait for dynamo_db module before kms executes

- Removed jasper-aws-bootstrap-stack
- Updated openshift templates to handle different target env

Moved kms key policy to the main stack

Removed recovery window for secrets manager

Pass kms_key_id

Reference initial stack to the main stack

test

- Update build infra to follow initial and main stack
- Rearrange initial stack to be on main.tf
- Target "initial" the initial module so that it gets deployed first

Fixed compile errors

Append working dir for tfsec variable

Added id-token write

Added missing permissions in for tfsec

Refactor publish infra pipeline

Fixed repo name

Updated update-aws-cred script to consider different env secrets

Update image-tag reference

Removed aws_api_gateway_account depends_on

Added db_subnet_group

Added depends_on

Use db_subnet_group name

Uncomment job to deploy web/api to test env

Upgrade to .net 9.x

- Include .net dependency upgrades recommended by dependabot.

Signed-off-by: Wade Barnes <[email protected]>

Update build/test workflows to .net 9

Signed-off-by: Wade Barnes <[email protected]>

Additional .net dependency updates

- Update recommendations provided by dependabot

Signed-off-by: Wade Barnes <[email protected]>

build: remove vue compat
build: utilize bootstrap-vue-next
refactor: utilize new styling framework

refactor: remove commented code

fix: sonarcloud issues

refactor: add back in missing disabled logic on date input

fix: documents not loading

fix: change target back to https

build: add vuetify
build: remove sass
build: remove bcgov theme
refactor: comment out use of scss files

build: add vuetify
build: remove sass
build: remove bcgov theme
refactor: comment out use of scss files

build: add vuetify
build: remove sass
build: remove bcgov theme
refactor: comment out use of scss files

refactor: remove comments

refactor: target http

Use node 18

cleanup
  • Loading branch information
Ronaldo Macapobre committed Dec 13, 2024
1 parent 33ddc41 commit 66d332e
Show file tree
Hide file tree
Showing 69 changed files with 1,050 additions and 1,326 deletions.
134 changes: 0 additions & 134 deletions .github/workflows/aws-bootstrap-template.yml

This file was deleted.

134 changes: 0 additions & 134 deletions .github/workflows/aws-template-terraform.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/build-and-test-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

strategy:
matrix:
dotnet-major-version: [8]
dotnet-major-version: [9]
dotnet-minor-version: [0]

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

strategy:
matrix:
node-version: [12.x]
node-version: [18.x]
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
93 changes: 74 additions & 19 deletions .github/workflows/build-infra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,79 @@ on:
- test
- prod

jobs:
build-initial:
uses: ./.github/workflows/aws-template-terraform.yml
with:
CONTEXT_FOLDER: "./infrastructure/cloud/environments/initial"
TF_VARS_CONFIG_FOLDER: "../${{ inputs.environment || 'dev' }}"
CHANGE_FOLDER_NAME: environments/${{ inputs.environment || 'dev' }}
ENVIRONMENT_NAME: ${{ inputs.environment || 'dev' }}
APPLY_TF_CODE: false
secrets: inherit
env:
WORKING_DIRECTORY: "./infrastructure/cloud/environments/${{ inputs.environment }}"

jobs:
build:
needs: [build-initial]
uses: ./.github/workflows/aws-template-terraform.yml
with:
CONTEXT_FOLDER: "./infrastructure/cloud/environments/${{ inputs.environment || 'dev' }}"
TF_VARS_CONFIG_FOLDER: "."
CHANGE_FOLDER_NAME: environments/${{ inputs.environment || 'dev' }}
ENVIRONMENT_NAME: ${{ inputs.environment || 'dev' }}
APPLY_TF_CODE: false
secrets: inherit
runs-on: ubuntu-latest
environment:
name: ${{ inputs.environment }}
env:
TF_VAR_app_name: ${{ vars.APP_NAME }}
TF_VAR_environment: ${{ vars.ENVIRONMENT_NAME }}
TF_VAR_kms_key_name: ${{ vars.KMS_KEY_NAME }}
TF_VAR_vpc_id: ${{ vars.VPC_ID }}
TF_VAR_lambda_memory_size: ${{ vars.LAMBDA_MEMORY_SIZE }}
permissions:
id-token: write
actions: read
contents: read
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: tfsec
uses: aquasecurity/[email protected]
with:
sarif_file: tfsec.sarif
working_directory: ${{ env.WORKING_DIRECTORY }}
tfsec_args: "--tfvars-file=${{ env.WORKING_DIRECTORY }}/${{ inputs.environment }}.tfvars"

- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: tfsec.sarif

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-skip-session-tagging: true
aws-region: ${{ vars.AWS_REGION }}
role-to-assume: ${{ vars.AWS_ROLE_ARN }}
role-duration-seconds: 1800
role-session-name: ci-deployment

- name: Setup Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.9.0

- name: Terraform Init
id: init
run: |
terraform init -input=false -backend-config=backend.tfvars -var-file=${{ inputs.environment }}.tfvars
working-directory: ${{ env.WORKING_DIRECTORY }}

- name: Terraform Plan (Initial Stack)
id: plan-initial
run: |
terraform plan -target=module.initial -no-color -input=false -var-file=${{ inputs.environment }}.tfvars
continue-on-error: true
working-directory: ${{ env.WORKING_DIRECTORY }}

- name: Terraform Plan (Initial) Status
if: steps.plan-initial.outcome == 'failure'
run: exit 1

- name: Terraform Plan (Main Stack)
id: plan-main
run: |
terraform plan -no-color -input=false -var-file=${{ inputs.environment }}.tfvars
continue-on-error: true
working-directory: ${{ env.WORKING_DIRECTORY }}

- name: Terraform Plan (Main) Status
if: steps.plan-main.outcome == 'failure'
run: exit 1
Loading

0 comments on commit 66d332e

Please sign in to comment.