当我试图部署google函数gen2时,我遇到了一个问题。这是我的配置环境
**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".*有人能帮我修好吗?
非常感谢
安东尼
发布于 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的。
https://stackoverflow.com/questions/73891389
复制相似问题