Skip to content

v2.0.0

Compare
Choose a tag to compare
@pedro-te pedro-te released this 27 Feb 11:57
· 15 commits to main since this release
7a3db27

What's Changed

  • BREAKING CHANGE: labels/groups attachment to tests/agents updates by @pedro-te in #125

Full Changelog: v1.3.3...v2.0.0

Additional information on the breaking change

Going forward it will no longer be possible to attach a label/group to a test in any test resource. Test resources obtain the labels linked to them via the API automatically (computed fields). Labels are now linked to tests only in the label resource. This diverges from what the ThousandEyes API allows, but is necessary considering how terraform works, as it was previously possible to have a test resource cancel out a label that is being added to it in a label resource, because the test resource wasn't setting the label.

Example:

resource "thousandeyes_agent_to_server" "thousandeyes_agent_to_server_icmp_test" {
  test_name = "Pedro-test: Example Agent to Server ICMP test from Terraform provider"
  interval = 120
  alerts_enabled = false
  server = "www.thousandeyes.com"
  protocol = "ICMP"
  enabled = false

  agents {
    agent_id = X
  }
}

resource "thousandeyes_agent_to_server" "thousandeyes_agent_to_server_tcp_no_port" {
  test_name      = "Pedro-test: agent to server TCP no port from terraform provider"
  interval       = 120
  alerts_enabled = false
  use_public_bgp = false
  enabled        = false

  server = "www.thousandeyes.com"

  agents {
    agent_id = X
  }

  # BREAKING CHANGE HERE
  //groups {
  //  group_id = thousandeyes_label.pedro-label.group_id <--- # THIS IS NO LONGER POSSIBLE, THIS IS NOW A COMPUTED FIELD
  //}
}

resource "thousandeyes_label" "pedro-label" {
  name     = "Pedro - Test Label"
  type     = "tests"

  tests {
    test_id = thousandeyes_agent_to_server.thousandeyes_agent_to_server_tcp_no_port.test_id 
  }

  tests {
    test_id = thousandeyes_agent_to_server.thousandeyes_agent_to_server_icmp_test.test_id 
  }
}