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

fix: Router advertised-route-priority undefined behavior #19366

Conversation

modular-magician
Copy link
Collaborator

Bug: b/356353797
Issue: advertised-route-priority is an optional field and if not present, the value in the GCP is considered to be 100.
However, TF would set advertised-route-priority to be 0 even if the user has not explicitly set the value to be 0 when there is an update to the resource.

Repro steps:

  1. Create a Router peer resource without advertised route priority value set.
    resource "google_compute_router_peer" "foobar" {
    name = "tf-my-router"
    router = google_compute_router.foobar.name
    region = google_compute_router.foobar.region
    peer_asn = 65515
    interface = google_compute_router_interface.foobar.name
    advertise_mode = "DEFAULT"
    }

Query gcloud to check the value of advertised_route_priority, it will be empty
gcloud compute routers describe {router-name}

  1. Update the router peer resource (ex: enableIpv6 = true) without advertised route priority. However, TF would add advertised route priority = 0 in the update api call.
    resource "google_compute_router_peer" "foobar" {
    name = "tf-my-router"
    router = google_compute_router.foobar.name
    region = google_compute_router.foobar.region
    peer_asn = 65515
    interface = google_compute_router_interface.foobar.name
    advertise_mode = "DEFAULT"
    enable_ipv6 = true
    }

Query gcloud to check the value of advertised_route_priority, it will be 0 even though it is not set by the user.
gcloud compute routers describe {router-name}

Release Note Template for Downstream PRs (will be copied)

compute: fixed a bug where `advertised_route_priority` was accidentally set to 0 during updates in 'google_compute_router_peer'

Derived from GoogleCloudPlatform/magic-modules#11613

…1613)

[upstream:293c3ca1b6f2de4ce5d731aa8f0c3a65969cc9ac]

Signed-off-by: Modular Magician <magic-modules@google.com>
@modular-magician modular-magician merged commit 53743c9 into hashicorp:main Sep 4, 2024
4 checks passed
Copy link

github-actions bot commented Oct 8, 2024

I'm going to lock this pull request 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 related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 8, 2024
@modular-magician modular-magician deleted the downstream-pr-293c3ca1b6f2de4ce5d731aa8f0c3a65969cc9ac branch November 17, 2024 00:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant