diff --git a/r/compute_instance.html.markdown b/r/compute_instance.html.markdown index ae231a8c..bf8add9e 100644 --- a/r/compute_instance.html.markdown +++ b/r/compute_instance.html.markdown @@ -44,6 +44,8 @@ resource "google_compute_instance" "default" { foo = "bar" } + metadata_startup_script = "echo hi > /test.txt" + service_account { scopes = ["userinfo-email", "compute-ro", "storage-ro"] } @@ -73,6 +75,12 @@ The following arguments are supported: * `metadata` - (Optional) Metadata key/value pairs to make available from within the instance. +* `metadata_startup_script` - (Optional) An alternative to using the + startup-script metadata key, except this one forces the instance to be + recreated (thus re-running the script) if it is changed. This replaces the + startup-script metadata key on the created instance and thus the two mechanisms + are not allowed to be used simultaneously. + * `network_interface` - (Required) Networks to attach to the instance. This can be specified multiple times for multiple networks. Structure is documented below. diff --git a/r/container_cluster.html.markdown b/r/container_cluster.html.markdown new file mode 100644 index 00000000..76f0171f --- /dev/null +++ b/r/container_cluster.html.markdown @@ -0,0 +1,75 @@ +--- +layout: "google" +page_title: "Google: google_container_cluster" +sidebar_current: "docs-google-resource-container-cluster" +description: |- + Creates a GKE cluster. +--- + +# google\_container\_cluster + +-> **Note:** Due to limitations of the API, all arguments except `node_version` are non-updateable (changing any will cause recreation of the whole cluster). + +## Example usage + +``` +resource "google_container_cluster" "primary" { + name = "marcellus-wallace" + zone = "us-central1-a" + initial_node_count = 3 + + master_auth { + username = "mr.yoda" + password = "adoy.rm" + } +} +``` + +## Argument Reference + +* `name` - (Required) The name of the cluster, unique within the project and zone +* `zone` - (Required) The zone that all resources should be created in. +* `master_auth` - (Required) The authentication information for accessing the Kubernetes master +* `initial_node_count` - (Required) The number of nodes to create in this cluster (not including the Kubernetes master) +* `description` - (Optional) Description of the cluster +* `node_version` - (Optional) The Kubernetes version on the nodes. Only valid for upgrading of existing cluster. + Defaults to latest version supported by the server. +* `cluster_ipv4_cidr` - (Optional) The IP address range of the container pods in this cluster. + Default is an automatically assigned CIDR. +* `logging_service` - (Optional) The logging service that the cluster should write logs to. + Available options include `logging.googleapis.com` and `none`. Defaults to `logging.googleapis.com` +* `monitoring_service` - (Optional) The monitoring service that the cluster should write metrics to. + Available options include `monitoring.googleapis.com` and `none`. Defaults to `monitoring.googleapis.com` +* `network` - (Optional) The name of the Google Compute Engine network to which the cluster is connected +* `node_config` - (Optional)The machine type and image to use for all nodes in this cluster + +**Master Auth** supports the following arguments: + +* `password` - The password to use for HTTP basic authentication when accessing the Kubernetes master endpoint +* `username` - The username to use for HTTP basic authentication when accessing the Kubernetes master endpoint + +**Node Config** supports the following arguments: + +* `machine_type` - (Optional) The name of a Google Compute Engine machine type. + Defaults to `n1-standard-1`. +* `disk_size_gb` - (Optional) Size of the disk attached to each node, specified in GB. + The smallest allowed disk size is 10GB. Defaults to 100GB. +* `oauth_scopes` - (Optional) The set of Google API scopes to be made available on all + of the node VMs under the "default" service account. The following scopes are necessary + to ensure the correct functioning of the cluster: + + * `https://www.googleapis.com/auth/compute` + * `https://www.googleapis.com/auth/devstorage.read_only` + * `https://www.googleapis.com/auth/logging.write` (if `logging_service` points to Google) + * `https://www.googleapis.com/auth/monitoring` (if `monitoring_service` points to Google) + +## Attributes Reference + +* `master_auth.client_certificate` - Base64 encoded public certificate + used by clients to authenticate to the cluster endpoint. +* `master_auth.client_key` - Base64 encoded private key used by clients + to authenticate to the cluster endpoint +* `master_auth.cluster_ca_certificate` - Base64 encoded public certificate + that is the root of trust for the cluster +* `endpoint` - The IP address of this cluster's Kubernetes master +* `instance_group_urls` - List of instance group URLs which have been assigned to the cluster diff --git a/r/storage_bucket.html.markdown b/r/storage_bucket.html.markdown new file mode 100644 index 00000000..b5aa1535 --- /dev/null +++ b/r/storage_bucket.html.markdown @@ -0,0 +1,32 @@ +--- +layout: "google" +page_title: "Google: google_storage_bucket" +sidebar_current: "docs-google-resource-storage" +description: |- + Creates a new bucket in Google Cloud Storage. +--- + +# google\_storage\_bucket + +Creates a new bucket in Google cloud storage service(GCS). Currently, it will not change location nor ACL once a bucket has been created with Terraform. For more information see [the official documentation](https://cloud.google.com/storage/docs/overview) and [API](https://cloud.google.com/storage/docs/json_api). + + +## Example Usage + +Example creating a private bucket in standard storage, in the EU region. + +``` +resource "google_storage_bucket" "image-store" { + name = "image-store-bucket" + predefined_acl = "projectPrivate" + location = "EU" +} + +``` + +## Argument Reference + +* `name` - (Required) The name of the bucket. +* `predefined_acl` - (Optional, Default: 'private') The [canned GCS ACL](https://cloud.google.com/storage/docs/access-control#predefined-acl) to apply. +* `location` - (Optional, Default: 'US') The [GCS location](https://cloud.google.com/storage/docs/bucket-locations) +* `force_destroy` - (Optional, Default: false) When deleting a bucket, this boolean option will delete all contained objects. If you try to delete a bucket that contains objects, Terraform will fail that run.