From baf62e975a980a33cb3c38d95c247ed7f2838ac6 Mon Sep 17 00:00:00 2001 From: Maciej Michalski <5445923+spy86@users.noreply.github.com> Date: Tue, 23 Apr 2024 21:49:50 +0200 Subject: [PATCH 1/6] Delete examples/azure_acr/README.md --- examples/azure_acr/README.md | 54 ------------------------------------ 1 file changed, 54 deletions(-) delete mode 100644 examples/azure_acr/README.md diff --git a/examples/azure_acr/README.md b/examples/azure_acr/README.md deleted file mode 100644 index 8a50364..0000000 --- a/examples/azure_acr/README.md +++ /dev/null @@ -1,54 +0,0 @@ -# Terraform Module: Azure Container Registry (ACR) - -This Terraform module provisions an Azure Container Registry (ACR) in Azure. - -## Usage - -```hcl -provider "azurerm" { -features {} -} - -module "container_registry" { - source = "Think-Cube/container-registry/azure" - version = "1.0.0" - envirioment = "dev" - acr_name = "registry4test" - resource_group_name = "weu-test-rg" - resource_group_location = "West Europe" - acr_tier = "Basic" - acr_admin_enabled = "true" - default_tags = { - Administrator = "John Doe" - Department = "IT" - CostCentre = "CC123" - ContactPerson = "Jane Smith" - ManagedByTerraform = "True" -} -} -``` - -### Variables - -* `environment`: The environment name (e.g., dev, stage, prod). -* `acr_name`: The name of the Azure Container Registry. -* `resource_group_name`: The name of the resource group in which to create the ACR. -* `resource_group_location`: The location of the resource group. -* `acr_tier`: The pricing tier for the ACR. -* `acr_admin_enabled`: Whether admin user should be enabled for the ACR. -* `default_tags`: Default tags to be applied to all resources. - -### Outputs - -* `id`: The ID of the Container Registry. -* `login_server`: The URL that can be used to log into the container registry. -* `admin_username`: The Username associated with the Container Registry Admin account. -* `admin_password`: The Password associated with the Container Registry Admin account. - -## License - -This project is licensed under the [MIT License](https://opensource.org/licenses/MIT). - -## Contribution - -Feel free to contribute by opening issues or pull requests. Your feedback and improvements are highly appreciated! From 21c75c07310722b2059e396ff96c0bd1c5a2fe47 Mon Sep 17 00:00:00 2001 From: Maciej Michalski <5445923+spy86@users.noreply.github.com> Date: Tue, 23 Apr 2024 21:50:17 +0200 Subject: [PATCH 2/6] Update main.tf --- examples/azure_acr/main.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/azure_acr/main.tf b/examples/azure_acr/main.tf index 379e58c..cb61c17 100644 --- a/examples/azure_acr/main.tf +++ b/examples/azure_acr/main.tf @@ -8,7 +8,7 @@ module "acr" { envirioment = "dev" acr_name = "registry4test" - resource_group_name = "weu-test-rg" + resource_group_name = "dev-test-weu-rg" resource_group_location = "West Europe" acr_tier = "Basic" acr_admin_enabled = "true" @@ -19,4 +19,4 @@ module "acr" { ContactPerson = "Jane Smith" ManagedByTerraform = "True" } -} \ No newline at end of file +} From 5bd548552931cd8ada0b5f4a729410ad4a2e54d0 Mon Sep 17 00:00:00 2001 From: Maciej Michalski <5445923+spy86@users.noreply.github.com> Date: Tue, 23 Apr 2024 21:51:15 +0200 Subject: [PATCH 3/6] Create .terraform-docs.yml --- .terraform-docs.yml | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .terraform-docs.yml diff --git a/.terraform-docs.yml b/.terraform-docs.yml new file mode 100644 index 0000000..db9c29e --- /dev/null +++ b/.terraform-docs.yml @@ -0,0 +1,40 @@ +# .terraform-docs.yaml +formatter: toml # this is required + +version: "" + +header-from: main.tf +footer-from: "variables.tf" + + +content: "" + +output: + file: README.md # output-file + mode: replace + template: |- + + {{ .Content }} + + +output-values: + enabled: false + from: "" + +sort: + enabled: true + by: name + +settings: + anchor: true + color: true + default: true + description: false + escape: true + hide-empty: true + html: true + indent: 4 + lockfile: true + required: true + sensitive: true + type: true From 5b7860eae639cb5094dab8c547933482179a8b34 Mon Sep 17 00:00:00 2001 From: Maciej Michalski <5445923+spy86@users.noreply.github.com> Date: Tue, 23 Apr 2024 21:51:39 +0200 Subject: [PATCH 4/6] Update backend.tf --- backend.tf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend.tf b/backend.tf index 7f32883..ade662d 100644 --- a/backend.tf +++ b/backend.tf @@ -1,9 +1,9 @@ terraform { required_providers { azurerm = { - source = "hashicorp/azurerm" - version = "3.94.0" + source = "hashicorp/azurerm" + version = "3.100.0" } } required_version = ">= 1.6.4" -} \ No newline at end of file +} From 8141a7de24fd65870d722e56fb6aa09b877a6961 Mon Sep 17 00:00:00 2001 From: Maciej Michalski <5445923+spy86@users.noreply.github.com> Date: Tue, 23 Apr 2024 21:52:13 +0200 Subject: [PATCH 5/6] Create documentation.yml --- .github/workflows/documentation.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/documentation.yml diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml new file mode 100644 index 0000000..56fda69 --- /dev/null +++ b/.github/workflows/documentation.yml @@ -0,0 +1,20 @@ + +name: Generate terraform docs +on: + - pull_request +jobs: + docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.ref }} + - name: Render terraform docs inside the README.md and push changes back to PR branch + uses: terraform-docs/gh-actions@v1.0.0 + with: + github-token: ${{ secrets.GH_TOKEN }} + working-dir: . + output-file: README.md + output-method: replace + config-file: .terraform-docs.yml + git-push: "true" From 6edc251dfbf6ef27b872349cb6d8c5b7d9644a5c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 23 Apr 2024 19:52:38 +0000 Subject: [PATCH 6/6] terraform-docs: automated action --- README.md | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index d805ccd..339e384 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,26 @@ -## Requirements +#### Requirements | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.6.4 | -| [azurerm](#requirement\_azurerm) | 3.94.0 | +| [azurerm](#requirement\_azurerm) | 3.100.0 | -## Providers +#### Providers | Name | Version | |------|---------| -| [azurerm](#provider\_azurerm) | 3.94.0 | +| [azurerm](#provider\_azurerm) | 3.100.0 | -## Modules - -No modules. - -## Resources +#### Resources | Name | Type | |------|------| -| [azurerm_container_registry.main](https://registry.terraform.io/providers/hashicorp/azurerm/3.94.0/docs/resources/container_registry) | resource | -| [azurerm_client_config.current](https://registry.terraform.io/providers/hashicorp/azurerm/3.94.0/docs/data-sources/client_config) | data source | -| [azurerm_resource_group.main](https://registry.terraform.io/providers/hashicorp/azurerm/3.94.0/docs/data-sources/resource_group) | data source | +| [azurerm_container_registry.main](https://registry.terraform.io/providers/hashicorp/azurerm/3.100.0/docs/resources/container_registry) | resource | +| [azurerm_client_config.current](https://registry.terraform.io/providers/hashicorp/azurerm/3.100.0/docs/data-sources/client_config) | data source | +| [azurerm_resource_group.main](https://registry.terraform.io/providers/hashicorp/azurerm/3.100.0/docs/data-sources/resource_group) | data source | -## Inputs +#### Inputs | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| @@ -37,7 +33,7 @@ No modules. | [resource\_group\_location](#input\_resource\_group\_location) | Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. | `string` | `"West Europe"` | no | | [resource\_group\_name](#input\_resource\_group\_name) | The name of the resource group in which to create the container registry component. Changing this forces a new resource to be created. | `string` | n/a | yes | -## Outputs +#### Outputs | Name | Description | |------|-------------|