monarch-initiative / monarch-documentation

Technical documentation for all Monarch applications, packages, services and related projects.
https://monarch-initiative.github.io/monarch-documentation/
GNU General Public License v3.0
5 stars 0 forks source link

Document Terraformer TF_VAR_state_bucket: monarch-tfstate troubleshooting. #63

Open amc-corey-cox opened 7 months ago

amc-corey-cox commented 7 months ago

Kevin Schaper: oof, I sourced the new env and tried running provision, and it's very broken: ➜ deployment git:(main) ✗ git pull
Already up to date. ➜ deployment git:(main) ✗ ./provision.sh

Initializing the backend...

Successfully configured the backend "gcs"! Terraform will automatically use this backend unless the backend configuration changes. Error loading state: unsupported checkable object kind "var"

Kevin Schaper 3:21 PM I wonder if the tf-state file is corrupted 3:21 The tf-state files are stored on a versioned bucket Screenshot 2024-02-16 at 1.21.32 PM.png

Screenshot 2024-02-16 at 1.21.32 PM.png

3:22 Faisal once fixed it by reverting to a previous version 3:22 I might just go for it

Corey Cox 3:22 PM Hmm, that is something I don't understand. Do we have that documented at all?

Kevin Schaper 3:42 PM I don't think we do, tfstate is how terraform knows the state of gcp, so it writes to it each time it makes changes - but when something like this happens it always feels like brick wall to me and I end up needing Faisal help, though.. the worst case though is just to go into gcp and manually delete the resources that it made to start over

Corey Cox 3:43 PM I'm going to copy all of this to a thread in documentation. Sound good?

amc-corey-cox commented 7 months ago

Kevin Schaper 3:46 PM from googling the error, it seems like I might just need to update my terraform - which is maybe an argument in favor centrally administering rather than from each dev machine 3:46 since there's no poetry.lock for which terraform we use 3:46 brew upgrade terraform :crossed_fingers:

amc-corey-cox commented 7 months ago

This seems like it makes sense to go in the deployment troubleshooting section.

sagehrke commented 1 week ago

Add this update to the Troubleshooting section here: https://monarch-initiative.github.io/monarch-documentation/release-process/