Skip to content

Include default base path in provider_dcl_endpoints.go #9205

@melinath

Description

@melinath

Affected Resource(s)

  • google_*

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 the 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 the issue is assigned to a user, that user is claiming responsibility for the issue. If the issue is assigned to "hashibot", a community member has claimed the issue already.

Description

tpgtools provider_dcl_endpoints.go generation doesn't include a default base path. This means that (without a custom base URL set via the environment) generated URLs don't have a scheme, which results in errors like:

Error when reading or editing BigqueryReservationReservation "projects/project-id/locations/EU/reservations/my-reservation": Get "projects/project-id/locations/EU/reservations/my-reservation?alt=json": unsupported protocol scheme ""

It's a little unclear to me whether this is a special case because the resource is generated by MMv1 but the schema entry is "overridden" (manually) by tpgtools. We can work around this by not using the schema entry generated by provider_dcl_endpoints.go (which is what dataproc does already) but it seems like we probably need to supply a default here.

(Though Eventarc doesn't seem to need a default base path? Unclear to me why.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions