Closed dmaple-gci closed 5 years ago
Hi, I am also looking to use the respcode property I tried to adjust the code to see if i could incorporate it but when a try to run the build i get this below, any pointers you can provide would be very helpful. I am not proficient in development but am able to understand the code to a degree and make small adjustments.
PS C:\NetscalerProviderCompile> go run main.go
.\main.go:25:3: cannot use "github.com/citrix/terraform-provider-netscaler/netscaler".Provider (type func() "github.com/citrix/terraform-provider-netscaler/vendor/github.com/hashicorp/terraform/terraform".ResourceProvider) as type "github.com/hashicorp/terraform/plugin".ProviderFunc in field value
The definition for netscaler_lbmonitor resource is missing the respcode field.
From the Nitro API docs: respcode | <String[]> | Read-write | Response codes for which to mark the service as UP. For any other response code, the action performed depends on the monitor type. HTTP monitors and RADIUS monitors mark the service as DOWN, while HTTP-INLINE monitors perform the action indicated by the Action parameter.
Terraform resource example:
resource "netscaler_lbmonitor" "https_ignore_errors" { monitorname = "https_ignore_errors" type = "HTTP" secure = "YES" interval = 5 resptimeout = 3 respcode = ["200","301-302","400-404","500-504"] }
Output of terraform plan:
Error: netscaler_lbmonitor.https_ignore_errors: : invalid or unknown key: respcode