-
Notifications
You must be signed in to change notification settings - Fork 0
Terraform
Terraform is tool for managing infrastructure as a code. We should aim to have all infrastructure as a code. This ensures that the infrastructure can be replicated and it will prevent human mistakes. Infrastructure as a code can be stored in repository and all changes can be reviewed before they are applied.
Terraform Provider is a set of resources that can be declared in a code. Common used providers @FlowUp:
Modules are used within Terraform to create reusable parts of the infrastructure. Modules wrap different resources from different providers.
Modules can be tested with Terraform testing framework Terratest. Right now, Terratest supports only AWS, GCP and Kubernetes APIs.
Each Terraform configuration should include configuration of remote state. Remote state is needed to make sure that everyone who is responsible for infrastructure uses the same state. Otherwise, this can lead to inconsistencies between environment and state file.
State can be defined by adding this to main.tf
:
terraform {
backend "gcs" {
bucket = "flowup-terraform-state" // Name of the bucket
prefix = "staging/egress-nat" // Directory used (should be the same as the path in infra repo)
}
}
-
FE / Angular
-
Golang
-
DevOps
-
Agile process and SCRUM
-
Internship
-
Bootcamp