forked from bcgov/supreme-court-viewer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolved static code analysis issues found by tfsec (#10)
* - Addressed tfscan errors - Comment out s3 test bucket related code * Removed soft_fail param * Changed to tfsec-sarif-action so that errors can be seen in Security tab. * Changed codeql to v2 * Changing upload-sarif to v3 * Add github_token to pass in upload sarif file step * added sec events write permission * Add kms policy * Allow aws_kms_policy to Cloudwatch only * Add kms policy for admins and cloudwatch * Fixed ecs web td policy * Fixed incorrect reference * Removed retention days * Revert back retention days * Adjust ecs policy to separate ecr:GetAuthorizationToken * Revert Resource=* first * Add ecr repo back * Revert prevent deletion in ecr * Add ecs web td log group arn back * ignore changes from encryption_config to prevent ECR to get deleted * - Add check_changes step in deploy_infra - Rename deploy to build when build-infra wf is running * Replacing hash to tagged version as per recommendation Co-authored-by: Wade Barnes <[email protected]> * - Trigger Web CI when PR is created targeting master branch - Allow triggering of workflow via GH UI - Added lint and test step but skips it for now * - Added comments for WEB CI - Added Lint step for API CI * Changed path of API CI * Renamed to build-web and build-api * Initial changes for building web images * web yml file cleanup * Changed working dir when building docker image * Added Dockerfile.node in Web * Removed npm-force-resolutions and add permissions to /tmp/app/dist/ * Changed permissions to /opt/app-root/src * Update permission trial and error * Changed to root user * Push image to jasper gchr and pass to deploy2dev step * Separate push to another step * Move login to GCHR before docker tag * Adding logs for debugging * Rename image name * Fixed run command to us | * Changed deprecated code to new implementation * Use $image_digest * Rename WF back to App (Vue) * - Separate building web artifacts to make it reusable - Added temp code for deploy2test - Rename deploy-web to deploy-to-aws * Tweaks to missing variable references * Pass correct parameter * - Fixes to use inputs rather than env - Pass node version * Fixed indention * Moved node setup * Revert code * Fixed path * Pass the vars variable to composite action * - Renamed jasper-web to web - Declare env above runs section * Added shell: bash * display aws_account * Removed env variable * Fixed github_image_repo error * Added id-token: write * Add Deploy to TEST and PROD * - Added Web CI Workflow - Rename to deploy-web * Revert changes to API * - Moved web Dockerfile to /docker/web. - Pass node version as an argument rather than hardcoded. * Renamed to app-vue so it can be tested on feature branch * Moved --build-arg position to the front * Add major and minor node version. * Revert code changes in devcontainer.json * Add ls to see all files * Changed source file location * Run npm install as root user * Rename back to publish-web.yml * Added api ecs related resources * Allow permissions inside td log groups * Add retention days * Changed log group to api specific --------- Co-authored-by: Ronaldo Macapobre <[email protected]> Co-authored-by: Wade Barnes <[email protected]>
- Loading branch information
1 parent
cc5e407
commit 7fbb9d4
Showing
17 changed files
with
270 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
output "ecr_url" { | ||
value = try(aws_ecr_repository.ecr_repository.repository_url, "") | ||
} | ||
|
||
output "ecr_repository_arn" { | ||
value = aws_ecr_repository.ecr_repository.arn | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,13 @@ | ||
resource "aws_cloudwatch_log_group" "ecs_web_td_log_group" { | ||
name = "${var.app_name}-ecs-web-td-log-group-${var.environment}" | ||
name = "/aws/ecs/${var.app_name}-ecs-web-td-log-group-${var.environment}" | ||
retention_in_days = 90 | ||
|
||
kms_key_id = var.kms_key_arn | ||
} | ||
|
||
resource "aws_cloudwatch_log_group" "ecs_api_td_log_group" { | ||
name = "/aws/ecs/${var.app_name}-ecs-api-td-log-group-${var.environment}" | ||
retention_in_days = 90 | ||
|
||
kms_key_id = var.kms_key_arn | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,15 @@ | ||
output "ecs_web_td_log_group_name" { | ||
value = aws_cloudwatch_log_group.ecs_web_td_log_group.name | ||
} | ||
|
||
output "ecs_web_td_log_group_arn" { | ||
value = aws_cloudwatch_log_group.ecs_web_td_log_group.arn | ||
} | ||
|
||
output "ecs_api_td_log_group_name" { | ||
value = aws_cloudwatch_log_group.ecs_api_td_log_group.name | ||
} | ||
|
||
output "ecs_api_td_log_group_arn" { | ||
value = aws_cloudwatch_log_group.ecs_api_td_log_group.arn | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.