You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating a TCP health check monitor (type = "tcp"), the provider causes constant drift for two settings that are not applicable to TCP monitors but have default values in the provider:
path defaults to "/" but is not applicable for TCP checks
method defaults to "GET" but TCP checks use "connection_established" internally
This results in every terraform plan showing changes that can never be applied successfully. Unfortunately, this makes a lot of “noise” if you want to apply a real changes.
Technical Details
I guess the issue has two root causes:
The schema defines defaults that only make sense for HTTP(S) monitors but not for TCP:
cisGLBHealthCheckPath: {
Type: schema.TypeString,
Description: "path",
Optional: true,
Default: "/", // This default causes drift for TCPValidateFunc: validate.ValidateURLPath,
},
cisGLBHealthCheckMethod: {
Type: schema.TypeString,
Description: "method",
Optional: true,
Default: "GET", // This default causes drift for TCPValidateFunc: validate.InvokeValidator(ibmCISHealthCheck, cisGLBHealthCheckMethod),
},
Expected Behavior
For TCP monitors:
path should not have a default value when type = "tcp"
method should either accept "connection_established" or be completely optional for TCP monitors
The schema should be conditional based on the monitor type to avoid setting HTTP(S)-specific defaults for TCP monitors.
The text was updated successfully, but these errors were encountered:
Description
When creating a TCP health check monitor (
type = "tcp"
), the provider causes constant drift for two settings that are not applicable to TCP monitors but have default values in the provider:path
defaults to "/" but is not applicable for TCP checksmethod
defaults to "GET" but TCP checks use "connection_established" internallyThis results in every
terraform plan
showing changes that can never be applied successfully. Unfortunately, this makes a lot of “noise” if you want to apply a real changes.Technical Details
I guess the issue has two root causes:
Expected Behavior
For TCP monitors:
path
should not have a default value when type = "tcp"method
should either accept "connection_established" or be completely optional for TCP monitorsThe schema should be conditional based on the monitor type to avoid setting HTTP(S)-specific defaults for TCP monitors.
The text was updated successfully, but these errors were encountered: