github.com/minamijoyo/terraform@v0.7.8-0.20161029001309-18b3736ba44b/website/source/docs/providers/google/r/container_cluster.html.markdown (about)

     1  ---
     2  layout: "google"
     3  page_title: "Google: google_container_cluster"
     4  sidebar_current: "docs-google-container-cluster"
     5  description: |-
     6    Creates a GKE cluster.
     7  ---
     8  
     9  # google\_container\_cluster
    10  
    11  !> **Warning:** Due to limitations of the API, all arguments except
    12  `node_version` are non-updateable. Changing any will cause recreation of the
    13  whole cluster!
    14  
    15  ## Example usage
    16  
    17  ```js
    18  resource "google_container_cluster" "primary" {
    19    name = "marcellus-wallace"
    20    zone = "us-central1-a"
    21    initial_node_count = 3
    22  
    23    master_auth {
    24      username = "mr.yoda"
    25      password = "adoy.rm"
    26    }
    27  
    28    node_config {
    29      oauth_scopes = [
    30        "https://www.googleapis.com/auth/compute",
    31        "https://www.googleapis.com/auth/devstorage.read_only",
    32        "https://www.googleapis.com/auth/logging.write",
    33        "https://www.googleapis.com/auth/monitoring"
    34      ]
    35    }
    36  }
    37  ```
    38  
    39  ## Argument Reference
    40  
    41  * `initial_node_count` - (Required) The number of nodes to create in this
    42      cluster (not including the Kubernetes master).
    43  
    44  * `master_auth` - (Required) The authentication information for accessing the
    45      Kubernetes master.
    46  
    47  * `name` - (Required) The name of the cluster, unique within the project and
    48      zone.
    49  
    50  * `zone` - (Required) The zone that all resources should be created in.
    51  
    52  - - -
    53  * `addons_config` - (Optional) The configuration for addons supported by Google Container Engine
    54  
    55  * `cluster_ipv4_cidr` - (Optional) The IP address range of the container pods in
    56      this cluster. Default is an automatically assigned CIDR.
    57  
    58  * `description` - (Optional) Description of the cluster.
    59  
    60  * `logging_service` - (Optional) The logging service that the cluster should
    61      write logs to. Available options include `logging.googleapis.com` and
    62      `none`. Defaults to `logging.googleapis.com`
    63  
    64  * `monitoring_service` - (Optional) The monitoring service that the cluster
    65      should write metrics to. Available options include
    66      `monitoring.googleapis.com` and `none`. Defaults to
    67      `monitoring.googleapis.com`
    68  
    69  * `network` - (Optional) The name or self_link of the Google Compute Engine network to which
    70      the cluster is connected
    71  
    72  * `node_config` -  (Optional) The machine type and image to use for all nodes in
    73      this cluster
    74  
    75  * `node_version` - (Optional) The Kubernetes version on the nodes. Only valid
    76      for upgrading of existing cluster. Defaults to latest version supported by
    77      the server.
    78  
    79  * `project` - (Optional) The project in which the resource belongs. If it
    80      is not provided, the provider project is used.
    81  
    82  * `subnetwork` - (Optional) The name of the Google Compute Engine subnetwork in which the cluster's instances are launched
    83  
    84  **Master Auth** supports the following arguments:
    85  
    86  * `password` - The password to use for HTTP basic authentication when accessing
    87      the Kubernetes master endpoint
    88  
    89  * `username` - The username to use for HTTP basic authentication when accessing
    90      the Kubernetes master endpoint
    91  
    92  **Node Config** supports the following arguments:
    93  
    94  * `machine_type` - (Optional) The name of a Google Compute Engine machine type.
    95      Defaults to `n1-standard-1`.
    96  
    97  * `disk_size_gb` - (Optional) Size of the disk attached to each node, specified
    98      in GB. The smallest allowed disk size is 10GB. Defaults to 100GB.
    99  
   100  * `oauth_scopes` - (Optional) The set of Google API scopes to be made available
   101      on all of the node VMs under the "default" service account. The following
   102      scopes are necessary to ensure the correct functioning of the cluster:
   103  
   104    * `https://www.googleapis.com/auth/compute`
   105    * `https://www.googleapis.com/auth/devstorage.read_only`
   106    * `https://www.googleapis.com/auth/logging.write` (if `logging_service` points to Google)
   107    * `https://www.googleapis.com/auth/monitoring` (if `monitoring_service` points to Google)
   108  
   109  **Addons Config** supports the following addons:
   110  
   111  * `http_load_balancing` - (Optional) The status of the HTTP Load Balancing addon. It is enabled by default; set `disabled = true` to disable.
   112  * `horizontal_pod_autoscaling` - (Optional) The status of the Horizontal Pod Autoscaling addon. It is enabled by default; set `disabled = true` to disable.
   113  
   114  This example `addons_config` disables both addons:
   115  
   116  ```
   117  addons_config {
   118    http_load_balancing { 
   119      disabled = true
   120    }
   121    horizontal_pod_autoscaling {
   122      disabled = true
   123    }
   124  }
   125  ```
   126  
   127  ## Attributes Reference
   128  
   129  In addition to the arguments listed above, the following computed attributes are
   130  exported:
   131  
   132  * `endpoint` - The IP address of this cluster's Kubernetes master
   133  
   134  * `instance_group_urls` - List of instance group URLs which have been assigned
   135      to the cluster
   136  
   137  * `master_auth.client_certificate` - Base64 encoded public certificate
   138      used by clients to authenticate to the cluster endpoint.
   139  
   140  * `master_auth.client_key` - Base64 encoded private key used by clients
   141      to authenticate to the cluster endpoint
   142  
   143  * `master_auth.cluster_ca_certificate` - Base64 encoded public certificate
   144      that is the root of trust for the cluster