terraform-provider-google
terraform-provider-google copied to clipboard
Missing data source google_cloudfunctions2_function
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
The current google_cloudfunctions_function data source cannot retrieve info for Cloud Functions 2nd gen functions. We need a data source equivalent of the google_cloudfunctions2_function resource to get functions created outside of Terraform.
New or Affected Resource(s)
- google_cloudfunctions_function
- google_cloudfunctions2_function
Potential Terraform Configuration
# Propose what you think the configuration to take advantage of this feature should look like.
# We may not use it verbatim, but it's helpful in understanding your intent.
data "google_cloudfunctions2_function" "function" {
provider = google-beta
name = "gen2-function"
region = "us-central1"
}
References
I think this is overall a much bigger issue than just missing the data resource.
Essentially their APIs cannot list/read the 2st Gen functions. I've reported the bug here: https://issuetracker.google.com/issues/237683973
I have added in above issue in google issue tracker. But gcloud functions list
seems to be working fine and list all gen2 functions as well.
@yuryu can you confirm this works as expected now? As of Sept 20th the gcloud fix should be live.
I believe the data source is available now, https://registry.terraform.io/providers/hashicorp/google/latest/docs/data-sources/cloudfunctions2_function
Merged as part of https://github.com/GoogleCloudPlatform/magic-modules/pull/6523
Confirmed this appears to be fixed, thanks for the comments here
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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.