-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Adding "named_port" support to Google's instance_group_manager. #4605
Conversation
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) |
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.
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}}
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'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.
…d-ports-standardised Bringing into line with #4087
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. |
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. |
This allows HTTP and HTTPs load-balancers to direct traffic to ports other than tcp/80 and tcp/443.