-
Notifications
You must be signed in to change notification settings - Fork 0
docs(azure-resource-group): update docs and added examples #894
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
6c4148a
3491c54
f1da065
f173143
5a8284b
bbc58a2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| formatter: "markdown" | ||
|
|
||
| version: "" | ||
|
|
||
| header-from: docs/header.md | ||
| footer-from: docs/footer.md | ||
|
|
||
| recursive: | ||
| enabled: false | ||
| path: modules | ||
| include-main: true | ||
|
|
||
| sections: | ||
| hide: [] | ||
| show: [] | ||
|
|
||
| content: "" | ||
|
|
||
| output: | ||
| file: "README.md" | ||
| mode: inject | ||
| template: |- | ||
| <!-- BEGIN_TF_DOCS --> | ||
| {{ .Content }} | ||
| <!-- END_TF_DOCS --> | ||
|
|
||
| output-values: | ||
| enabled: false | ||
| from: "" | ||
|
|
||
| sort: | ||
| enabled: true | ||
| by: name | ||
|
|
||
| settings: | ||
| anchor: true | ||
| color: true | ||
| default: true | ||
| description: false | ||
| escape: true | ||
| hide-empty: false | ||
| html: true | ||
| indent: 2 | ||
| lockfile: true | ||
| read-comments: true | ||
| required: true | ||
| sensitive: true | ||
| type: true |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,34 +1,25 @@ | ||
| # Azure resource_groups | ||
| <!-- BEGIN_TF_DOCS --> | ||
| # Azure Resource Group Terraform Module | ||
|
|
||
| ## Overview | ||
|
|
||
| This module creates only resource groups into Azure provicer. | ||
| This Terraform module allows you to create Azure Resource Groups with optional tags. | ||
|
|
||
| ## DOC | ||
| ## Main features | ||
| - Create one or more resource groups in Azure. | ||
| - Support for custom tags for each resource group. | ||
| - Simple usage for both single and multiple groups. | ||
| - Realistic configuration example. | ||
|
|
||
| - [Resource terraform - resource-group](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/resource_group). | ||
|
|
||
| ## Usage | ||
|
|
||
| ### Set a module | ||
| ## Complete usage example | ||
|
|
||
| ```terraform | ||
| module "githuib-oidc" { | ||
| module "github-oidc" { | ||
| source = "git::https://github.com/prefapp/tfm.git//modules/azure-resource-group?ref=<version>" | ||
| } | ||
| ``` | ||
|
|
||
| #### Example | ||
|
|
||
| ```terraform | ||
| module "githuib-oidc" { | ||
| source = "git::https://github.com/prefapp/tfm.git//modules/azure-resource-group?ref=v1.2.3" | ||
| } | ||
| ``` | ||
|
|
||
| ### Set a data .tfvars | ||
|
|
||
| #### Example | ||
| ### HCL | ||
|
|
||
| ```hcl | ||
| name = "group_one" | ||
|
|
@@ -39,7 +30,75 @@ location = "westEurope" | |
| name = "group_two" | ||
| location = "westEurope" | ||
| tags = { | ||
| foo: "bar" | ||
| bar: "foo" | ||
| foo = "bar" | ||
| bar = "foo" | ||
| } | ||
| ``` | ||
|
|
||
| ## Notes | ||
| - You can define as many resource groups as needed, each with its own tags. | ||
| - Tags help organize and identify your resources. | ||
|
|
||
| ## File structure | ||
|
|
||
|
||
| ``` | ||
| . | ||
| ├── main.tf | ||
| ├── variables.tf | ||
| ├── outputs.tf | ||
| ├── resource_groups.tf | ||
| ├── README.md | ||
| ├── CHANGELOG.md | ||
| └── docs/ | ||
| ├── header.md | ||
| └── footer.md | ||
| ``` | ||
|
|
||
| ## Requirements | ||
|
|
||
| | Name | Version | | ||
| |------|---------| | ||
| | <a name="requirement_azurerm"></a> [azurerm](#requirement\_azurerm) | >=4.26.0 | | ||
|
|
||
| ## Providers | ||
|
|
||
| | Name | Version | | ||
| |------|---------| | ||
| | <a name="provider_azurerm"></a> [azurerm](#provider\_azurerm) | >=4.26.0 | | ||
|
|
||
| ## Modules | ||
|
|
||
| No modules. | ||
|
|
||
| ## Resources | ||
|
|
||
| | Name | Type | | ||
| |------|------| | ||
| | [azurerm_resource_group.this](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/resource_group) | resource | | ||
|
|
||
| ## Inputs | ||
|
|
||
| | Name | Description | Type | Default | Required | | ||
| |------|-------------|------|---------|:--------:| | ||
| | <a name="input_location"></a> [location](#input\_location) | (Required) The Azure Region where the Resource Group should exist. Changing this forces a new Resource Group to be created. | `string` | `""` | no | | ||
| | <a name="input_name"></a> [name](#input\_name) | (Required) The Name which should be used for this Resource Group. Changing this forces a new Resource Group to be created. | `string` | `""` | no | | ||
| | <a name="input_tags"></a> [tags](#input\_tags) | (Optional) A mapping of tags which should be assigned to the Resource Group. | `map(any)` | `{}` | no | | ||
|
|
||
| ## Outputs | ||
|
|
||
| | Name | Description | | ||
| |------|-------------| | ||
| | <a name="output_resource_group_id"></a> [resource\_group\_id](#output\_resource\_group\_id) | n/a | | ||
| | <a name="output_resource_group_location"></a> [resource\_group\_location](#output\_resource\_group\_location) | n/a | | ||
| | <a name="output_resource_group_name"></a> [resource\_group\_name](#output\_resource\_group\_name) | n/a | | ||
| | <a name="output_resource_group_tags"></a> [resource\_group\_tags](#output\_resource\_group\_tags) | n/a | | ||
|
|
||
| ## Resources and support | ||
|
|
||
| - [Official Azure Resource Group documentation](https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/manage-resource-groups-portal) | ||
| - [Terraform reference for azurerm\_resource\_group](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/resource_group) | ||
|
|
||
| ## Support | ||
|
|
||
| For issues, questions, or contributions related to this module, please visit the [repository's issue tracker](https://github.com/prefapp/tfm/issues). | ||
| <!-- END_TF_DOCS --> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| // Basic example: create a single Azure Resource Group | ||
|
|
||
| module "azure_resource_group" { | ||
| source = "../../" | ||
|
|
||
| name = "group_one" | ||
| location = "westeurope" | ||
| tags = { | ||
| environment = "dev" | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # Basic example values for azure-resource-group module | ||
|
|
||
| name: group_one | ||
| location: westeurope | ||
| tags: | ||
| environment: dev |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| ## Resources and support | ||
|
|
||
| - [Official Azure Resource Group documentation](https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/manage-resource-groups-portal) | ||
| - [Terraform reference for azurerm_resource_group](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/resource_group) | ||
|
|
||
| ## Support | ||
|
|
||
| For issues, questions, or contributions related to this module, please visit the [repository's issue tracker](https://github.com/prefapp/tfm/issues). |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| # Azure Resource Group Terraform Module | ||
|
|
||
| ## Overview | ||
|
|
||
| This Terraform module allows you to create Azure Resource Groups with optional tags. | ||
|
|
||
| ## Main features | ||
| - Create one or more resource groups in Azure. | ||
| - Support for custom tags for each resource group. | ||
| - Simple usage for both single and multiple groups. | ||
| - Realistic configuration example. | ||
|
|
||
| ## Complete usage example | ||
|
|
||
|
||
| ```terraform | ||
| module "github-oidc" { | ||
| source = "git::https://github.com/prefapp/tfm.git//modules/azure-resource-group?ref=<version>" | ||
| } | ||
| ``` | ||
|
|
||
| ### HCL | ||
|
|
||
| ```hcl | ||
| name = "group_one" | ||
| location = "westEurope" | ||
| ``` | ||
|
|
||
| ```hcl | ||
| name = "group_two" | ||
| location = "westEurope" | ||
| tags = { | ||
| foo = "bar" | ||
| bar = "foo" | ||
| } | ||
| ``` | ||
|
|
||
| ## Notes | ||
| - You can define as many resource groups as needed, each with its own tags. | ||
| - Tags help organize and identify your resources. | ||
|
|
||
| ## File structure | ||
|
|
||
| ``` | ||
| . | ||
| ├── main.tf | ||
| ├── variables.tf | ||
| ├── outputs.tf | ||
| ├── resource_groups.tf | ||
| ├── README.md | ||
| ├── CHANGELOG.md | ||
| └── docs/ | ||
| ├── header.md | ||
| └── footer.md | ||
| ``` | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same Markdown issue as in docs/header.md: the ```terraform code fence is not closed before the '### HCL' heading, which will break rendering of the README. Close the terraform fence before starting the HCL section.