首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >提供程序provider.google不支持资源类型"google_cloudfunctions2_function“。

提供程序provider.google不支持资源类型"google_cloudfunctions2_function“。
EN

Stack Overflow用户
提问于 2022-09-29 06:53:20
回答 1查看 122关注 0票数 0

当我试图部署google函数gen2时,我遇到了一个问题。这是我的配置环境

代码语言:javascript
复制
**gcloud -v**
Google Cloud SDK 402.0.0
alpha 2022.09.12
beta 2022.09.12
bq 2.0.75
core 2022.09.12
gsutil 5.13
pubsub-emulator 0.7.0

**terraform -v**
Terraform v0.14.11

**terraform init**
Initializing provider plugins...
- Reusing previous version of hashicorp/archive from the dependency lock file
- Reusing previous version of hashicorp/google from the dependency lock file
- Reusing previous version of hashicorp/google-beta from the dependency lock file
- Reusing previous version of hashicorp/null from the dependency lock file
- Reusing previous version of hashicorp/random from the dependency lock file
- Reusing previous version of hashicorp/time from the dependency lock file
- Reusing previous version of hashicorp/template from the dependency lock file
- Using previously-installed hashicorp/archive v2.2.0
- Using previously-installed hashicorp/google v3.90.1
- Using previously-installed hashicorp/google-beta v3.90.1
- Using previously-installed hashicorp/null v3.1.1
- Using previously-installed hashicorp/random v3.4.3
- Using previously-installed hashicorp/time v0.8.0
- Using previously-installed hashicorp/template v2.2.0

**terraform plan**
Error: Invalid resource type

  on modules/shared/functions/main.tf line 206, in resource "google_cloudfunctions2_function" "mergeopenapi_trigger_function":
 206: resource "google_cloudfunctions2_function" "mergeopenapi_trigger_function" {

*The provider provider.google does not support resource type
"google_cloudfunctions2_function".*

有人能帮我修好吗?

非常感谢

安东尼

EN

回答 1

Stack Overflow用户

发布于 2022-10-11 23:06:08

看起来你需要升级你的hashicorp/google版本。

您可以在提供程序的最新版本(撰写本文时为4.4.0)中看到云功能第2代存在的这里

如果将docs从4.4.0更改为3.90.1,则不存在第2代。

根据变更量,该数据源直到昨天才添加:https://github.com/hashicorp/terraform-provider-google/blob/main/CHANGELOG.md

编辑:哎呀!把我的约会搞错了。看来cloudfunction2是在4.34.0晋升到GA的。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73891389

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档