-
Notifications
You must be signed in to change notification settings - Fork 11
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
GD-12303: Support proxy protocol #237
Conversation
including also vendor update
5b15d5c
to
217b9c8
Compare
217b9c8
to
2e2b62a
Compare
@@ -83,6 +83,10 @@ func dataSourceGridscaleLoadBalancer() *schema.Resource { | |||
Type: schema.TypeString, | |||
Computed: true, | |||
}, | |||
"proxy_protocol": { |
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.
I don't see the code to set this attribute in the datasource.
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.
is not set in?
if err = d.Set("backend_server", flattenLoadbalancerBackendServers(loadbalancer.Properties.BackendServers)); err != nil {
return fmt.Errorf("%s error setting BackendServers: %v", errorPrefix, err)
}
otherwise how the test is passed.
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.
@itakouna this function only does for "weight" and "host".
func flattenLoadbalancerBackendServers(backendServers []gsclient.BackendServer) []interface{} {
tempBackendServers := make([]interface{}, 0)
if backendServers != nil {
for _, value := range backendServers {
backendServer := map[string]interface{}{
"weight": value.Weight,
"host": value.Host,
}
tempBackendServers = append(tempBackendServers, backendServer)
}
}
return tempBackendServers
}
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.
@itakouna oh I see you updated that function now. Github redirects me to the original function (before your change) when I click on the function name.
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.
LGTM
No description provided.