https://github.com/pagopa/io-infra
IO platform infrastructure
https://github.com/pagopa/io-infra
infrastructure io
Last synced: 9 months ago
JSON representation
IO platform infrastructure
- Host: GitHub
- URL: https://github.com/pagopa/io-infra
- Owner: pagopa
- Created: 2021-09-29T09:49:29.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-04-09T16:00:29.000Z (10 months ago)
- Last Synced: 2025-04-09T17:21:23.022Z (10 months ago)
- Topics: infrastructure, io
- Language: HCL
- Homepage:
- Size: 4.13 MB
- Stars: 8
- Watchers: 9
- Forks: 4
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
[](https://github.com/pagopa/io-infra/actions/workflows/static_analysis.yml)
[](https://github.com/pagopa/io-infra/actions/workflows/prod_cd_citizen-auth.yml)
[](https://github.com/pagopa/io-infra/actions/workflows/prod_drift_citizen-auth.yml)
# IO-infrastructure
IO project infrastructure
## Requirements
### 1. terraform
In order to manage the suitable version of terraform it is strongly recommended to install the following tool:
- [tfenv](https://github.com/tfutils/tfenv): **Terraform** version manager inspired by rbenv.
Once these tools have been installed, install the terraform version shown in:
- .terraform-version
After installation install terraform:
```sh
tfenv install
```
## Terraform modules
As PagoPA we build our standard Terraform modules, check available modules:
- [PagoPA Terraform modules](https://github.com/search?q=topic%3Aterraform-modules+org%3Apagopa&type=repositories)
## Apply changes
To apply changes follow the standard terraform lifecycle once the code in this repository has been changed:
```sh
./terraform.sh init [dev|uat|prod]
./terraform.sh plan [dev|uat|prod]
./terraform.sh apply [dev|uat|prod]
```
## Terraform lock.hcl
We have both developers who work with your Terraform configuration on their Linux, macOS or Windows workstations and automated systems that apply the configuration while running on Linux.
https://www.terraform.io/docs/cli/commands/providers/lock.html#specifying-target-platforms
So we need to specify this in terraform lock providers:
```sh
rm .terraform.lock.hcl
./terraform.sh init [dev|uat|prod]
rm .terraform.lock.hcl
terraform providers lock \
-platform=windows_amd64 \
-platform=darwin_amd64 \
-platform=darwin_arm64 \
-platform=linux_amd64
```
## Precommit checks
Check your code before commit.
https://github.com/antonbabenko/pre-commit-terraform#how-to-install
```sh
pre-commit run -a
```