Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/wix/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google cloud storage 创建存储桶后,是否可以通过Terraform调整GCS存储桶生命周期策略?_Google Cloud Storage_Terraform - Fatal编程技术网

Google cloud storage 创建存储桶后,是否可以通过Terraform调整GCS存储桶生命周期策略?

Google cloud storage 创建存储桶后,是否可以通过Terraform调整GCS存储桶生命周期策略?,google-cloud-storage,terraform,Google Cloud Storage,Terraform,我正试图通过Terraform设置GCS bucket生命周期策略。 据我所知,资源只允许我创建bucket;而不是更新现有的。试图在现有存储桶上运行google_storage_存储桶会引发错误 其他与存储相关的资源似乎不会影响生命周期策略 那么,是否可以通过Terraform调整现有bucket上的策略,或者我应该切换到gsutil或其他方式?在Terraform中,一旦创建了bucket,其位置就无法更改,请使用GCP控制台编辑,我添加bucket的文档 在Terraform中,一旦创建了

我正试图通过Terraform设置GCS bucket生命周期策略。 据我所知,资源只允许我创建bucket;而不是更新现有的。试图在现有存储桶上运行google_storage_存储桶会引发错误

其他与存储相关的资源似乎不会影响生命周期策略


那么,是否可以通过Terraform调整现有bucket上的策略,或者我应该切换到gsutil或其他方式?

在Terraform中,一旦创建了bucket,其位置就无法更改,请使用GCP控制台编辑,我添加bucket的文档


在Terraform中,一旦创建了一个bucket,它的位置就不能更改,请使用GCP控制台进行编辑,我添加了bucket的文档


Terraform似乎没有Google存储资源来更新GCS bucket生命周期


您可以通过更新。

Terraform似乎没有Google存储资源来更新GCS存储桶生命周期

您可以通过更新。

在更改生命周期之前,您必须将存储桶导入地形状态

在类似my-bucket.tf的内容中指定您的bucket 导入你的bucket:terraform导入google\u storage\u bucket.my-bucket我的项目/my bucket 如果您已经指定了,那么您可以直接应用它:terraform apply-target=google\u storage\u bucket.my-bucket 在更改生命周期之前,必须将存储桶导入地形状态

在类似my-bucket.tf的内容中指定您的bucket 导入你的bucket:terraform导入google\u storage\u bucket.my-bucket我的项目/my bucket 如果您已经指定了,那么您可以直接应用它:terraform apply-target=google\u storage\u bucket.my-bucket
顺便说一句,Terraform GitHub上有一个功能请求:顺便说一句,Terraform GitHub上有一个功能请求:现在可以用于google_storage_bucket资源。现在可以用于谷歌存储桶资源。