-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
bgp peer configuration #4809
Comments
Hi @baodongli, I'm not able to reproduce this. Can you please post the full config you used that fails when running |
Thanks for looking into it. $ terraform -v `resource "google_compute_interconnect_attachment" "IAs" { resource "google_compute_router_interface" "router_interfaces" { resource "google_compute_router_peer" "router_bgp_peers" { Basically I have to run twice and switch between the two ip_range lines in order to come through successfully |
here's the minimum repro test case
Then, Basically any In the example above, if |
GoogleCloudPlatform/magic-modules#2835 should fix this, which was released today in v3.3.0. If for some reason that doesn't fix it, the equivalent PR of GoogleCloudPlatform/magic-modules#2852 that I started working on before I saw the other one should :) Closing this out, but feel free to reopen if you still see issues after upgrading to the release with the fix. |
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
Community Note
Terraform Version
$ terraform -v
Terraform v0.12.12
Your version of Terraform is out of date! The latest version
is 0.12.13. You can update by downloading from www.terraform.io/downloads.html
Affected Resource(s)
Terraform Configuration Files
resource "google_compute_router_interface" "zone1_router_intf" {
name = "${var.gcloud_region}-z1-${var.pod_id}-intf"
router = var.routers.z1.name
region = var.gcloud_region
interconnect_attachment = google_compute_interconnect_attachment.zone1_ac.self_link
}
resource "google_compute_router_interface" "zone2_router_intf" {
name = "${var.gcloud_region}-z2-${var.pod_id}-intf"
router = var.routers.z2.name
region = var.gcloud_region
interconnect_attachment = google_compute_interconnect_attachment.zone2_ac.self_link
}
Debug Output
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.
module.us-east4.module.nat_gw.data.google_compute_image.nat_image: Refreshing state...
Panic Output
Error: Each interface requires one linked resource or an ip range, or both.
on ../modules/pod/pod.tf line 21, in resource "google_compute_router_interface" "zone1_router_intf":
21: resource "google_compute_router_interface" "zone1_router_intf" {
Error: Each interface requires one linked resource or an ip range, or both.
on ../modules/pod/pod.tf line 29, in resource "google_compute_router_interface" "zone2_router_intf":
29: resource "google_compute_router_interface" "zone2_router_intf" {
Expected Behavior
terraform plan/apply should have succeeded
Actual Behavior
terraform plan/apply returned error as described in above.
Added ip_range in the resource as requested by the error message, and terraform plan/apply no longer complained. However, later on, terraform apply emitted the following errors:
Error: Error patching router us-east4/control-path-us-east4-z1-router: googleapi: Error 400: Invalid value for field 'resource.interfaces[0].ipRange': '169.254.0.0/24'. IP range of router interface 'us-east4-z1-pod1-intf' must be equal to cloudRouterIpAddress of interconnect attachment 'us-east4-z1-pod1-ac': 169.254.121.25/29, invalid
on ../modules/pod/pod.tf line 21, in resource "google_compute_router_interface" "zone1_router_intf":
21: resource "google_compute_router_interface" "zone1_router_intf" {
Error: Error patching router us-east4/control-path-us-east4-z2-router: googleapi: Error 400: Invalid value for field 'resource.interfaces[0].ipRange': '169.254.0.0/24'. IP range of router interface 'us-east4-z2-pod1-intf' must be equal to cloudRouterIpAddress of interconnect attachment 'us-east4-z2-pod1-ac': 169.254.234.41/29, invalid
on ../modules/pod/pod.tf line 29, in resource "google_compute_router_interface" "zone2_router_intf":
29: resource "google_compute_router_interface" "zone2_router_intf" {
I then removed ip_range from the configuration. And terraform apply would proceed successfully.
So to make it provision the resources successfully, I had to add and then remove ip_range in the google_compute_router_interface resource and run terraform apply each time.
Steps to Reproduce
see above description
terraform apply
Important Factoids
References
The text was updated successfully, but these errors were encountered: