site24x7 / terraform-provider-site24x7

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

Unable to Import `site24x7_web_transaction_browser_monitor` #283

Open kardanielyan opened 2 months ago

kardanielyan commented 2 months ago

The site24x7_web_transaction_browser_monitor resource in the Site24x7 Terraform provider cannot be imported due to a bug. Attempting to import this resource results in an error indicating that a string cannot be unmarshalled into a Go struct field of type bool. But the parameter ignore_cert_err = true is set.

terraform  import module.site24x7.site24x7_web_transaction_browser_monitor.sandbox 212************53
│ Error: json: cannot unmarshal string into Go struct field WebTransactionBrowserMonitor.ignore_cert_err of type bool

Example Code:


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

resource "site24x7_web_transaction_browser_monitor" "sandbox" {
  display_name            = "sandbox  Report - example.com"
  base_url                = "https://example.com/#/sandbox/login"
  selenium_script         = ""
  script_type             = "txt"
  check_frequency         = "15"
  async_dc_enabled        = true
  browser_type            = 1
  browser_version         = 10101
  user_agent              = "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:94.0) Gecko/20100101 Firefox/83.0"
  think_time              = 1
  page_load_time          = 45
  resolution              = "1600,900"
  ignore_cert_err         = true

  ---
}