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

Adding "named_port" support to Google's instance_group_manager. #4605

Closed
wants to merge 5 commits into from
Closed

Adding "named_port" support to Google's instance_group_manager. #4605

wants to merge 5 commits into from

Conversation

chrusty
Copy link
Contributor

@chrusty chrusty commented Jan 10, 2016

This allows HTTP and HTTPs load-balancers to direct traffic to ports other than tcp/80 and tcp/443.

This allows HTTP and HTTPs load-balancers to direct traffic to ports other than tcp/80 and tcp/443.
// Prepare the list of named ports
namedPortsCount := d.Get("named_port.#").(int)

namedPorts := make([]map[string]interface{}, 0, 1)
Copy link
Contributor

Choose a reason for hiding this comment

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

if these are returned in a different order than the schema stored them in, will reflect.DeepEqual() as used in helper/schema/resource_data.go see them as equal?

e.g.
{0: {"name": "http", "port": 8080}, 1: {"name": "https", "port" 8443}}
{0: {"name": "https", "port": 8443}, 1: {"name": "http", "port" 8080}}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've not encountered issues with it yet, and I've used this branch to build instance_group_managers on 2 different GCE projects (in some tests with up to 10 named-ports). The order which seems to matter is within the .tf files themselves. I've repeatedly run "terraform apply" after the initial run and never seen anything being re-ordered.

Is this what you mean? I understand that it would be a problem if TF considered things to have changed if they came back in the wrong order, but it's certainly not the behaviour I've seen in testing this.

Chris H (CruftMaster) and others added 2 commits January 17, 2016 17:40
@chrusty
Copy link
Contributor Author

chrusty commented Jan 19, 2016

I've used this to build several managed instance-groups in a number of different Google Compute projects, and it seems to work as intended. I was able to bring up managed-instance-groups with named_ports, and bring up "backends" behind HTTP / HTTPs load-balancers which use those ports by name.

@jen20
Copy link
Contributor

jen20 commented Jan 20, 2016

Hi @chrusty! I've squashed the commits and merged thes in 9aa8bbd. Thanks for your contribution!

@jen20 jen20 closed this Jan 20, 2016
@ghost
Copy link

ghost commented Apr 28, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants