github.com/andresvia/terraform@v0.6.15-0.20160412045437-d51c75946785/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 54 * `cluster_ipv4_cidr` - (Optional) The IP address range of the container pods in 55 this cluster. Default is an automatically assigned CIDR. 56 57 * `description` - (Optional) Description of the cluster. 58 59 * `logging_service` - (Optional) The logging service that the cluster should 60 write logs to. Available options include `logging.googleapis.com` and 61 `none`. Defaults to `logging.googleapis.com` 62 63 * `monitoring_service` - (Optional) The monitoring service that the cluster 64 should write metrics to. Available options include 65 `monitoring.googleapis.com` and `none`. Defaults to 66 `monitoring.googleapis.com` 67 68 * `network` - (Optional) The name of the Google Compute Engine network to which 69 the cluster is connected 70 71 * `node_config` - (Optional) The machine type and image to use for all nodes in 72 this cluster 73 74 * `node_version` - (Optional) The Kubernetes version on the nodes. Only valid 75 for upgrading of existing cluster. Defaults to latest version supported by 76 the server. 77 78 * `project` - (Optional) The project in which the resource belongs. If it 79 is not provided, the provider project is used. 80 81 **Master Auth** supports the following arguments: 82 83 * `password` - The password to use for HTTP basic authentication when accessing 84 the Kubernetes master endpoint 85 86 * `username` - The username to use for HTTP basic authentication when accessing 87 the Kubernetes master endpoint 88 89 **Node Config** supports the following arguments: 90 91 * `machine_type` - (Optional) The name of a Google Compute Engine machine type. 92 Defaults to `n1-standard-1`. 93 94 * `disk_size_gb` - (Optional) Size of the disk attached to each node, specified 95 in GB. The smallest allowed disk size is 10GB. Defaults to 100GB. 96 97 * `oauth_scopes` - (Optional) The set of Google API scopes to be made available 98 on all of the node VMs under the "default" service account. The following 99 scopes are necessary to ensure the correct functioning of the cluster: 100 101 * `https://www.googleapis.com/auth/compute` 102 * `https://www.googleapis.com/auth/devstorage.read_only` 103 * `https://www.googleapis.com/auth/logging.write` (if `logging_service` points to Google) 104 * `https://www.googleapis.com/auth/monitoring` (if `monitoring_service` points to Google) 105 106 ## Attributes Reference 107 108 In addition to the arguments listed above, the following computed attributes are 109 exported: 110 111 * `endpoint` - The IP address of this cluster's Kubernetes master 112 113 * `instance_group_urls` - List of instance group URLs which have been assigned 114 to the cluster 115 116 * `master_auth.client_certificate` - Base64 encoded public certificate 117 used by clients to authenticate to the cluster endpoint. 118 119 * `master_auth.client_key` - Base64 encoded private key used by clients 120 to authenticate to the cluster endpoint 121 122 * `master_auth.cluster_ca_certificate` - Base64 encoded public certificate 123 that is the root of trust for the cluster