agones.dev/agones@v1.53.0/examples/terraform-submodules/oke/variables.tf (about)

     1  // Copyright 2024 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  # OCI Provider parameters
    16  variable "api_fingerprint" {
    17    description = "Fingerprint of the API private key to use with OCI API."
    18    default     = ""
    19    type        = string
    20  }
    21  
    22  variable "api_private_key_path" {
    23    description = "The path to the OCI API private key."
    24    default     = ""
    25    type        = string
    26  }
    27  
    28  variable "region" {
    29    description = "The tenancy's region. Use the short form in lower case e.g. phoenix"
    30    default     = "ap-singapore-1"
    31    type        = string
    32  }
    33  
    34  variable "home_region" {
    35    description = "The tenancy's home region. Use the short form in lower case e.g. phoenix"
    36    default     = "ap-singapore-1"
    37    type        = string
    38  }
    39  
    40  variable "tenancy_id" {
    41    description = "The tenancy if of the OCI Cloud Account in which to create the resources."
    42    type        = string
    43  }
    44  
    45  variable "user_id" {
    46    description = "The id of the user that Terraform will use to create the resources."
    47    default     = ""
    48    type        = string
    49  }
    50  
    51  
    52  # General OCI parameters
    53  variable "compartment_id" {
    54    description = "The compartment id where to create all resources."
    55    type        = string
    56  }
    57  
    58  # ssh keys
    59  variable "ssh_private_key_path" {
    60    description = "The path to ssh private key."
    61    default     = "none"
    62    type        = string
    63  }
    64  
    65  variable "ssh_public_key_path" {
    66    description = "The path to ssh public key."
    67    default     = "none"
    68    type        = string
    69  }
    70  
    71  # Cluster
    72  variable "kubernetes_version" {
    73    description = "The version of Kubernetes to use."
    74    default     = "v1.32.1"
    75    type        = string
    76  }
    77  
    78  variable "cluster_type" {
    79    description = "Whether to use basic or enhanced OKE clusters."
    80    default     = "basic"
    81    type        = string
    82  
    83    validation {
    84      condition     = contains(["basic", "enhanced"], lower(var.cluster_type))
    85      error_message = "Accepted values are 'basic' or 'enhanced'."
    86    }
    87  }
    88  
    89  variable "oke_control_plane" {
    90    description = "Whether to keep all OKE control planes public or private."
    91    default     = "public"
    92    type        = string
    93  
    94    validation {
    95      condition     = contains(["public", "private"], lower(var.oke_control_plane))
    96      error_message = "Accepted values are 'public' or 'private'."
    97    }
    98  }
    99  
   100  variable "preferred_cni" {
   101    description = "Whether to use flannel or NPN"
   102    default     = "flannel"
   103    type        = string
   104  
   105    validation {
   106      condition     = contains(["flannel", "npn"], lower(var.preferred_cni))
   107      error_message = "Accepted values are 'flannel' or 'npn'."
   108    }
   109  }
   110  
   111  variable "nodepools" {
   112    description = "Node pools for cluster"
   113    type        = any
   114    default = {
   115      np1 = {
   116        shape            = "VM.Standard.E4.Flex",
   117        ocpus            = 2,
   118        memory           = 32,
   119        size             = 3,
   120        boot_volume_size = 150,
   121      }
   122    }
   123  }
   124  
   125  // Install latest version of agones
   126  variable "agones_version" {
   127    default = ""
   128  }
   129  
   130  variable "cluster_name" {
   131    default = "agones-cluster"
   132  }
   133  
   134  variable "node_count" {
   135    default = "3"
   136  }
   137  
   138  variable "log_level" {
   139    default = "info"
   140  }
   141  
   142  variable "feature_gates" {
   143    default = ""
   144  }