Skip to content
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

Merged
merged 3 commits into from
Jul 11, 2023
Merged

GD-12303: Support proxy protocol #237

merged 3 commits into from
Jul 11, 2023

Conversation

itakouna
Copy link
Contributor

No description provided.

including also vendor update
@itakouna itakouna force-pushed the feature/GD-12303 branch 4 times, most recently from 5b15d5c to 217b9c8 Compare July 11, 2023 08:10
@@ -83,6 +83,10 @@ func dataSourceGridscaleLoadBalancer() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},
"proxy_protocol": {
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

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
}

Copy link
Member

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.

Copy link
Member

@nvthongswansea nvthongswansea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@itakouna itakouna merged commit 80f0f90 into master Jul 11, 2023
@nvthongswansea nvthongswansea deleted the feature/GD-12303 branch September 25, 2024 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants