# bucket You should be an admin/owner of your sandbox or have enougth permissions to create a bucket. If you use a lot of accounts and specific IAM rules, you can check the permissions of the user with the following command: ```shell gcloud projects get-iam-policy --format=json | jq '.bindings[] | select(.members[] | contains("user:"))' ``` `"role": "roles/owner"` would be great for you. ## How to use the code 1. Create `terraform.tfvars` file with a few variables ```shell project = "your-gcp-project" iam_user_email = "your@gmail.com" ``` `region` is optional. 2. Create bucket All commands will be applied via Terraform 1.8.0 or via OpenTofu, the same version. I use alias `t` for the commands. ```shell t init t apply ``` 2. Destrouy bucket sfter your tests ```shell t destroy ``` ## Requirements | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | ~>1.8.0 | | [google](#requirement\_google) | ~>5.41.0 | ## Providers | Name | Version | |------|---------| | [google](#provider\_google) | 5.41.0 | ## Modules | Name | Source | Version | |------|--------|---------| | [bucket](#module\_bucket) | terraform-google-modules/cloud-storage/google//modules/simple_bucket | ~> 6.0 | ## Resources | Name | Type | |------|------| | [google_client_config.default](https://registry.terraform.io/providers/hashicorp/google/latest/docs/data-sources/client_config) | data source | ## Inputs | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| | [iam\_user\_email](#input\_iam\_user\_email) | Your gcloud account | `string` | `"demo@gmail.com"` | no | | [project](#input\_project) | Google Project to create resources in | `string` | `"demo"` | no | | [region](#input\_region) | The region to host the cluster in | `string` | `"europe-west1"` | no | ## Outputs | Name | Description | |------|-------------| | [gcloud\_bucket\_link](#output\_gcloud\_bucket\_link) | Bucket web ui link | | [project](#output\_project) | GCloud Project ID | | [region](#output\_region) | GCloud Region |