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

[Bug]: DNS record optional in DNS trace #171

Open
edwinsalazar opened this issue Jun 14, 2024 · 0 comments
Open

[Bug]: DNS record optional in DNS trace #171

edwinsalazar opened this issue Jun 14, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@edwinsalazar
Copy link

What versions are you using?

required_providers {
thousandeyes = {
source = "thousandeyes/thousandeyes"
version = "2.0.1"
}
}

What did you expect to happen?

Based on the documentation, the DNS record is optional, and it will use ANY if it isn't specified.

What actually happened?

i am getting this message

Error: invalid value for domain (must suffix with record type; check ThousandEyes Developer Reference for more information)
with thousandeyes_dns_trace.dns["www_cisco_com"]
on tests.tf line 27, in resource "thousandeyes_dns_trace" "dns":
domain = each.value.test_url

Terraform code to reproduce the bug

tests.csv
test_resource,test_name,test_url
"app_thousandeyes_com","app.thousandeyes.com","https://app.thousandeyes.com"
"www_lacnic_net","www.lacnic.net","https://www.lacnic.net"
"www_cisco_com","www.cisco.com","https://www.cisco.com"


locals {
  tests = csvdecode(file("${path.module}/tests.csv"))
  }

resource "thousandeyes_dns_trace" "dns" {
  for_each = tomap({ for inst in local.tests : inst.test_resource => inst })
  test_name      = each.value.test_name
  description    = "by terraform"
  interval       = var.test_interval
  alerts_enabled = var.alerts
  domain = each.value.test_url
  dynamic "agents" {
    for_each = local.agentId
    content  {
    agent_id   = agents.value
    }
  }
}

Any additional comments or code?

No response

Steps to reproduce the bug

  1. define TF DNS resource
  2. add domain only without DNS record
  3. get error
@edwinsalazar edwinsalazar added the bug Something isn't working label Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant