github.com/leeprovoost/terraform@v0.6.10-0.20160119085442-96f3f76118e7/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 -> **Note:** Due to limitations of the API, all arguments except `node_version` are non-updateable (changing any will cause recreation of the whole cluster). 12 13 ## Example usage 14 15 ``` 16 resource "google_container_cluster" "primary" { 17 name = "marcellus-wallace" 18 zone = "us-central1-a" 19 initial_node_count = 3 20 21 master_auth { 22 username = "mr.yoda" 23 password = "adoy.rm" 24 } 25 26 node_config { 27 oauth_scopes = [ 28 "https://www.googleapis.com/auth/compute", 29 "https://www.googleapis.com/auth/devstorage.read_only", 30 "https://www.googleapis.com/auth/logging.write", 31 "https://www.googleapis.com/auth/monitoring" 32 ] 33 } 34 } 35 ``` 36 37 ## Argument Reference 38 39 * `name` - (Required) The name of the cluster, unique within the project and zone 40 * `zone` - (Required) The zone that all resources should be created in. 41 * `master_auth` - (Required) The authentication information for accessing the Kubernetes master 42 * `initial_node_count` - (Required) The number of nodes to create in this cluster (not including the Kubernetes master) 43 * `description` - (Optional) Description of the cluster 44 * `node_version` - (Optional) The Kubernetes version on the nodes. Only valid for upgrading of existing cluster. 45 Defaults to latest version supported by the server. 46 * `cluster_ipv4_cidr` - (Optional) The IP address range of the container pods in this cluster. 47 Default is an automatically assigned CIDR. 48 * `logging_service` - (Optional) The logging service that the cluster should write logs to. 49 Available options include `logging.googleapis.com` and `none`. Defaults to `logging.googleapis.com` 50 * `monitoring_service` - (Optional) The monitoring service that the cluster should write metrics to. 51 Available options include `monitoring.googleapis.com` and `none`. Defaults to `monitoring.googleapis.com` 52 * `network` - (Optional) The name of the Google Compute Engine network to which the cluster is connected 53 * `node_config` - (Optional) The machine type and image to use for all nodes in this cluster 54 55 **Master Auth** supports the following arguments: 56 57 * `password` - The password to use for HTTP basic authentication when accessing the Kubernetes master endpoint 58 * `username` - The username to use for HTTP basic authentication when accessing the Kubernetes master endpoint 59 60 **Node Config** supports the following arguments: 61 62 * `machine_type` - (Optional) The name of a Google Compute Engine machine type. 63 Defaults to `n1-standard-1`. 64 * `disk_size_gb` - (Optional) Size of the disk attached to each node, specified in GB. 65 The smallest allowed disk size is 10GB. Defaults to 100GB. 66 * `oauth_scopes` - (Optional) The set of Google API scopes to be made available on all 67 of the node VMs under the "default" service account. The following scopes are necessary 68 to ensure the correct functioning of the cluster: 69 70 * `https://www.googleapis.com/auth/compute` 71 * `https://www.googleapis.com/auth/devstorage.read_only` 72 * `https://www.googleapis.com/auth/logging.write` (if `logging_service` points to Google) 73 * `https://www.googleapis.com/auth/monitoring` (if `monitoring_service` points to Google) 74 75 ## Attributes Reference 76 77 * `master_auth.client_certificate` - Base64 encoded public certificate 78 used by clients to authenticate to the cluster endpoint. 79 * `master_auth.client_key` - Base64 encoded private key used by clients 80 to authenticate to the cluster endpoint 81 * `master_auth.cluster_ca_certificate` - Base64 encoded public certificate 82 that is the root of trust for the cluster 83 * `endpoint` - The IP address of this cluster's Kubernetes master 84 * `instance_group_urls` - List of instance group URLs which have been assigned to the cluster