google-cloud-platform - 为 terraform 设置 gcs 后端的问题
问题描述
我一直在尝试设置一个 terraform 后端来将状态文件存储在 GCS 存储桶中。我创建了一个服务帐户,它是项目所有者并具有 gcs 存储桶存储管理员访问权限,但仍然面临以下错误:
Initializing the backend...
Error loading state: 2 errors occurred:
* writing "gs://terraform-ubuntu-state-maintain/gcp/terraform.tfstate/default.tflock" failed: googleapi: Error 403: Insufficient Permission, insufficientPer
missions
* storage: object doesn't exist.
ps:gcs 存储桶也已经创建,前缀路径为“gcp”。还授予服务帐户权限。
解决方案
我的错误是“配额项目”~/.config/gcloud/application_default_credentials.json
指向一个不存在的项目。
推荐阅读
- azure-blob-storage - 将 blob 上传到 Iot Edge blob 存储模块偶尔会冻结 5 秒
- python - 如何在不改变数组形状的情况下旋转图像?
- django - Django 电子邮件地址未显示在管理员中
- javascript - 正则表达式用 vuejs 中的新行替换空格
- python - /new_post/ 处的 ValueError 'image' 属性没有与之关联的文件
- arrays - 使用 imresize 调整图像大小会导致 octave 错误
- php - 跨页面重用 CurlHandle 实例
- javascript - 带有 alpine js 的 Flash 元素
- javascript - node模块中使用“compression-webpack-plugin”包时如何禁止生成大量文件
- webforms - Google Tag Manager 代码是否应该插入到 ASP.NET Site.Master 中?