Open P0NDER0SA opened 2 months ago
Identified a list of all of the AWS account ids we have in our Terraform code. Investigated the best way to set up variables for them -- decided that we should focus on the CDS internal ids (as many of the other external ones are public anyways).
In order to use TFVars variables for these we really need to adjust our code to allow Terragrunt to use our TFVars file (which is scoped to Terraform for some silly reason).
Discovered a newer function that could help us do just that-- need to compare this with Bens other env enhancements and decide how to proceed. Also if we use this, we will have to update our actions to use a newer version of the Terragrunt Actions.
Started on the implementation of the read_tfvars_function for dev and reviewing Bens amalgamated tfvars file for dev
I have a working model for this on Dev, but i need to get it workign on Staging before I can merge it.
Blocked by an issue with GHA that i can't reproduce locally. Will bug Ben when he's available. Updated the code to use variables (on dev and staging and sandbox environments).
Need to fix the plans for Staging before devising a way to keep production working as it does until i can get staging 100%.
Ben and I want to debug this more and find out why the planning is failing without any errors/warnings today
For dev TF Plan github action, I just switched the role to notification-terraform-apply so that the DNS management works.
amalgamated all configuraable values in staging into our tfvars file (this was a big job!) and created all variable declarations in our top level Terragrunt hcl file. Currently working on removing redundant variable declarations in downstream variable files for staging. We very much underestimated this one!
all variables have been pulled together for dev and staging and are in 1pass tfvars files. they are extensive. Plans are working against dev and staging -- we need to verify the plans to make sure they aren't doing anythign dangerous (the new sensitive values are causing it to show a good many "changes" that might not really be changes). Making very good progresss.
Working through applies and debugging. Some issues arose on dev (VPN randomly breaking).
Notes don't seem to be versioned in 1Password - should investigating.
Update: It's versioned but you need to go through web portal to get to the history. Pond will add this to Tips and Tricks
VPN working again on dev :tada: Next:
Gonna look at the prod plan first.
We got dev and staging ready to go with the changes for this PR. We'll wait on Pond before resuming on that task. Pond was working on the production workflows last week.
Today
new PR has been created with minimal commits! https://github.com/cds-snc/notification-terraform/pull/1562
Merged! It's deployed on staging.
One small issue with Heartbeat - just an out of date config value for the API key. Fixed!
We will re-create a new api key for production before we release to nip this in the bud.
TFVars for prod have been reviewed. One more pass on this today and a Plan against production before release!
released to production this morning! Looks good so far :)
We might look at making some small changes to move "configurations" back to the code base for traceability and leaving the secrets in 1pass. They will still be fairly centralized and easy to track
Looking good in Production!
Steve will fix account ids in:
I'll do another check today to double check that we got everything.
dang it, I missed one. PR here
All good now!
Description
As a Developer, I need to be able to use Terraform variables in code such as the AWS account ID, so that I can achieve secure and maintainable code.
WHY are we building?
Code security and maintainability.
WHAT are we building?
VALUE created by our solution
Secure and consistent/debuggable code.
QA Steps
Acceptance Criteria