Can not attach existing S3 Bucket

Article ID:227646808
1 minute readKnowledge base


I destroyed my CJE Cluster and I try to create it again from the same project but it fails when it is attaching S3 Bucket.

[storage-bucket] aws_s3_bucket.pse-storage-bucket: Creating...
[storage-bucket] acceleration_status:        "" => "<computed>"
[storage-bucket] acl:                        "" => "private"
[storage-bucket] arn:                        "" => "<computed>"
[storage-bucket] bucket:                     "" => "pse-0ec059"
[storage-bucket] force_destroy:              "" => "true"
[storage-bucket] hosted_zone_id:             "" => "<computed>"
[storage-bucket] region:                     "" => "<computed>"
[storage-bucket] request_payer:              "" => "<computed>"
[storage-bucket] tags.%:                     "" => "2"
[storage-bucket] tags.Name:                  "" => "pse-0ec059"
[storage-bucket] tags.cloudbees:pse:cluster: "" => "pse001"
[storage-bucket] website_domain:             "" => "<computed>"
[storage-bucket] website_endpoint:           "" => "<computed>"
[storage-bucket] Error applying plan:
[storage-bucket] 1 error(s) occurred:
[storage-bucket] * aws_s3_bucket.pse-storage-bucket: Error creating S3 bucket: BucketAlreadyOwnedByYou: Your previous request to create the named bucket succeeded and you already own it.
[storage-bucket] status code: 409, request id: 7AE2DEC8852AA801
[storage-bucket] Terraform does not automatically rollback in the face of errors.
[storage-bucket] Instead, your Terraform state file has been partially updated with
[storage-bucket] any resources that successfully completed. Please address the error
[storage-bucket] above and apply again to incrementally change your infrastructure.
[storage-bucket] Error running terraform apply -no-color in /Users/inifc/Documents/pse/.dna/.terraform/storage-bucket
An error occurred during storage-bucket initialization (1) - see /Users/inifc/Documents/pse/.dna/logs/last/storage-bucket



If you remove the S3 Bucket and run "cje apply" again, it will be fixed.