-
Notifications
You must be signed in to change notification settings - Fork 982
Hybrid neg with ip_address obtained at runtime in net-ilb-l7 module #1055
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
Comments
Hey Miren, thanks for flagging this. If we want to be able to pass dynamic values to endpoints, their variable type needs to change from list to map. It's a bit unfortunate as keys would be there just to avoid this error, but I can understand the use case is pretty common. |
Miren, I just tried this and it runs without issues: resource "google_compute_address" "test" {
name = "neg-test"
subnetwork = var.subnet.self_link
address_type = "INTERNAL"
address = "10.0.0.10"
region = "europe-west1"
}
module "ilb-l7" {
source = "./fabric/modules/net-ilb-l7"
name = "ilb-test"
project_id = var.project_id
region = "europe-west1"
backend_service_configs = {
default = {
backends = [{
balancing_mode = "RATE"
group = "my-neg"
max_rate = { per_endpoint = 1 }
}]
}
}
neg_configs = {
my-neg = {
gce = {
zone = "europe-west1-b"
endpoints = [{
instance = "test-1"
ip_address = google_compute_address.test.address
# ip_address = "10.0.0.10"
port = 80
}]
}
}
}
vpc_config = {
network = var.vpc.self_link
subnetwork = var.subnet.self_link
}
} Can you share the code that is failing for you? |
This, I was emulating on-prem to point my nubrid neg to an ILB in another project. In the previous version of the module it was not failing |
So your problem is consuming the forwarding rule address, as address endpoint in a different module? If so I would reserve the address outside and pass it in. |
thanks, I'll try that |
Miren, the previous version of the module allowed you to create an address for the forwarding rule. The new version does not do that, since we have an "address" module for that. I think the difference in behaviour comes from that. Try reserving the address outside of the module and passing it in. |
I got the same error with
|
Strange, as I was using the same thing in the example above, just with a single LB. Let me try and reproduce, it will take me a bit as I have a pretty full day. |
Ok, I know what the problem is. My example above used a vm neg, this is a hybrid neg and we're using the IP in the keys for the |
* test * fix #1055 for net-ilb-l7 * fix glb module
In the net-ilb-l7 module I could before create a hybrid neg with an ip_address that was obtained at runtime and now I cannot. I get this error
The text was updated successfully, but these errors were encountered: