diff --git a/openstack-tf/common_setups/35-prometheus.tf b/openstack-tf/common_setups/35-prometheus.tf index 8730b5ae..7649fe17 100644 --- a/openstack-tf/common_setups/35-prometheus.tf +++ b/openstack-tf/common_setups/35-prometheus.tf @@ -46,6 +46,7 @@ resource "openstack_compute_floatingip_associate_v2" "prometheus_server" { locals { prometheus_recordset_name = "${var.prometheus_server_data.name}.${var.dns_zone.zone_name}" + alertmanager_recordset_name = "alertmanager.${var.dns_zone.zone_name}" } resource "openstack_dns_recordset_v2" "prometheus_server_recordset" { @@ -56,3 +57,12 @@ resource "openstack_dns_recordset_v2" "prometheus_server_recordset" { type = "A" records = [openstack_networking_floatingip_v2.prometheus_server_ip.address] } + +resource "openstack_dns_recordset_v2" "alertmanager_server_recordset" { + zone_id = var.dns_zone_id + name = local.alertmanager_recordset_name + description = "Prometheus alertmanager" + ttl = 8600 + type = "CNAME" + records = [local.prometheus_recordset_name] +}