Terraform template for modules and submodules. Includes pre-commit hooks that lint the terraform code and generate module's documentation as part of README file. Contains examples of terraform CI/CD pipelines for GitHub Actions and Azure Pipelines.
- Create and configure Azure Storage Account for Terraform state
- Create
azure.sas.conf
file with the following content:storage_account_name = "storage_account_name" container_name = "container_name" key = "terraform.tfstate" sas_token = "sas_token"
terraform init -backend-config="azure.sas.conf" -reconfigure -upgrade
- Bitbucket:
git::[email protected]:kolosovpetro/terraform.git//modules/storage
- Github:
git::[email protected]:kolosovpetro/terraform.git//modules/storage
- Install python3 via Windows Store
pip install --upgrade pip
pip install pre-commit
- Update PATH variable
pre-commit install
choco install terraform-docs
choco install tflint
- https://github.com/antonbabenko/pre-commit-terraform
- https://github.com/kolosovpetro/AzureTerraformBackend
- https://github.com/terraform-docs/terraform-docs
- https://terraform-docs.io/user-guide/installation/
- https://pre-commit.com/
storage_account_name = "storage_account_name"
container_name = "container_name"
key = "terraform.tfstate"
sas_token = "sas_token"
Name | Version |
---|---|
azurerm | =3.71.0 |
Name | Version |
---|---|
azurerm | 3.71.0 |
Name | Source | Version |
---|---|---|
resource_group | ./modules/example_submodule | n/a |
Name | Type |
---|---|
azurerm_resource_group.public | resource |
azurerm_client_config.current | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
prefix | Prefix for all resources | string |
n/a | yes |
resource_group_location | Resource group location | string |
n/a | yes |
resource_group_name | Resource group name | string |
n/a | yes |
No outputs.