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

Router interface API Documentation suggests that some attributes are required,But making API calls without these attributes also works #12485

Open
AlfatahB opened this issue Sep 7, 2022 · 5 comments
Labels

Comments

@AlfatahB
Copy link
Contributor

AlfatahB commented Sep 7, 2022

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
  • Please do not leave +1 or me too comments, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.
  • If an issue is assigned to the modular-magician user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned to hashibot, a community member has claimed the issue already.

Terraform Version

Terraform v1.2.8

  • provider registry.terraform.io/hashicorp/google v4.34.0

Affected Resource(s)

  • google_compute_router_interface

Steps to Reproduce

API Documentation suggests that:

Router interfaces. Each interface requires either one linked resource, (for example, linkedVpnTunnel), or IP address and IP address range (for example, ipRange), or both.

google_compute_router_interface in Terraform Provider is behaving correctly as per the above API docs. But, If I create Router and provide a Router interface without providing any of these attributes (i.e. either one linked resource, (for example, linkedVpnTunnel), or IP address and IP address range (for example, ipRange), or both), then it was being created. So, I raised a bug for the same.

References

@AlfatahB AlfatahB added the bug label Sep 7, 2022
@edwardmedia edwardmedia self-assigned this Sep 7, 2022
@edwardmedia
Copy link
Contributor

@AlfatahB can you share your debug log that can demo making API calls without these attributes also works?

@AlfatahB
Copy link
Contributor Author

AlfatahB commented Sep 8, 2022

By making Create call (https://compute.googleapis.com/compute/v1/projects/project-name/regions/us-central1/routers) with the following request body, the router is being created along with interface without providing either linkedResources or ipRange
Request Body for Post Call:

{
    "name": "test-router",
    "network": "https://www.googleapis.com/compute/v1/projects/project-name/global/networks/test-network",
    "interfaces": [
        {
            "name" : "test-router-interface"
           # Here, I am not providing the linkedResources or ipRange
        }
    ]
}

To confirm this, I have also made Read call (https://compute.googleapis.com/compute/v1/projects/project-name/regions/us-central1/routers)
Response Body for Get call:

{
    "kind": "compute#routerList",
    "id": "projects/project-name/regions/us-central1/routers",
    "items": [
        {
            "kind": "compute#router",
            "id": "5155929330873040434",
            "creationTimestamp": "2022-09-08T03:15:57.123-07:00",
            "name": "test-router",
            "region": "https://www.googleapis.com/compute/v1/projects/project-name/regions/us-central1",
            "network": "https://www.googleapis.com/compute/v1/projects/project-name/global/networks/test-network",
            "interfaces": [
                {
                    "name": "test-router-interface"
                }
            ],
            "selfLink": "https://www.googleapis.com/compute/v1/projects/project-name/regions/us-central1/routers/test-router"
        }
    ],
    "selfLink": "https://www.googleapis.com/compute/v1/projects/project-name/regions/us-central1/routers"
}

@edwardmedia
Copy link
Contributor

edwardmedia commented Sep 11, 2022

@shuyama1 shouldn't this be an API issue as well, related to b/241976681?

@shuyama1
Copy link
Collaborator

This feature is implemented based on the API description. Filed a ticket b/248037977 against the upstream API to confirm if the requirements are still valid

@AlfatahB
Copy link
Contributor Author

AlfatahB commented Nov 2, 2022

@shuyama1 Any updates regarding this?

@github-actions github-actions bot added forward/review In review; remove label to forward service/compute-router labels Sep 11, 2023
@shuyama1 shuyama1 removed their assignment Feb 1, 2024
modular-magician added a commit to modular-magician/terraform-provider-google that referenced this issue Jan 8, 2025
Co-authored-by: Zhenhua Li <zhenhuali@google.com>

[upstream:c1ae9f3234aa4303bb3b817a7edb742c71ccb4ea]

Signed-off-by: Modular Magician <magic-modules@google.com>
modular-magician added a commit that referenced this issue Jan 8, 2025
[upstream:c1ae9f3234aa4303bb3b817a7edb742c71ccb4ea]

Signed-off-by: Modular Magician <magic-modules@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants