Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

namespace ignored for volterra_dns_lb_health_check and volterra_dns_lb_pool #213

Open
ghost opened this issue Jun 15, 2023 · 0 comments
Open

Comments

@ghost
Copy link

ghost commented Jun 15, 2023

I am creating a DNS load balancer and seeing errors when trying to create within a namespace.

When the Volterra provider creates the volterra_dns_lb_health_check and volterra_dns_lb_pool objects, they appear in the system namespace, and not the namespace specified.

Terraform plan:

resource "volterra_namespace" "my-namespace" {
  name = "my-namespace"
}

resource "volterra_dns_lb_health_check" "www-juiceshop-vip-health-check" {
  name      = "www-juiceshop-vip-health-check"
  namespace = "my-namespace"

  https_health_check {
    health_check_port = "443"
    receive           = ""
    send              = ""
  }
}

resource "volterra_dns_lb_pool" "www-juiceshop-vip" {
  name                = "www-juiceshop-vip"
  namespace           = "my-namespace"
  load_balancing_mode = "ROUND_ROBIN"

  a_pool {
    max_answers          = "1"
    health_check {
      name = "${volterra_dns_lb_health_check.www-juiceshop-vip-health-check.name}"
    }
    members {
        ip_endpoint = "${aws_eip.WestBIGIPDataEIP.public_ip}"
        priority    = "10"
        ratio       = "10"
      }
    members {
        ip_endpoint = "${aws_eip.EastBIGIPDataEIP.public_ip}"
        priority    = "10"
        ratio       = "10"
      }
  }
  use_rrset_ttl = true
}
resource "volterra_dns_load_balancer" "www-juiceshop-vip" {
  name        = "juiceshop-vip"
  description = "GSLB for www.juiceshop.vip"
  namespace   = "my-namespace"

  record_type = "A"
  rule_list {
    rules {
      pool {
        name      = "www-juiceshop-vip"
      }
      geo_location_label_selector {
        expressions = ["region in (us-west1, us-west2),tier in (staging)"]
      }
      score = "50"
    }
  }
}

resource "volterra_dns_zone" "juiceshop-vip" {
  name = "${var.labDomain}"
  namespace = "my-namespace"
  primary {
    rr_set_group {
      metadata {
        description = "Global DNS Names (GSLB)"
        disable = false
        name = "global"
      }
      rr_set {
        ttl = "60"
        lb_record {
          name = "www"
          value {
            name = "juiceshop-vip"
          }
        }
      }
    }
    rr_set_group {
      metadata {
        description = "West Region"
        disable = false
        name = "west"
      }
      rr_set {
        ttl = "60"
        a_record {
          name = "www-west"
          values = ["${aws_eip.WestBIGIPDataEIP.public_ip}"]
        }
      }
      rr_set {
        ttl = "60"
        a_record {
          name = "west-dns"
          values = ["${aws_eip.WestBIGIPServerEIP.public_ip}"]
        }
      }
      rr_set {
        ttl = "60"
        a_record {
          name = "west-bigip"
          values = ["${aws_eip.WestBIGIPMgmtEIP.public_ip}"]
        }
      }
      rr_set {
        ttl = "60"
        a_record {
          name = "west-server"
          values = ["${aws_eip.WestServerEIP.public_ip}"]
        }
      }
      rr_set {
        ttl = "60"
        aaaa_record {
          name = "west-server"
          values = ["${one(aws_network_interface.WestServerENI.ipv6_addresses)}"]
        }
      }
    }
    rr_set_group {
      metadata {
        description = "Management Hosts"
        disable = false
        name = "management"
      }
      rr_set {
        ttl = "60"
        a_record {
          name = "netbox"
          values = ["${aws_eip.DockerEIP.public_ip}"]
        }
      }
      rr_set {
        ttl = "60"
        a_record {
          name = "docker"
          values = ["${aws_eip.DockerEIP.public_ip}"]
        }
      }
      rr_set {
        ttl = "60"
        a_record {
          name = "prometheus"
          values = ["${aws_eip.DockerEIP.public_ip}"]
        }
      }
      rr_set {
        ttl = "60"
        a_record {
          name = "grafana"
          values = ["${aws_eip.DockerEIP.public_ip}"]
        }
      }
    }
    rr_set_group {
      metadata {
        description = "East Region"
        disable = false
        name = "east"
      }
      rr_set {
        ttl = "60"
        a_record {
          name = "www-east"
          values = ["${aws_eip.EastBIGIPDataEIP.public_ip}"]
        }
      }
      rr_set {
        ttl = "60"
        a_record {
          name = "east-dns"
          values = ["${aws_eip.EastBIGIPServerEIP.public_ip}"]
        }
      }
      rr_set {
        ttl = "60"
        a_record {
          name = "east-bigip"
          values = ["${aws_eip.EastBIGIPMgmtEIP.public_ip}"]
        }
      }
      rr_set {
        ttl = "60"
        a_record {
          name = "east-server"
          values = ["${aws_eip.EastServerEIP.public_ip}"]
        }
      }
      rr_set {
        ttl = "60"
        aaaa_record {
          name = "east-server"
          values = ["${one(aws_network_interface.EastServerENI.ipv6_addresses)}"]
        }
      }
    }
  }
  depends_on = [
    volterra_dns_load_balancer.www-juiceshop-vip
  ]
}

When I look in the console, both of these items are created in the system namespace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants