-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update the API parameter from user to username #63
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @altmas5, thanks for this PR!
However, in its current state it breaks compatibility with Zabbix versions older than 5.4.
And in the current state of the provider, it has compatibility issues with versions 5.0 and newer, e.g. :
@@ -87,7 +87,7 @@ func providerConfigure(d *schema.ResourceData, terraformVersion string) (interfa | |||
|
|||
api.SetClient(client) | |||
|
|||
if _, err := api.Login(d.Get("user").(string), d.Get("password").(string)); err != nil { | |||
if _, err := api.Login(d.Get("username").(string), d.Get("password").(string)); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simply changing user
into username
will break compatibility with Zabbix versions older than 5.4
ZBXNEXT-6474 user.login: Renamed parameter user → username.
https://www.zabbix.com/documentation/5.4/en/manual/api/changes_5.2_-_5.4#user
@@ -16,7 +16,7 @@ import ( | |||
func Provider() *schema.Provider { | |||
p := &schema.Provider{ | |||
Schema: map[string]*schema.Schema{ | |||
"user": &schema.Schema{ | |||
"username": &schema.Schema{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure it is required to rename the provider attribute, as it is a breaking change.
Even so less if we want to maintain compatibility with older Zabbix versions which use user
.
user
is Deprecated in version 6.4. #62See ZBXNEXT-8085
cc @pdecat