agones.dev/agones@v1.53.0/build/terraform/performance/state-bucket/main.tf (about)

     1  // Copyright 2023 Google LLC All Rights Reserved.
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  
    16  // Run:
    17  //  terraform apply -var project="<YOUR_GCP_ProjectID>"
    18  
    19  // The performance test cluster is hosted in project `agones-e2e-1`, i.e:
    20  //  terraform apply -var project="agones-e2e-1"
    21  
    22  // # GCS bucket for holding the Terraform state of the performance test Terraform config.
    23  
    24  terraform {
    25    required_version = ">= 1.0.0"
    26    required_providers {
    27      google = {
    28        source  = "hashicorp/google"
    29        version = "~> 4.25.0"
    30      }
    31    }
    32  }
    33  
    34  variable "project" {}
    35  
    36  resource "google_storage_bucket" "default" {
    37    project                     = var.project
    38    name                        = "${var.project}-performance-infra-bucket-tfstate"
    39    force_destroy               = false
    40    uniform_bucket_level_access = true
    41    location                    = "US"
    42    storage_class               = "STANDARD"
    43    versioning {
    44      enabled = true
    45    }
    46  }