thousandeyes / terraform-provider-thousandeyes

ThousandEyes Terraform Provider
Apache License 2.0
21 stars 26 forks source link

[Feature]: Add server_port argument to the "thousandeyes_voice" resource #160

Open omaslara opened 8 months ago

omaslara commented 8 months ago

Hi team,

The thousandeyes_voice resource for the current terraform provider version (2.0.6) doesn't have an argument to set the "Server Port" value.

Check the resource documentation here: https://registry.terraform.io/providers/thousandeyes/thousandeyes/2.0.6/docs/resources/voice

It will be great to have a way to provision from Terraform a Voice test targeting the desired server port, the same way we can do it via UI:

image

Today the tests are created with the default port value of 49152 as shown in the above screenshot.

Sample code:

terraform {
  required_providers {
    thousandeyes = {
      source  = "thousandeyes/thousandeyes"
      version = ">= 2.0.6"
    }
  }
}

provider "thousandeyes" {
  token            = "your_token"
  account_group_id = "your_account_group_id"
}

data "thousandeyes_agent" "miami" {
  agent_name = "Miami, FL"
}

data "thousandeyes_agent" "chicago_webex" {
  agent_name = "Chicago, IL (Webex)"
}

resource "thousandeyes_voice" "nprod_webex_voice" {
  test_name        = "NPROD - Webex Voice"
  interval         = 300
  bgp_measurements = false
  dscp_id          = 46
  codec_id         = 0

  target_agent_id = data.thousandeyes_agent.chicago_webex.agent_id

  agents {
    agent_id = data.thousandeyes_agent.miami.agent_id
  }
}

Recommended solution: Add server_port or a similar argument to the thousandeyes_voice resource schema to configure the port from Terraform.