citrix / terraform-provider-citrixadc

Part of NetScaler Automation Toolkit | https://github.com/netscaler/automation-toolkit
https://registry.terraform.io/providers/citrix/citrixadc
Apache License 2.0
119 stars 59 forks source link

Response Code Field Missing from Resource netscaler_lbmonitor #27

Closed dmaple-gci closed 5 years ago

dmaple-gci commented 5 years ago

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

faisaleem commented 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

command-line-arguments

.\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