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 daf72f9 commit 0b54d7d
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 0 deletions.
23 changes: 23 additions & 0 deletions terraform/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 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.1 |

## Resources

Expand Down Expand Up @@ -201,6 +202,9 @@ 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_statuscake_contact_group_integrations"></a> [statuscake\_contact\_group\_integrations](#input\_statuscake\_contact\_group\_integrations) | List of Integration IDs to connect to your Contact Group | `list(string)` | `[]` | no |
| <a name="input_statuscake_contact_group_name"></a> [statuscake\_contact\_group\_name](#input\_statuscake\_contact\_group\_name) | Name of the contact group in StatusCake | `string` | `""` | no |
| <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
4 changes: 4 additions & 0 deletions terraform/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,8 @@ 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}${local.monitor_endpoint_healthcheck}"
statuscake_contact_group_name = var.statuscake_contact_group_name
statuscake_contact_group_integrations = var.statuscake_contact_group_integrations
}
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.1"

statuscake_api_token = local.statuscake_api_token
statuscake_monitored_resource_address = local.statuscake_monitored_resource_address
statuscake_alert_at = [ # days to alert on
14, 7, 3
]
statuscake_contact_group_name = local.statuscake_contact_group_name
statuscake_contact_group_integrations = local.statuscake_contact_group_integrations
statuscake_contact_group_email_addresses = local.monitor_email_receivers
}
18 changes: 18 additions & 0 deletions terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -277,3 +277,21 @@ 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
}

variable "statuscake_contact_group_name" {
description = "Name of the contact group in StatusCake"
type = string
default = ""
}

variable "statuscake_contact_group_integrations" {
description = "List of Integration IDs to connect to your Contact Group"
type = list(string)
default = []
}

0 comments on commit 0b54d7d

Please sign in to comment.