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

[2142] More documentation #137

Merged
merged 2 commits into from
Dec 9, 2024
Merged
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
2 changes: 1 addition & 1 deletion aks/application/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Terraform code for deploying an application.

## Terraform documentation
For the list of requirement, inputs, outputs, resources... check the [terraform module documentation](tfdocs).
For the list of requirement, inputs, outputs, resources... check the [terraform module documentation](tfdocs.md).

## Usage

Expand Down
2 changes: 1 addition & 1 deletion aks/application_configuration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Terraform code for generating the application configuration.

## Terraform documentation
For the list of requirement, inputs, outputs, resources... check the [terraform module documentation](tfdocs).
For the list of requirement, inputs, outputs, resources... check the [terraform module documentation](tfdocs.md).

## Usage

Expand Down
2 changes: 1 addition & 1 deletion aks/cluster_data/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Terraform module for managing information about the cluster.

## Terraform documentation
For the list of requirement, inputs, outputs, resources... check the [terraform module documentation](tfdocs).
For the list of requirement, inputs, outputs, resources... check the [terraform module documentation](tfdocs.md).

## Usage

Expand Down
2 changes: 1 addition & 1 deletion aks/dfe_analytics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Create resources in Google cloud Bigquery and provides the required variables to applications so they can send events.

## Terraform documentation
For the list of requirement, inputs, outputs, resources... check the [terraform module documentation](tfdocs).
For the list of requirement, inputs, outputs, resources... check the [terraform module documentation](tfdocs.md).

## Usage
### Reuse existing dataset and events table
Expand Down
2 changes: 1 addition & 1 deletion aks/postgres/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Terraform code for deploying a PostgreSQL instance.

## Terraform documentation
For the list of requirement, inputs, outputs, resources... check the [terraform module documentation](tfdocs).
For the list of requirement, inputs, outputs, resources... check the [terraform module documentation](tfdocs.md).

## Usage

Expand Down
2 changes: 1 addition & 1 deletion aks/redis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Terraform code for deploying a Redis instance.

## Terraform documentation
For the list of requirement, inputs, outputs, resources... check the [terraform module documentation](tfdocs).
For the list of requirement, inputs, outputs, resources... check the [terraform module documentation](tfdocs.md).

## Usage

Expand Down
2 changes: 1 addition & 1 deletion aks/secrets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Terraform code for extracting secrets from Azure Key Vaults.

## Terraform documentation
For the list of requirement, inputs, outputs, resources... check the [terraform module documentation](tfdocs).
For the list of requirement, inputs, outputs, resources... check the [terraform module documentation](tfdocs.md).

## Usage

Expand Down
89 changes: 0 additions & 89 deletions dns/Readme.md

This file was deleted.

8 changes: 0 additions & 8 deletions dns/records/data.tf

This file was deleted.

49 changes: 47 additions & 2 deletions dns/records/readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,51 @@
# DNS records

Terraform code for managing Azure DNS records.
Terraform code for managing Azure DNS records, currently A and CNAME records.

## Terraform documentation
For the list of requirement, inputs, outputs, resources... check the [terraform module documentation](tfdocs).
For the list of requirement, inputs, outputs, resources... check the [terraform module documentation](tfdocs.md).

## Variable
```json
{
"hosted_zone": {
"<zone 1 domain>": {
"resource_group_name": "<resource group>", # Usually the same resource group for all domains of a service
"a-records": { # List of A records
"<name>": {
"target": "<value>"
},
...
},
"cnames": { # List of CNAME records
"<name>": {
"target": "<value>"
},
...
}
}
}
}
```

## Example
```json
{
"hosted_zone": {
"teacherservices.cloud": {
"resource_group_name": "s189p01-tscdomains-rg",
"a-records": {
"test": {
"target": "51.52.53.54"
}
},
"cnames": {
"_7008a420a798s7d6fs8df7": {
"target": "_9867w9ef698hery8.vnfitht.acm-validations.aws",
"ttl": 86400
}
}
}
}
}
```
3 changes: 1 addition & 2 deletions dns/records/tfdocs.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,12 @@ No modules.
|------|------|
| [azurerm_dns_a_record.a_records](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/dns_a_record) | resource |
| [azurerm_dns_cname_record.cname_records](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/dns_cname_record) | resource |
| [azurerm_dns_zone.dns_zone](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/dns_zone) | data source |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_hosted_zone"></a> [hosted\_zone](#input\_hosted\_zone) | n/a | `map(any)` | `{}` | no |
| <a name="input_hosted_zone"></a> [hosted\_zone](#input\_hosted\_zone) | List of zones and the records to create for each one. See [README](readme.md) for details. | `map(any)` | `{}` | no |

## Outputs

Expand Down
5 changes: 3 additions & 2 deletions dns/records/variables.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
variable "hosted_zone" {
type = map(any)
default = {}
type = map(any)
default = {}
description = "List of zones and the records to create for each one. See [README](readme.md) for details."
}
40 changes: 38 additions & 2 deletions dns/zones/readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,42 @@
# DNS Zones

Terraform code for managing Azure DNS Zones.
Terraform code for managing Azure DNS Zones and their default CAA and TXT records.

## Terraform documentation
For the list of requirement, inputs, outputs, resources... check the [terraform module documentation](tfdocs).
For the list of requirement, inputs, outputs, resources... check the [terraform module documentation](tfdocs.md).

## Variable
```json
{
"hosted_zone": {
"<zone 1 domain>": {
"resource_group_name": "<resource group>", # Usually the same resource group for all domains of a service
"caa_record_list": ["xxx", ...], # CAA list valid domains for generating TLS certificates
"txt_record_lists": { # Additional TXT records
"<name>": ["x=y", ...]
}
}
}
}
```

## Example
```json
{
"hosted_zone": {
"teacherservices.cloud": {
"resource_group_name": "s189p01-tscdomains-rg",
"caa_record_list": [
"globalsign.com",
"digicert.com"
],
"txt_record_lists": {
"@": [
"v=spf1 -all",
"_globalsign-domain-verification=XXXX"
]
}
}
}
}
```
4 changes: 2 additions & 2 deletions dns/zones/tfdocs.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ No modules.

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_hosted_zone"></a> [hosted\_zone](#input\_hosted\_zone) | n/a | `map(any)` | `{}` | no |
| <a name="input_tags"></a> [tags](#input\_tags) | n/a | `any` | `null` | no |
| <a name="input_hosted_zone"></a> [hosted\_zone](#input\_hosted\_zone) | List of zones and their properties. See [README](readme.md) for details. | `map(any)` | `{}` | no |
| <a name="input_tags"></a> [tags](#input\_tags) | Azure resource tags. Deprecated: set tags at resource group level | `any` | `null` | no |

## Outputs

Expand Down
9 changes: 5 additions & 4 deletions dns/zones/variables.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@

variable "hosted_zone" {
type = map(any)
default = {}
type = map(any)
default = {}
description = "List of zones and their properties. See [README](readme.md) for details."
}

variable "tags" {
default = null
default = null
description = "Azure resource tags. Deprecated: set tags at resource group level"
}
2 changes: 1 addition & 1 deletion domains/environment_domains/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
Create domains for each environment in the [domains infrastructure](../infrastructure/). Generates the DNS records as well as front door domain, endpoint, route, origin, redirect rules...

## Terraform documentation
For the list of requirement, inputs, outputs, resources... check the [terraform module documentation](tfdocs).
For the list of requirement, inputs, outputs, resources... check the [terraform module documentation](tfdocs.md).
16 changes: 15 additions & 1 deletion domains/infrastructure/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,18 @@
Create DNS zone, front door and the default DNS records that will be used to support the service domains of each environment, using the [environment_domains module](../environment_domains/README).

## Terraform documentation
For the list of requirement, inputs, outputs, resources... check the [terraform module documentation](tfdocs).
For the list of requirement, inputs, outputs, resources... check the [terraform module documentation](tfdocs.md).

## Azure Front Door Diagnostics Log Query
When monitoring is enabled, front door logs are available for query in the Log analytics workspace.
For example, this query filters logs for client requests that returned HTTP status codes of 400 or above, groups these error requests by the host, path, HTTP status code, and resource ID, and then counts them.

```kql
AzureDiagnostics
| where ResourceProvider == "MICROSOFT.NETWORK" and Category == "FrontdoorAccessLog"
| where isReceivedFromClient_b == true
| where toint(httpStatusCode_s) >= 400
| extend ParsedUrl = parseurl(requestUri_s)
| summarize RequestCount = count() by Host = tostring(ParsedUrl.Host), Path = tostring(ParsedUrl.Path), StatusCode = httpStatusCode_s, ResourceId
| order by RequestCount desc
```
18 changes: 0 additions & 18 deletions domains/infrastructure/diagnostics.md

This file was deleted.

Loading