diff --git a/openstack-tf/docker_swarm_setup/docker-swarm.tf b/openstack-tf/docker_swarm_setup/docker-swarm.tf index c9b90321..b013eb2d 100644 --- a/openstack-tf/docker_swarm_setup/docker-swarm.tf +++ b/openstack-tf/docker_swarm_setup/docker-swarm.tf @@ -240,6 +240,7 @@ resource "openstack_networking_floatingip_associate_v2" "swarm_lb" { locals { swarm_recordset_name = "${var.octavia_swarm_data.swarm_lb_hostname}.${var.dns_zone.zone_name}" + portainer_recordset_name = "portainer.${var.dns_zone.zone_name}" ccp_recordset_name = "ccp.${var.dns_zone.zone_name}" cdn_recordset_name = "cdn.${var.dns_zone.zone_name}" conductor_recordset_name = "conductor.${var.dns_zone.zone_name}" @@ -254,6 +255,15 @@ resource "openstack_dns_recordset_v2" "swarm_lb_dns_recordset" { records = [openstack_networking_floatingip_v2.swarm_lb_ip.address] } +resource "openstack_dns_recordset_v2" "swarm_portainer_dns_recordset" { + zone_id = var.dns_zone_id + name = local.portainer_recordset_name + description = "Portainer hostname" + ttl = 8600 + type = "CNAME" + records = [local.swarm_recordset_name] +} + resource "openstack_dns_recordset_v2" "ccp_dns_recordset" { zone_id = var.dns_zone_id name = local.ccp_recordset_name