This repository contains infrastructure to set up our Blockchain Indexers. It depends on the infrastructure as code repository https://github.com/talentprotocol/infrastructure-as-code
It differentiates between environments. We have two:
productionstaging
Make sure you install all the tools defined inside .tool-versions file.
WATCH OUT! I have put GitHub workflows that did automatic deployments off, because I believe it is quite dangerous to automatically apply terraform without first carefully inspecting the plan. And it is unfortunate, that GitHub actions does not allow me to manually trigger a workflow after inspecting the plan. So,
terraform applyshould be done manually from the local machine, after inspecting the plan suggested.
We have a distinct terraform project per environment. So, if you happen to run terraform commands, you will have to run them from the corresponding environment folder, i.e. terraform/production or terraform/staging.
Note:
I initialized terraform for each of these projects with the following commands:
terraform/<environment> $ terraform initand
terraform/<environment> $ terraform providers lock --platform=linux_amd64 --platform=darwin_amd64Important
The following files are not checked in:
.env.<environment>
so, they can contain secrets.
But the following files ARE checked in:
./terraform/.envrc./terraform/staging/.envrc./terraform/production/.envrc
So, they should not contain secrets.
terraform/staging $ $(terraform output -raw ethereum_ssh_connect)