site24x7 / terraform-provider-site24x7

Terraform provider for Site24x7
MIT License
22 stars 33 forks source link

`lookup_type` Parameter Not Setting to "MX" for `search_config` Block in `site24x7_dns_server_monitor` Resource #281

Open kardanielyan opened 2 months ago

kardanielyan commented 2 months ago

While creating a DNS server monitor resource using the site24x7_dns_server_monitor resource in the Site24x7 Terraform provider, the lookup_type parameter within the search_config block is not being set correctly. Despite specifying "MX" as the value, the provider does not apply this setting and returns an error. However, specifying "NS" as the lookup_type works without issues.

terraform {
  required_version = ">= 1.3.9, < 1.6"
  required_providers {
    site24x7 = {
      source  = "site24x7/site24x7"
      version = ">= 1.0.90"
    }
  }
}

resource "site24x7_dns_server_monitor" "example_mx_records" {
  display_name            = "example MX records"
  dns_host                = "ns-cloud-c1.googledomains.com"
  domain_name             = "example.com"
  dns_port                = "53"
---
  search_config {
    lookup_type = "NS" # This should be "MX". 
    target      = "alt1.aspmx.l.google.com."
    priority    = 5
    ttl         = 300
    ttlo        = 2
  }
  search_config {
    lookup_type = "NS" # This should be "MX". 
    target      = "alt2.aspmx.l.google.com."
    priority    = 5
    ttl         = 300
    ttlo        = 2
  }
---
}