Add a CNAME for the alertmanager.
This commit is contained in:
parent
4482ef3920
commit
45c0bc42c5
|
@ -46,6 +46,7 @@ resource "openstack_compute_floatingip_associate_v2" "prometheus_server" {
|
||||||
|
|
||||||
locals {
|
locals {
|
||||||
prometheus_recordset_name = "${var.prometheus_server_data.name}.${var.dns_zone.zone_name}"
|
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" {
|
resource "openstack_dns_recordset_v2" "prometheus_server_recordset" {
|
||||||
|
@ -56,3 +57,12 @@ resource "openstack_dns_recordset_v2" "prometheus_server_recordset" {
|
||||||
type = "A"
|
type = "A"
|
||||||
records = [openstack_networking_floatingip_v2.prometheus_server_ip.address]
|
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]
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue