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
Copy file name to clipboardExpand all lines: docs/index.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,3 +46,4 @@ provider "netbox" {
46
46
47
47
-`allow_insecure_https` (Boolean) Flag to set whether to allow https with invalid certificates
48
48
-`headers` (Map of String) Set these header on all requests to Netbox
49
+
-`skip_version_check` (Boolean) If true, do not try to determine the running Netbox version at provider startup. Disables warnings about possibly unsupported Netbox version. Also useful for local testing on terraform plans.
Description: "If true, do not try to determine the running Netbox version at provider startup. Disables warnings about possibly unsupported Netbox version. Also useful for local testing on terraform plans.",
103
+
},
96
104
},
97
105
ConfigureContextFunc: providerConfigure,
98
106
}
@@ -115,24 +123,31 @@ func providerConfigure(ctx context.Context, data *schema.ResourceData) (interfac
Detail: fmt.Sprintf("This provider was tested against Netbox v%s. Your Netbox version is v%v. Unexpected errors may occur.", supportedVersion, netboxVersion),
135
-
})
144
+
// Currently, there is no way to test these warnings. There is an issue to track this: https://github.com/hashicorp/terraform-plugin-sdk/issues/864
145
+
diags=append(diags, diag.Diagnostic{
146
+
Severity: diag.Warning,
147
+
Summary: "Possibly unsupported Netbox version",
148
+
Detail: fmt.Sprintf("Your Netbox version is v%v. The provider was successfully tested against the following versions:\n\n %v\n\nUnexpected errors may occur.", netboxVersion, strings.Join(supportedVersions, ", ")),
0 commit comments