Skip to content

Commit

Permalink
add monitoring details to application module
Browse files Browse the repository at this point in the history
  • Loading branch information
RMcVelia committed Dec 6, 2023
1 parent 08c30bf commit b0f7908
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
11 changes: 9 additions & 2 deletions aks/application/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ module "web_application" {
service_name = local.service_name
cluster_configuration_map = module.cluster_data.configuration_map
kubernetes_config_map_name = module.application_configuration.kubernetes_config_map_name
kubernetes_secret_name = module.application_configuration.kubernetes_secret_name
docker_image = var.docker_image
}
Expand Down Expand Up @@ -89,6 +89,13 @@ app.MapHealthChecks("/healthcheck/all");

[ASP.NET Core Health Checks Middleware]: https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/health-checks?view=aspnetcore-7.0

### Monitoring

If `azure_enable_monitoring` is `true`, it’s expected that the following resources already exist:

- A resource group named `${azure_resource_prefix}-${service_short}-mn-rg` (where `mn` stands for monitoring and `rg` stands for resource group).
- A monitor action group named `${azure_resource_prefix}-${service_name}` within the above resource group.

## Outputs

### `hostname`
Expand Down
2 changes: 1 addition & 1 deletion aks/application/tfdocs.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ No modules.

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_azure_enable_monitoring"></a> [azure\_enable\_monitoring](#input\_azure\_enable\_monitoring) | n/a | `bool` | `false` | no |
| <a name="input_azure_enable_monitoring"></a> [azure\_enable\_monitoring](#input\_azure\_enable\_monitoring) | Whether to enable monitoring of container failures | `bool` | `false` | no |
| <a name="input_azure_resource_prefix"></a> [azure\_resource\_prefix](#input\_azure\_resource\_prefix) | Prefix of Azure resources for the service | `string` | `null` | no |
| <a name="input_cluster_configuration_map"></a> [cluster\_configuration\_map](#input\_cluster\_configuration\_map) | Configuration map for the cluster | <pre>object({<br> resource_group_name = string,<br> resource_prefix = string,<br> dns_zone_prefix = optional(string),<br> cpu_min = number<br> })</pre> | n/a | yes |
| <a name="input_command"></a> [command](#input\_command) | Custom command that overwrites Docker image | `list(string)` | `[]` | no |
Expand Down
5 changes: 3 additions & 2 deletions aks/application/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ variable "azure_resource_prefix" {
}

variable "azure_enable_monitoring" {
type = bool
default = false
type = bool
default = false
description = "Whether to enable monitoring of container failures"
}

0 comments on commit b0f7908

Please sign in to comment.