-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from nearform/current
Several changes version v0.1.1
- Loading branch information
Showing
44 changed files
with
775 additions
and
365 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
charset = utf-8 | ||
trim_trailing_whitespace = false | ||
insert_final_newline = false |
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,6 @@ | ||
.terraform | ||
*.tfplan | ||
*.pem | ||
*.zip | ||
*.zip | ||
|
||
.idea |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# See https://github.com/gruntwork-io/pre-commit | ||
# Will need to install some pre-requisites | ||
# pre-commit https://pre-commit.com/#install | ||
# tflint https://github.com/terraform-linters/tflint/ | ||
# Can then install with | ||
# pre-commit install | ||
# Can do a manual run with | ||
# pre-commit run | ||
|
||
repos: | ||
- repo: https://github.com/gruntwork-io/pre-commit | ||
rev: v0.1.9 # Get the latest from: https://github.com/gruntwork-io/pre-commit/releases | ||
hooks: | ||
- id: terraform-fmt | ||
- id: tflint | ||
args: ["--deep", "--module"] |
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Change Log | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
## [Unreleased] | ||
- Added: ALB logging - both ALBs log to the same bucket, using distinct prefixes - api and push | ||
- Updated: Upgraded AWS provider from = 2.68.0 to ~> 2.70.0 | ||
- Updated: Switched to using templatefile function rather than deprecated template provider | ||
|
||
|
||
## [v0.1.1] 2020-08-13 | ||
- Added: Added ability to set ECS image url and image tag overrides, this is based on @segfault's PR at https://github.com/covidgreen/covid-green-infra/pull/4 | ||
- Updated: Switched lambdas from using the AWSLambdaBasicExecutionRole to AWSLambdaVPCAccessExecutionRole managed policy | ||
- Updated: Renamed the "root_profile" var and "root" AWS provider to "dns" as this is confusing, removed a redundant aws provider "root_us" | ||
- Updated: Added changes @segfault added re explicit usage of the AWS CLI `--output json` usage in some of the scripts | ||
- Removed: Removed Terraform validate from the pre-commit hook config as this is being used as a module, have left the s3 backend config for now | ||
- Updated: Switched all the lambdas from nodejs10.x to nodejs12.x | ||
- Added: Use variables for the lambda memory size and timeout attributes with defaults, so we can configure via env-vars files | ||
- Removed: Extracted cti, gct and ni content into specific repos - Will not be managed by this repo | ||
- Added: Added new AWS parameters certificate_audience and jwt_issuer and removed security_exposure_limit AWS parameter | ||
- Added: Docs on the 2 approaches to managing a project - external to this repo and internal to this repo | ||
- Added: Added RDS reader/writer endpoint outputs | ||
- Added: Surfaced bastion ASG desired count as a variable, will need when we use this repo as a module | ||
- Added: Switched to using path.module prefixes for the CloudWatch dashboard template and the ECS container defintion templates | ||
- Fixed: Changed the create TF store backend script to cater for us-east-1 being a special case - Location constraints | ||
- Fixed: Replace all refs to cti, gct and ni with xyz in docs and shell script comments - this is just prep for the open source branch | ||
- Added: Added the following optional lambdas to the operators group execute list: daily-registrations-reporter, download and upload | ||
- Added: Pre-commit hook to include TF fmt, validation and linting | ||
- Fixed: Linting issues - no logic | ||
- Added: Split RDS user usage so we no longer need to use the master credentials | ||
|
||
|
||
## [v0.1.0] 2020-08-13 | ||
- Initial content |
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,25 +1,21 @@ | ||
data "template_file" "dashboard" { | ||
template = file("templates/dashboard.json") | ||
|
||
vars = { | ||
account_id = data.aws_caller_identity.current.account_id | ||
region = var.aws_region | ||
environment = var.environment | ||
gateway_name = "${module.labels.id}-gw" | ||
ecs_cluster_name = module.labels.id | ||
ecs_push_service_name = aws_ecs_service.push.name | ||
ecs_api_service_name = aws_ecs_service.api.name | ||
rds_db_cluster_name = module.rds_cluster_aurora_postgres.cluster_identifier | ||
lambda_token_fn_name = "${module.labels.id}-token" | ||
lambda_cso_fn_name = "${module.labels.id}-cso" | ||
lambda_stats_fn_name = "${module.labels.id}-stats" | ||
api_lb_arn_suffix = aws_lb.api.arn_suffix | ||
push_lb_arn_suffix = aws_lb.push.arn_suffix | ||
api_log_group = "${module.labels.id}-api" | ||
} | ||
} | ||
|
||
resource "aws_cloudwatch_dashboard" "monitoring_alarms_dashboard" { | ||
dashboard_name = module.labels.id | ||
dashboard_body = data.template_file.dashboard.rendered | ||
} | ||
|
||
dashboard_body = templatefile(format("%s/templates/dashboard.json", path.module), | ||
{ | ||
account_id = data.aws_caller_identity.current.account_id | ||
region = var.aws_region | ||
environment = var.environment | ||
gateway_name = "${module.labels.id}-gw" | ||
ecs_cluster_name = module.labels.id | ||
ecs_push_service_name = aws_ecs_service.push.name | ||
ecs_api_service_name = aws_ecs_service.api.name | ||
rds_db_cluster_name = module.rds_cluster_aurora_postgres.cluster_identifier | ||
lambda_token_fn_name = "${module.labels.id}-token" | ||
lambda_cso_fn_name = "${module.labels.id}-cso" | ||
lambda_stats_fn_name = "${module.labels.id}-stats" | ||
api_lb_arn_suffix = aws_lb.api.arn_suffix | ||
push_lb_arn_suffix = aws_lb.push.arn_suffix | ||
api_log_group = "${module.labels.id}-api" | ||
}) | ||
} |
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.