https://github.com/hoverkraft-tech/infrastructure-ovh-template
https://github.com/hoverkraft-tech/infrastructure-ovh-template
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/hoverkraft-tech/infrastructure-ovh-template
- Owner: hoverkraft-tech
- Created: 2026-01-28T20:46:14.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2026-01-28T22:51:45.000Z (6 months ago)
- Last Synced: 2026-01-29T11:37:25.975Z (6 months ago)
- Language: HCL
- Size: 439 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# infrastructure
Infrastructure as Code for your environment
## prerequisites
This repo uses the following dependencies :
- direnv for load env vars in `.envrc` files
- asdf for managing binary versions of the needed tools
- aws-vault (optional) to manage all aws accounts securely
- pyenv for managing python version and virtualenv
You can find more details about each tool on their official websites :
- [direnv](https://direnv.net/)
- [asdf](https://asdf-vm.com)
- [aws-vault](https://github.com/99designs/aws-vault)
- [pyenv](https://github.com/pyenv/pyenv)
### asdf-vm
- install asdf
- run these commands :
```sh
asdf plugin add checkov
asdf plugin add infracost
asdf plugin add terraform
asdf plugin add terraform-docs
asdf plugin add terragrunt
asdf plugin add tflint
asdf plugin add tfsec
asdf plugin add tfupdate
asdf install
```
### pyenv
- install pyenv
- run these commands :
```shell
pyenv virtualenv 3.13.0 hk-ovh
```
## setup a new env
- copy one of the prod env and rename the top level folder
- remove terraform states files (`find . -type f -name '.terraform.lock.hcl' -exec rm {} \; && find . -type d -name '.terragrunt-cache' -exec rm -rf {} \;`)
- search and replace `/old/new/` in the just created folder
- create an SSH ED25519 key `ssh-keygen -t ed25519 -C '@acme.net' -f ` and store it in password store repository
- customize the `env.yaml` file to suits your needs
## deploy an env (or partial subfolder)
```shell
cd envs/xxxxxxxxx
cd # if you want to deploy full env just skip this step
aws-vault exec -- terragrunt run-all apply
```
NOTE: you can add the following arguments in order to fully automate the deployment
- `--terragrunt-non-interactive`
- `--terragrunt-ignore-external-dependencies`
## depploy apps to an env
- take the outputs you need from the step above
- see [argo-app-of-apps](../argo-app-of-apps) repository
## limitations