Infrastructure as Code/Terraform Demo - Atea Community Bergen 2023
-
Best practices for using Terraform - Google's style guide for Terraform code. Most of the information in both this and the AWS I&A document is provider agnostic and can (or maybe even should) be used anywhere
-
The AWS Integration & Automation team's best practices for Terraform - More or less the same as Google's version, but with AWS examples
-
Creating Modules - Standard module structure, including naming conventions and versioning that is important is code should be published in a Terraform Registry
-
Checkov and/or tfsec - Static code analysis to catch security problems and misconfiguration
-
tfenv - Version manager to have multiple versions of Terraform installed for different projects
-
Infracost - Create cost calculations for public cloud
-
tflint - Improved linting compared to running terraform validate and catch configuration errors that wont be discovered until running terraform apply. Requires adding the relevant plugin with rulesets for AWS/Azure/GCP
-
terraform-docs - Auto-generated documentation. I use this to add information to the README file with input variables, outputs, dependencies and an overview of which resources Terraform creates
All of these tools can also be used together with pre-commit-terraform to run checks before code changes is commited to git (instead of waiting for the CI/CD pipeline to give you feedback)
Name | Version |
---|---|
terraform | >= 1.5.0 |
azuread | ~> 2.45.0 |
azurerm | ~> 3.78.0 |
Name | Version |
---|---|
azuread | 2.45.0 |
azurerm | 3.78.0 |
Name | Source | Version |
---|---|---|
backend | ./modules/linuxvm | n/a |
network | ./modules/network | n/a |
webserver | ./modules/linuxvm | n/a |
Name | Type |
---|---|
azurerm_resource_group.demo | resource |
azuread_user.current | data source |
azurerm_client_config.current | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
location | Default region in Azure for resources | string |
"westeurope" |
no |
No outputs.