Skip to content
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

Upgrade version to 2.0.0 #7

Closed
wants to merge 22 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions .config/.terraform-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
formatter: markdown

settings:
anchor: false
html: false

sort:
enabled: false

output:
file: README.md
mode: inject

content: |
{{ define "table" }}{{ printf "The `%s` supports the following:" .Resource }}

| Name | Description | Type | Default | Required |
| ---- | ------------| :--: | :-----: | :------: |
{{ range include .File | fromJson -}}
{{ print "|" (.Name | sanitizeMarkdownTbl) -}}
{{ $z := len .Support }}{{ if ne $z 0 }}{{ print "|" .Description -}}
{{ range $x, $y := .Support -}}
{{ if eq $x (sub $z 1) }}{{ printf " `%s`." . -}}
{{ else if eq $x (sub $z 2) }}{{ printf " `%s` and" . -}}
{{ else }}{{ printf " `%s`," . }}{{ end -}}
{{ end -}}
{{ else }}{{ print "|" .Description }}{{ end -}}
{{ printf "|`%s`" .Type -}}
{{ if eq .Default "n/a" }}{{ print "|" (.Default | sanitizeMarkdownTbl) -}}
{{ else }}{{ printf "|`%s`" .Default }}{{ end -}}
{{ printf "|%s|" .Required }}
{{ end }}{{ end -}}

## Parameters

The following parameters are supported:

| Name | Description | Type | Default | Required |
| ---- | ----------- | :--: | :-----: | :------: |
{{ range .Module.Inputs -}}
{{ print "|" (.Name | sanitizeMarkdownTbl) -}}
{{ print "|" (toString .Description | sanitizeMarkdownTbl) -}}
{{ if eq (substr 0 13 (toString .Type)) "list(object({" }}{{ print "|`list(object({}))`" -}}
{{ else if eq (substr 0 8 (toString .Type)) "object({" }}{{ print "|`object({})`" -}}
{{ else }}{{ printf "|`%s`" .Type }}{{ end -}}
{{ if eq .GetValue "" }}{{ print "|" (.GetValue | sanitizeMarkdownTbl) -}}
{{ else }}{{ printf "|`%s`" .GetValue }}{{ end -}}
{{ print "|" (ternary .Required "yes" "no") "|" }}
{{ end }}{{ printf "\n" -}}

{{ template "table" dict "Resource" "frontend_ip_configuration" "File" ".config/frontend_ip_configuration_parameters.json" }}
{{ template "table" dict "Resource" "backend_address_pools" "File" ".config/backend_address_pool_parameters.json" }}
{{ template "table" dict "Resource" "ssl_certificates" "File" ".config/ssl_certificate_parameters.json" }}
{{ template "table" dict "Resource" "http_listeners" "File" ".config/http_listener_parameters.json" }}
{{ template "table" dict "Resource" "backend_http_settings" "File" ".config/backend_http_setting_parameters.json" }}
{{ template "table" dict "Resource" "request_routing_rules" "File" ".config/request_routing_rule_parameters.json" }}{{ printf "\n" -}}

## Outputs

The following outputs are exported:

| Name | Description | Sensitive |
| ---- | ------------| :-------: |
{{ range .Module.Outputs -}}
{{ print "|" .Name -}}
{{ print "|" (toString .Description | sanitizeMarkdownTbl) -}}
{{ print "|" (ternary .Sensitive "yes" "no") "|" }}
{{ end -}}
18 changes: 18 additions & 0 deletions .config/backend_address_pool_parameters.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[
{
"Name": "name",
"Description": "The name of the Backend Address Pool.",
"Type": "string",
"Default": "n/a",
"Required": "yes",
"Support": []
},
{
"Name": "ip_addresses",
"Description": "A list of IP Addresses which should be part of the Backend Address Pool.",
"Type": "list(string)",
"Default": "n/a",
"Required": "no",
"Support": []
}
]
37 changes: 37 additions & 0 deletions .config/backend_http_setting_parameters.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[
{
"Name": "name",
"Description": "The name of the Backend HTTP Settings Collection.",
"Type": "string",
"Default": "n/a",
"Required": "yes",
"Support": []
},
{
"Name": "port",
"Description": "The port which should be used for this Backend HTTP Settings Collection.",
"Type": "string",
"Default": "n/a",
"Required": "yes",
"Support": []
},
{
"Name": "protocol",
"Description": "The Protocol which should be used. Possible values are",
"Type": "string",
"Default": "n/a",
"Required": "yes",
"Support": [
"Http",
"Https"
]
},
{
"Name": "request_timeout",
"Description": "The request timeout in seconds, which must be between `1` and `86400` seconds.",
"Type": "string",
"Default": "n/a",
"Required": "yes",
"Support": []
}
]
29 changes: 29 additions & 0 deletions .config/frontend_ip_configuration_parameters.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[
{
"Name": "public_ip_address_id",
"Description": "The ID of a Public IP Address which the Application Gateway should use.",
"Type": "string",
"Default": "n/a",
"Required": "no",
"Support": []
},
{
"Name": "private_ip_address",
"Description": "The Private IP Address to use for the Application Gateway.",
"Type": "string",
"Default": "n/a",
"Required": "no",
"Support": []
},
{
"Name": "private_ip_address_allocation",
"Description": "The Allocation Method for the Private IP Address. Possible values are",
"Type": "string",
"Default": "n/a",
"Required": "no",
"Support": [
"Dynamic",
"Static"
]
}
]
29 changes: 29 additions & 0 deletions .config/http_listener_parameters.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[
{
"Name": "name",
"Description": "The Name of the HTTP Listener.",
"Type": "string",
"Default": "n/a",
"Required": "yes",
"Support": []
},
{
"Name": "port",
"Description": "The port used for this HTTP Listener.",
"Type": "string",
"Default": "n/a",
"Required": "yes",
"Support": []
},
{
"Name": "protocol",
"Description": "The Protocol to use for this HTTP Listener. Possible values are",
"Type": "string",
"Default": "n/a",
"Required": "yes",
"Support": [
"Http",
"Https"
]
}
]
34 changes: 34 additions & 0 deletions .config/request_routing_rule_parameters.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[
{
"Name": "name",
"Description": "The Name of this Request Routing Rule.",
"Type": "string",
"Default": "n/a",
"Required": "yes",
"Support": []
},
{
"Name": "http_listener_name",
"Description": "The Name of the HTTP Listener which should be used for this Routing Rule.",
"Type": "string",
"Default": "n/a",
"Required": "yes",
"Support": []
},
{
"Name": "backend_address_pool_name",
"Description": "The Name of the Backend Address Pool which should be used for this Routing Rule.",
"Type": "string",
"Default": "n/a",
"Required": "yes",
"Support": []
},
{
"Name": "backend_http_settings_name",
"Description": "The Name of the Backend HTTP Settings Collection which should be used for this Routing Rule.",
"Type": "string",
"Default": "n/a",
"Required": "yes",
"Support": []
}
]
34 changes: 34 additions & 0 deletions .config/ssl_certificate_parameters.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[
{
"Name": "name",
"Description": "The Name of the SSL certificate that is unique within this Application Gateway.",
"Type": "string",
"Default": "n/a",
"Required": "yes",
"Support": []
},
{
"Name": "data",
"Description": "PFX certificate. Required if key_vault_secret_id is not set.",
"Type": "string",
"Default": "null",
"Required": "no",
"Support": []
},
{
"Name": "password",
"Description": "Password for the pfx file specified in data. Required if data is set.",
"Type": "string",
"Default": "null",
"Required": "no",
"Support": []
},
{
"Name": "key_vault_secret_id",
"Description": "Secret Id of (base-64 encoded unencrypted pfx) Secret or Certificate object stored in Azure KeyVault. You need to enable soft delete for keyvault to use this feature. Required if data is not set.",
"Type": "string",
"Default": "null",
"Required": "no",
"Support": []
}
]
69 changes: 69 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"name": "aztfm",
"image": "mcr.microsoft.com/devcontainers/base:jammy",
"features": {
"ghcr.io/devcontainers/features/azure-cli:1": {
"version": "latest"
},
"ghcr.io/devcontainers/features/terraform:1": {
"installTerraformDocs": true,
"version": "latest",
"tflint": "latest"
},
"ghcr.io/devcontainers-contrib/features/pre-commit:2": {
"version": "latest"
},
"ghcr.io/devcontainers-contrib/features/markdownlint-cli:1": {
"version": "latest"
}
},
"onCreateCommand": "git config credential.useHttpPath true && pre-commit install",
"customizations": {
"vscode": {
"extensions": [
"bierner.markdown-emoji",
"bierner.markdown-preview-github-styles",
"DavidAnson.vscode-markdownlint",
"hashicorp.hcl",
"hashicorp.terraform",
"streetsidesoftware.code-spell-checker",
"redhat.vscode-yaml",
"vscode-icons-team.vscode-icons"
],
"settings": {
"cSpell.files": [
"!.devcontainer/devcontainer.json"
],
"cSpell.words": [
"azurerm"
],
"editor.bracketPairColorization.enabled": true,
"editor.formatOnSave": true,
"editor.formatOnSaveMode": "file",
"editor.guides.bracketPairs": "active",
"editor.suggest.preview": true,
"explorer.compactFolders": false,
"files.autoSave": "afterDelay",
"git.autofetch": true,
"git.confirmSync": false,
"markdown-preview-github-styles.colorTheme": "light",
"terraform.codelens.referenceCount": true,
"terraform.experimentalFeatures.prefillRequiredFields": true,
"terraform.experimentalFeatures.validateOnSave": true,
"redhat.telemetry.enabled": true,
"workbench.iconTheme": "vscode-icons",
"workbench.colorTheme": "Default Dark+",
"[markdown]": {
"editor.defaultFormatter": "DavidAnson.vscode-markdownlint"
},
"[terraform]": {
"editor.defaultFormatter": "hashicorp.terraform",
"editor.tabSize": 2
},
"[yaml]": {
"editor.defaultFormatter": "redhat.vscode-yaml"
}
}
}
}
}
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: [aztfm]
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
labels: ["dependencies"]
36 changes: 36 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: "pre-commit"

on:
pull_request:
branches:
- main

permissions:
id-token: write
contents: read

jobs:
main:
runs-on: ubuntu-latest

steps:
- name: Download repository
uses: actions/checkout@v4

- name: Setup Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_version: "1.3.0"

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.x

- name: Setup Homebrew
uses: Homebrew/actions/setup-homebrew@master

- name: Install dependencies
run: brew install tflint terraform-docs

- uses: pre-commit/[email protected]
Loading
Loading