Created
September 21, 2022 01:49
-
-
Save tatsuyasusukida/e27977c892fed4f55d6f30c3c0570eca to your computer and use it in GitHub Desktop.
Terraform GCP Cloud Storage Bucket example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| variable "project" {} | |
| variable "bucket_name" {} | |
| variable "bucket_location" {} | |
| provider "google" { | |
| project = var.project | |
| } | |
| resource "google_storage_bucket" "my_bucket" { | |
| name = var.bucket_name | |
| location = var.bucket_location | |
| force_destroy = true | |
| } | |
| output "bucket_name" { | |
| value = google_storage_bucket.my_bucket.name | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| project = "<PROJECT_ID>" | |
| bucket_name = "my-bucket-00000000" | |
| bucket_location = "ASIA-NORTHEAST1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment