You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a storage bucket that was created manually through the GCS console in our GCP project. We need to delete this bucket and do not have permission to do this manually (manual permissions are not given within our company). We need to know how we can go about deleting this bucket. We thought we could use Terraform to do this, however our documentation says that you need to use the Gitlab pipeline that was used to create the bucket to delete it by executing the "destroy" part of the pipeline. Unfortunately, a pipeline is not what was used to create that bucket, so there's no option to "destroy" it. We tried using the following terraform code, but it is not working:
module.pipeline.google_storage_bucket.gcs-bucket-cah: Creating...
Error: googleapi: Error 409: Sorry, that name is not available. Please try a different one., conflict
on ../modules/setup/main.tf line 14, in resource "google_storage_bucket" "gcs-bucket-cah":
14: resource "google_storage_bucket" "gcs-bucket-cah" {
Cleaning up file based variables
00:01
ERROR: Job failed: exit code 1
Does anyone know if it is possible to delete a GCP storage bucket if a pipeline was not used to create it?
The text was updated successfully, but these errors were encountered:
You need to be able to run the Terraform binary against your state file manually, which may be possible or not dependent on your company processes, but this is what terraform import does: https://www.terraform.io/docs/cli/import/index.html
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.
There is a storage bucket that was created manually through the GCS console in our GCP project. We need to delete this bucket and do not have permission to do this manually (manual permissions are not given within our company). We need to know how we can go about deleting this bucket. We thought we could use Terraform to do this, however our documentation says that you need to use the Gitlab pipeline that was used to create the bucket to delete it by executing the "destroy" part of the pipeline. Unfortunately, a pipeline is not what was used to create that bucket, so there's no option to "destroy" it. We tried using the following terraform code, but it is not working:
resource "google_storage_bucket" "gcs-bucket-cah" {
name = "gcp_ea_test"
location = "US-EAST4"
storage_class = "REGIONAL"
force_destroy = false
}
When I run this, I get the following error:
module.pipeline.google_storage_bucket.gcs-bucket-cah: Creating...
Error: googleapi: Error 409: Sorry, that name is not available. Please try a different one., conflict
on ../modules/setup/main.tf line 14, in resource "google_storage_bucket" "gcs-bucket-cah":
14: resource "google_storage_bucket" "gcs-bucket-cah" {
Cleaning up file based variables
00:01
ERROR: Job failed: exit code 1
Does anyone know if it is possible to delete a GCP storage bucket if a pipeline was not used to create it?
The text was updated successfully, but these errors were encountered: