Skip to content

Commit

Permalink
Merge pull request #4 from Think-Cube/patch-1
Browse files Browse the repository at this point in the history
Patch 1
  • Loading branch information
spy86 authored Apr 23, 2024
2 parents e26ad82 + 6edc251 commit 80eaf25
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 73 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
with:
github-token: ${{ secrets.GH_TOKEN }}
working-dir: .
output-file: README.md
output-method: replace
config-file: .terraform-docs.yml
git-push: "true"
40 changes: 40 additions & 0 deletions .terraform-docs.yml
Original file line number Diff line number Diff line change
@@ -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: |-
<!-- 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: true
html: true
indent: 4
lockfile: true
required: true
sensitive: true
type: true
24 changes: 10 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,26 @@
<!-- BEGIN_TF_DOCS -->
## Requirements
#### Requirements

| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.6.4 |
| <a name="requirement_azurerm"></a> [azurerm](#requirement\_azurerm) | 3.94.0 |
| <a name="requirement_azurerm"></a> [azurerm](#requirement\_azurerm) | 3.100.0 |

## Providers
#### Providers

| Name | Version |
|------|---------|
| <a name="provider_azurerm"></a> [azurerm](#provider\_azurerm) | 3.94.0 |
| <a name="provider_azurerm"></a> [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 |
|------|-------------|------|---------|:--------:|
Expand All @@ -37,7 +33,7 @@ No modules.
| <a name="input_resource_group_location"></a> [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 |
| <a name="input_resource_group_name"></a> [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 |
|------|-------------|
Expand Down
6 changes: 3 additions & 3 deletions backend.tf
Original file line number Diff line number Diff line change
@@ -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"
}
}
54 changes: 0 additions & 54 deletions examples/azure_acr/README.md

This file was deleted.

4 changes: 2 additions & 2 deletions examples/azure_acr/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -19,4 +19,4 @@ module "acr" {
ContactPerson = "Jane Smith"
ManagedByTerraform = "True"
}
}
}

0 comments on commit 80eaf25

Please sign in to comment.