🌐 Language: English | Português
This project contains a minimal structure for Terraform projects using Huawei Cloud provider, following some practices and references found around the web (listed at the end).
Read Huawei Cloud Terraform provider documentation to know which resources are available and how to use them.
If you are new to Terraform, read the First Steps.
main.tf
- primary entrypoint;variables.tf
- declarations for variables;outputs.tf
- declarations for outputs;providers.tf
- list required providers, versions and configurations;terraform.tfvars
- derived fromterraform.tfvars.example
, contains custom values for variables. This file should not be commited to the repository.
In order to ensure consistency across your project, follow some conventions:
- Use 2 spaces for indentation;
- Align the equal signs inside a block;
- Use empty lines to separate blocks;
- Use only lowercase letters, digits and underscores (
_
) in block identifiers. Do not use hyphens (-
).
Except for block identifiers, all other conventions are automatically applied
by running terraform fmt
command.
- Terraform's Standard Module Structure
- Digital Ocean's How To Structure a Terraform Project
- Terraform's Style Conventions
- Google Cloud's Best practices for using Terraform