Skip to content

Commit

Permalink
Merge pull request #3 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 f9986db + 81fc145 commit db5f4a3
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 102 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
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"
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
26 changes: 11 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,27 @@
<!-- 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_mssql_firewall_rule.main](https://registry.terraform.io/providers/hashicorp/azurerm/3.94.0/docs/resources/mssql_firewall_rule) | resource |
| [azurerm_mssql_server.main](https://registry.terraform.io/providers/hashicorp/azurerm/3.94.0/docs/resources/mssql_server) | 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_mssql_firewall_rule.main](https://registry.terraform.io/providers/hashicorp/azurerm/3.100.0/docs/resources/mssql_firewall_rule) | resource |
| [azurerm_mssql_server.main](https://registry.terraform.io/providers/hashicorp/azurerm/3.100.0/docs/resources/mssql_server) | 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 @@ -46,7 +42,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 Microsoft SQL Server. 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"
}
}
81 changes: 0 additions & 81 deletions examples/mssql-server/README.md

This file was deleted.

5 changes: 2 additions & 3 deletions examples/mssql-server/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ provider "azurerm" {
features {}
}

module "application_insight" {
module "mssql_server" {
source = "Think-Cube/mssql-server/azure"
version = "1.0.0"
resource_group_name = "dev-test-weu-rg"
resource_group_location = "West Europe"
application_insights_type = "web"
environment = "dev"
region = "weu"
mssql_server_name = "examplemssql"
Expand All @@ -30,4 +29,4 @@ module "application_insight" {
ContactPerson = "Jane Smith"
ManagedByTerraform = "True"
}
}
}

0 comments on commit db5f4a3

Please sign in to comment.