OpenTofu is an open source infrastructure as code tool (forked from Terraform).
You can use this repository to create Google Cloud Platform infrastructure to run an instance of GeneticScores.org
.
Tip
The main branch of the live repository should be a 1:1 representation of what’s actually deployed in production.
$ brew update
$ brew install tofu
$ tofu init
$ gcloud auth application-default login
Make sure a backend bucket exists in the production project, e.g.:
gs://genetic-scores-tofu-state
Enabling object versioning, soft delete, and encryption is a good idea.
Note
This bucket will contain the state of your infrastructure in lock files, which helps people to collaborate and reduces the risk of losing state
$ cd environments/test
$ tofu plan
Tip
plan
will prompt for variables. You can put these variables in a file to save time, e.g.:
$ tofu plan -var-file="testing.tfvars"
If everything looks sensible, create the resources by applying the deployment.
$ tofu apply