Skip to content

Commit

Permalink
Added Statuscake TLS Monitor
Browse files Browse the repository at this point in the history
* This will allow us to get Slack alerts as the day of expiry approaches
  • Loading branch information
DrizzlyOwl committed Oct 16, 2023
1 parent 5531770 commit 590d877
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 0 deletions.
2 changes: 2 additions & 0 deletions terraform/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ If everything looks good, answer `yes` and wait for the new infrastructure to be
|------|--------|---------|
| <a name="module_azure_container_apps_hosting"></a> [azure\_container\_apps\_hosting](#module\_azure\_container\_apps\_hosting) | github.com/DFE-Digital/terraform-azurerm-container-apps-hosting | v1.1.0 |
| <a name="module_azurerm_key_vault"></a> [azurerm\_key\_vault](#module\_azurerm\_key\_vault) | github.com/DFE-Digital/terraform-azurerm-key-vault-tfvars | v0.2.1 |
| <a name="module_statuscake-tls-monitor"></a> [statuscake-tls-monitor](#module\_statuscake-tls-monitor) | github.com/dfe-digital/terraform-statuscake-tls-monitor | v0.1.0 |

## Resources

Expand Down Expand Up @@ -201,6 +202,7 @@ If everything looks good, answer `yes` and wait for the new infrastructure to be
| <a name="input_project_name"></a> [project\_name](#input\_project\_name) | Project name. Will be used along with `environment` as a prefix for all resources. | `string` | n/a | yes |
| <a name="input_redis_cache_capacity"></a> [redis\_cache\_capacity](#input\_redis\_cache\_capacity) | Redis Cache Capacity | `number` | n/a | yes |
| <a name="input_redis_cache_sku"></a> [redis\_cache\_sku](#input\_redis\_cache\_sku) | Redis Cache SKU | `string` | n/a | yes |
| <a name="input_statuscake_api_token"></a> [statuscake\_api\_token](#input\_statuscake\_api\_token) | API token for StatusCake | `string` | n/a | yes |
| <a name="input_tags"></a> [tags](#input\_tags) | Tags to be applied to all resources | `map(string)` | n/a | yes |
| <a name="input_tfvars_filename"></a> [tfvars\_filename](#input\_tfvars\_filename) | tfvars filename. This file is uploaded and stored encrypted within Key Vault, to ensure that the latest tfvars are stored in a shared place. | `string` | n/a | yes |
| <a name="input_virtual_network_address_space"></a> [virtual\_network\_address\_space](#input\_virtual\_network\_address\_space) | Virtual network address space CIDR | `string` | n/a | yes |
Expand Down
2 changes: 2 additions & 0 deletions terraform/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,6 @@ locals {
key_vault_access_users = var.key_vault_access_users
key_vault_access_ipv4 = var.key_vault_access_ipv4
tfvars_filename = var.tfvars_filename
statuscake_api_token = var.statuscake_api_token
statuscake_monitored_resource_address = "https://${local.dns_zone_domain_name}${monitor_endpoint_healthcheck}"
}
12 changes: 12 additions & 0 deletions terraform/statuscake-tls-monitor.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module "statuscake-tls-monitor" {
source = "github.com/dfe-digital/terraform-statuscake-tls-monitor?ref=v0.1.0"

statuscake_api_token = local.statuscake_api_token
statuscake_monitored_resource_address = local.statuscake_monitored_resource_address
statuscake_alert_at = [ # days to alert on
60, 30, 14, 7, 3, 1
]
statuscake_contact_group_name = "Find Information About Academies And Trusts"
statuscake_contact_group_email_addresses = local.monitor_email_receivers
statuscake_contact_group_integrations = ["53598"]
}
6 changes: 6 additions & 0 deletions terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -277,3 +277,9 @@ variable "tfvars_filename" {
description = "tfvars filename. This file is uploaded and stored encrypted within Key Vault, to ensure that the latest tfvars are stored in a shared place."
type = string
}

variable "statuscake_api_token" {
description = "API token for StatusCake"
type = string
sensitive = true
}

0 comments on commit 590d877

Please sign in to comment.