Closed rocketnova closed 2 months ago
left some nits. also, i didn't see any evidence of testing in the PR, which i'd ideally like to see before approving
Adding now and will re-ping you when I'm ready for re-review. Thanks!
Rollout note: One thing to remember to do after merging, is that on platform-test-nextjs you'll want to run terraform apply in the network layer, since the network layer doesn't get auto-applied as part of CD. I imagine apply would end up removing the subnets and subnet group.
Thank you for the tip! I would have missed that.
Rollout note: One thing to remember to do after merging, is that on platform-test-nextjs you'll want to run terraform apply in the network layer, since the network layer doesn't get auto-applied as part of CD. I imagine apply would end up removing the subnets and subnet group.
Thank you for the tip! I would have missed that.
Following up to say that this is complete!
Ticket
N/A
Changes
Context for reviewers
Right now, the first time you configure the network and run
make infra-update-network NETWORK_NAME=<NETWORK_NAME>
, the database subnets and subnet group are created even if there are no databases specified in the network.This change makes creating those resources conditional based on whether or not there databases are needed.
I think it's better to make this conditional to reduce the number of unnecessary resources created. In general, unnecessary resources add additional cost and management overhead (i.e. it was confusing to me to see database subnets being created for an application that had no database).
Testing
Testing performed by deploying this branch to my local version of https://github.com/navapbc/platform-test and then deploying necessary resources (account, network) to my AWS account. This screenshot shows:
has_database
is set tofalse
in/infra/app/app-config/main.tf
dev
network which does not have any database VPC endpoints