An open API service indexing awesome lists of open source software.

https://github.com/hmcts/terraform-module-template

Template for Terraform modules
https://github.com/hmcts/terraform-module-template

infrastructure-as-code template terraform terraform-module

Last synced: 8 months ago
JSON representation

Template for Terraform modules

Awesome Lists containing this project

README

          

# terraform-module-template

Terraform module for [Resource name](https://example.com).

## Example

```hcl
module "todo_resource_name" {
source = "git@github.com:hmcts/terraform-module-todo?ref=main"
...
}

```

## Requirements

| Name | Version |
|------|---------|
| [azurerm](#requirement\_azurerm) | >= 3.7.0 |

## Providers

| Name | Version |
|------|---------|
| [azurerm](#provider\_azurerm) | >= 3.7.0 |

## Resources

| Name | Type |
|------|------|
| [azurerm_resource_group.rg](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/resource_group) | resource |
| [azurerm_subscription.current](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/subscription) | data source |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [common\_tags](#input\_common\_tags) | Common tag to be applied to resources. | `map(string)` | n/a | yes |
| [component](#input\_component) | https://hmcts.github.io/glossary/#component | `string` | n/a | yes |
| [env](#input\_env) | Environment value. | `string` | n/a | yes |
| [existing\_resource\_group\_name](#input\_existing\_resource\_group\_name) | Name of existing resource group to deploy resources into | `string` | `null` | no |
| [location](#input\_location) | Target Azure location to deploy the resource | `string` | `"UK South"` | no |
| [name](#input\_name) | The default name will be product+component+env, you can override the product+component part by setting this | `string` | `""` | no |
| [product](#input\_product) | https://hmcts.github.io/glossary/#product | `string` | n/a | yes |
| [project](#input\_project) | Project name - sds or cft. | `any` | n/a | yes |

## Outputs

| Name | Description |
|------|-------------|
| [resource\_group\_location](#output\_resource\_group\_location) | n/a |
| [resource\_group\_name](#output\_resource\_group\_name) | n/a |

## Contributing

We use pre-commit hooks for validating the terraform format and maintaining the documentation automatically.
Install it with:

```shell
$ brew install pre-commit terraform-docs
$ pre-commit install
```

If you add a new hook make sure to run it against all files:
```shell
$ pre-commit run --all-files
```