Skip to content

Commit 4ffa4d3

Browse files
authored
[Issue #2351] Nava platform upgrade v0.3 => v0.4 (#2568)
## Summary Fixes #2576 Relates to navapbc/template-infra@v0.3.0...v0.4.0 ### Time to review: __x mins__ ## Changes proposed - Adds `.template-infra` folder, which is how Nava's platform CLI keeps track of our apps - Updates to latest template version, eg. - adds and removes some variables here and there - that's it - this is a very small update ## Additional information tested by running ``` terraform init -backend-config=dev.s3.tfbackend -reconfigure terraform plan -var "environment_name=dev" ```
1 parent 2c9d075 commit 4ffa4d3

File tree

10 files changed

+32
-8
lines changed

10 files changed

+32
-8
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,3 +149,6 @@ dmypy.json
149149

150150
# Terraform plan outputs
151151
*.tfplan
152+
153+
# Python testing stuff
154+
*__pycache__*

.template-infra/app-analytics.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
_commit: 929a959
2+
_src_path: https://github.com/navapbc/template-infra
3+
app_name: analytics

.template-infra/app-api.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
_commit: 929a959
2+
_src_path: https://github.com/navapbc/template-infra
3+
app_name: api

.template-infra/app-frontend.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
_commit: 929a959
2+
_src_path: https://github.com/navapbc/template-infra
3+
app_name: frontend

.template-infra/base.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
_commit: 929a959
2+
_src_path: https://github.com/navapbc/template-infra
3+
app_name: template-only

.template-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
fe5c7cd24d3c2c9f15c342826cda0a20af4cd0a5
1+
929a959ded1103bed5c25edf3c991ddf9698f0b9

infra/modules/database/main.tf

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ resource "random_id" "db_superuser" {
99
}
1010

1111
locals {
12-
master_username = random_id.db_superuser.hex
13-
role_manager_name = "${var.name}-role-manager"
14-
role_manager_package = "${path.root}/role_manager.zip"
12+
master_username = random_id.db_superuser.hex
13+
primary_instance_name = "${var.name}-primary"
14+
role_manager_name = "${var.name}-role-manager"
15+
role_manager_package = "${path.root}/role_manager.zip"
1516

1617
# The ARN that represents the users accessing the database are of the format: "arn:aws:rds-db:<region>:<account-id>:dbuser:<resource-id>/<database-user-name>""
1718
# See https://aws.amazon.com/blogs/database/using-iam-authentication-to-connect-with-pgadmin-amazon-aurora-postgresql-or-amazon-rds-for-postgresql/
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
pg8000
1+
pg8000

infra/modules/database/role_manager/role_manager.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@
1616
def lambda_handler(event, context):
1717
if event == "check":
1818
return check()
19-
elif event == "password_ts":
20-
connect_as_master_user()
21-
return "Succeeded"
2219
else:
2320
return manage()
2421

infra/networks/main.tf

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ locals {
55
description = "VPC resources"
66
})
77
region = module.project_config.default_region
8+
9+
# List of AWS services used by this VPC
10+
# This list is used to create VPC endpoints so that the AWS services can
11+
# be accessed without network traffic ever leaving the VPC's private network
12+
# For a list of AWS services that integrate with AWS PrivateLink
13+
# see https://docs.aws.amazon.com/vpc/latest/privatelink/aws-services-privatelink-support.html
14+
#
15+
# The database module requires VPC access from private networks to SSM, KMS, and RDS
16+
aws_service_integrations = toset(
17+
module.app_config.has_database ? ["ssm", "kms", "secretsmanager"] : []
18+
)
819
}
920

1021
terraform {

0 commit comments

Comments
 (0)