Open AlfatahB opened 2 years ago
@AlfatahB can you share your debug log that can demo making API calls without these attributes also works
?
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"
}
@shuyama1 shouldn't this be an API issue as well, related to b/241976681?
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
@shuyama1 Any updates regarding this?
Community Note
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 tohashibot
, a community member has claimed the issue already.Terraform Version
Terraform v1.2.8
Affected Resource(s)
Steps to Reproduce
API Documentation suggests that:
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
9688