From 92874ec757795a88bafcc7df344318cedd6bbbda Mon Sep 17 00:00:00 2001 From: megan07 Date: Fri, 1 Nov 2019 16:31:51 -0500 Subject: [PATCH] deprecate 0.11 syntax in docs (resources) (#2574) --- ...oogle_compute_instance_group.html.markdown | 2 +- .../docs/d/google_iam_policy.html.markdown | 2 +- .../r/app_engine_application.html.markdown | 2 +- .../docs/r/bigquery_table.html.markdown | 5 +- .../docs/r/bigtable_gc_policy.html.markdown | 34 +-- .../docs/r/bigtable_instance.html.markdown | 2 +- .../r/bigtable_instance_iam.html.markdown | 20 +- .../docs/r/bigtable_table.html.markdown | 15 +- .../r/cloudfunctions_function.html.markdown | 40 +-- .../docs/r/cloudiot_registry.html.markdown | 6 +- .../docs/r/composer_environment.html.markdown | 24 +- .../r/compute_attached_disk.html.markdown | 7 +- ...mpute_instance_from_template.html.markdown | 14 +- .../r/compute_instance_group.html.markdown | 22 +- ...mpute_instance_group_manager.html.markdown | 54 ++-- .../docs/r/compute_instance_iam.html.markdown | 10 +- .../r/compute_instance_template.html.markdown | 8 +- .../r/compute_network_peering.html.markdown | 12 +- ...ompute_project_metadata_item.html.markdown | 2 +- ...egion_instance_group_manager.html.markdown | 53 ++-- ...pute_shared_vpc_host_project.html.markdown | 5 +- .../r/compute_subnetwork_iam.html.markdown | 4 +- .../docs/r/compute_target_pool.html.markdown | 2 +- .../docs/r/container_cluster.html.markdown | 16 +- .../docs/r/container_node_pool.html.markdown | 9 +- .../website/docs/r/dataflow_job.html.markdown | 14 +- .../docs/r/dataproc_cluster.html.markdown | 261 +++++++++--------- .../docs/r/dataproc_cluster_iam.html.markdown | 22 +- .../website/docs/r/dataproc_job.html.markdown | 190 ++++++------- .../docs/r/dataproc_job_iam.html.markdown | 22 +- ....markdown => dns_record_set.html.markdown} | 49 ++-- .../docs/r/endpoints_service.html.markdown | 6 +- ...billing_account_iam_binding.html.markdown} | 0 ..._billing_account_iam_member.html.markdown} | 0 ..._billing_account_iam_policy.html.markdown} | 4 +- .../docs/r/google_folder.html.markdown | 4 +- .../r/google_folder_iam_binding.html.markdown | 4 +- .../r/google_folder_iam_member.html.markdown | 6 +- .../r/google_folder_iam_policy.html.markdown | 6 +- ...e_folder_organization_policy.html.markdown | 4 +- ...gle_iap_tunnel_instance_iam.html.markdown} | 0 .../r/google_kms_key_ring_iam.html.markdown | 4 +- ...gle_organization_iam_member.html.markdown} | 4 +- ...gle_organization_iam_policy.html.markdown} | 4 +- .../google_organization_policy.html.markdown | 6 +- .../docs/r/google_project.html.markdown | 8 +- .../docs/r/google_project_iam.html.markdown | 2 +- ..._project_organization_policy.html.markdown | 4 +- .../google_service_account_iam.html.markdown | 16 +- .../google_service_account_key.html.markdown | 16 +- .../r/healthcare_dataset_iam.html.markdown | 10 +- .../healthcare_dicom_store_iam.html.markdown | 10 +- .../r/healthcare_fhir_store_iam.html.markdown | 10 +- .../healthcare_hl7_v2_store_iam.html.markdown | 11 +- ...ng_billing_account_exclusion.html.markdown | 10 +- ...logging_billing_account_sink.html.markdown | 18 +- .../r/logging_folder_exclusion.html.markdown | 14 +- .../docs/r/logging_folder_sink.html.markdown | 26 +- ...gging_organization_exclusion.html.markdown | 10 +- .../r/logging_organization_sink.html.markdown | 18 +- .../r/logging_project_exclusion.html.markdown | 8 +- .../docs/r/logging_project_sink.html.markdown | 36 +-- .../r/pubsub_subscription_iam.html.markdown | 6 +- .../docs/r/runtimeconfig_config.html.markdown | 4 +- .../r/runtimeconfig_variable.html.markdown | 20 +- ...ervice_networking_connection.html.markdown | 6 +- .../docs/r/spanner_database_iam.html.markdown | 16 +- .../docs/r/spanner_instance_iam.html.markdown | 12 +- .../r/sql_database_instance.html.markdown | 87 +++--- .../website/docs/r/sql_ssl_cert.html.markdown | 2 +- .../website/docs/r/sql_user.html.markdown | 2 +- .../docs/r/storage_bucket_acl.html.markdown | 2 +- .../docs/r/storage_bucket_iam.html.markdown | 12 +- .../storage_default_object_acl.html.markdown | 2 +- .../docs/r/storage_notification.html.markdown | 30 +- .../docs/r/storage_object_acl.html.markdown | 6 +- .../docs/r/storage_transfer_job.html.markdown | 107 ++++--- .../docs/r/usage_export_bucket.html.markdown | 4 +- 78 files changed, 758 insertions(+), 767 deletions(-) rename third_party/terraform/website/docs/r/{dns_record_set.markdown => dns_record_set.html.markdown} (80%) rename third_party/terraform/website/docs/r/{google_billing_account_iam_binding.md => google_billing_account_iam_binding.html.markdown} (100%) rename third_party/terraform/website/docs/r/{google_billing_account_iam_member.md => google_billing_account_iam_member.html.markdown} (100%) rename third_party/terraform/website/docs/r/{google_billing_account_iam_policy.md => google_billing_account_iam_policy.html.markdown} (93%) rename third_party/terraform/website/docs/r/{google_iap_tunnel_instance_iam.markdown => google_iap_tunnel_instance_iam.html.markdown} (100%) rename third_party/terraform/website/docs/r/{google_organization_iam_member.md => google_organization_iam_member.html.markdown} (96%) rename third_party/terraform/website/docs/r/{google_organization_iam_policy.md => google_organization_iam_policy.html.markdown} (95%) diff --git a/third_party/terraform/website/docs/d/google_compute_instance_group.html.markdown b/third_party/terraform/website/docs/d/google_compute_instance_group.html.markdown index 303df9716666..c0ccaa30895b 100644 --- a/third_party/terraform/website/docs/d/google_compute_instance_group.html.markdown +++ b/third_party/terraform/website/docs/d/google_compute_instance_group.html.markdown @@ -13,7 +13,7 @@ Get a Compute Instance Group within GCE. For more information, see [the official documentation](https://cloud.google.com/compute/docs/instance-groups/#unmanaged_instance_groups) and [API](https://cloud.google.com/compute/docs/reference/latest/instanceGroups) -``` +```hcl data "google_compute_instance_group" "all" { name = "instance-group-name" zone = "us-central1-a" diff --git a/third_party/terraform/website/docs/d/google_iam_policy.html.markdown b/third_party/terraform/website/docs/d/google_iam_policy.html.markdown index 9c42472a613a..c5e83cf81914 100644 --- a/third_party/terraform/website/docs/d/google_iam_policy.html.markdown +++ b/third_party/terraform/website/docs/d/google_iam_policy.html.markdown @@ -13,7 +13,7 @@ description: |- Generates an IAM policy document that may be referenced by and applied to other Google Cloud Platform resources, such as the `google_project` resource. -``` +```hcl data "google_iam_policy" "admin" { binding { role = "roles/compute.instanceAdmin" diff --git a/third_party/terraform/website/docs/r/app_engine_application.html.markdown b/third_party/terraform/website/docs/r/app_engine_application.html.markdown index 99a4773d6da5..d998e9df5425 100755 --- a/third_party/terraform/website/docs/r/app_engine_application.html.markdown +++ b/third_party/terraform/website/docs/r/app_engine_application.html.markdown @@ -26,7 +26,7 @@ resource "google_project" "my_project" { } resource "google_app_engine_application" "app" { - project = "${google_project.my_project.project_id}" + project = google_project.my_project.project_id location_id = "us-central" } ``` diff --git a/third_party/terraform/website/docs/r/bigquery_table.html.markdown b/third_party/terraform/website/docs/r/bigquery_table.html.markdown index abfe5f9c6a98..2e02807dfd67 100644 --- a/third_party/terraform/website/docs/r/bigquery_table.html.markdown +++ b/third_party/terraform/website/docs/r/bigquery_table.html.markdown @@ -30,7 +30,7 @@ resource "google_bigquery_dataset" "default" { } resource "google_bigquery_table" "default" { - dataset_id = "${google_bigquery_dataset.default.dataset_id}" + dataset_id = google_bigquery_dataset.default.dataset_id table_id = "bar" time_partitioning { @@ -57,10 +57,11 @@ resource "google_bigquery_table" "default" { } ] EOF + } resource "google_bigquery_table" "sheet" { - dataset_id = "${google_bigquery_dataset.default.dataset_id}" + dataset_id = google_bigquery_dataset.default.dataset_id table_id = "sheet" external_data_configuration { diff --git a/third_party/terraform/website/docs/r/bigtable_gc_policy.html.markdown b/third_party/terraform/website/docs/r/bigtable_gc_policy.html.markdown index 0e4f4edf92d2..e19beed025fd 100644 --- a/third_party/terraform/website/docs/r/bigtable_gc_policy.html.markdown +++ b/third_party/terraform/website/docs/r/bigtable_gc_policy.html.markdown @@ -18,27 +18,29 @@ Creates a Google Cloud Bigtable GC Policy inside a family. For more information ```hcl resource "google_bigtable_instance" "instance" { - name = "tf-instance" - cluster_id = "tf-instance-cluster" - zone = "us-central1-b" - num_nodes = 3 - storage_type = "HDD" + name = "tf-instance" + cluster { + cluster_id = "tf-instance-cluster" + zone = "us-central1-b" + num_nodes = 3 + storage_type = "HDD" + } } resource "google_bigtable_table" "table" { name = "tf-table" - instance_name = "${google_bigtable_instance.instance.name}" - + instance_name = google_bigtable_instance.instance.name + column_family { family = "name" } } resource "google_bigtable_gc_policy" "policy" { - instance_name = "${google_bigtable_instance.instance.name}" - table = "${google_bigtable_table.table.name}" + instance_name = google_bigtable_instance.instance.name + table = google_bigtable_table.table.name column_family = "name" - + max_age { days = 7 } @@ -46,18 +48,18 @@ resource "google_bigtable_gc_policy" "policy" { ``` Multiple conditions is also supported. `UNION` when any of its sub-policies apply (OR). `INTERSECTION` when all its sub-policies apply (AND) -``` +```hcl resource "google_bigtable_gc_policy" "policy" { - instance_name = "${google_bigtable_instance.instance.name}" - table = "${google_bigtable_table.table.name}" + instance_name = google_bigtable_instance.instance.name + table = google_bigtable_table.table.name column_family = "name" - + mode = "UNION" - + max_age { days = 7 } - + max_version { number = 10 } diff --git a/third_party/terraform/website/docs/r/bigtable_instance.html.markdown b/third_party/terraform/website/docs/r/bigtable_instance.html.markdown index e54ab9d79e54..083db724b39d 100644 --- a/third_party/terraform/website/docs/r/bigtable_instance.html.markdown +++ b/third_party/terraform/website/docs/r/bigtable_instance.html.markdown @@ -18,7 +18,7 @@ Creates a Google Bigtable instance. For more information see ```hcl resource "google_bigtable_instance" "production-instance" { - name = "tf-instance" + name = "tf-instance" cluster { cluster_id = "tf-instance-cluster" diff --git a/third_party/terraform/website/docs/r/bigtable_instance_iam.html.markdown b/third_party/terraform/website/docs/r/bigtable_instance_iam.html.markdown index c05293c5283e..1fc149aff35b 100644 --- a/third_party/terraform/website/docs/r/bigtable_instance_iam.html.markdown +++ b/third_party/terraform/website/docs/r/bigtable_instance_iam.html.markdown @@ -24,7 +24,7 @@ Three different resources help you manage IAM policies on bigtable instances. Ea ```hcl data "google_iam_policy" "admin" { binding { - role = "roles/editor" + role = "roles/editor" members = [ "user:jane@example.com", ] @@ -32,9 +32,9 @@ data "google_iam_policy" "admin" { } resource "google_bigtable_instance_iam_policy" "editor" { - project = "your-project" - instance = "your-bigtable-instance" - policy_data = "${data.google_iam_policy.admin.policy_data}" + project = "your-project" + instance = "your-bigtable-instance" + policy_data = data.google_iam_policy.admin.policy_data } ``` @@ -42,9 +42,9 @@ resource "google_bigtable_instance_iam_policy" "editor" { ```hcl resource "google_bigtable_instance_iam_binding" "editor" { - instance = "your-bigtable-instance" - role = "roles/editor" - members = [ + instance = "your-bigtable-instance" + role = "roles/editor" + members = [ "user:jane@example.com", ] } @@ -54,9 +54,9 @@ resource "google_bigtable_instance_iam_binding" "editor" { ```hcl resource "google_bigtable_instance_iam_member" "editor" { - instance = "your-bigtable-instance" - role = "roles/editor" - member = "user:jane@example.com" + instance = "your-bigtable-instance" + role = "roles/editor" + member = "user:jane@example.com" } ``` diff --git a/third_party/terraform/website/docs/r/bigtable_table.html.markdown b/third_party/terraform/website/docs/r/bigtable_table.html.markdown index b69fcd5bc555..8c035c6d35f4 100644 --- a/third_party/terraform/website/docs/r/bigtable_table.html.markdown +++ b/third_party/terraform/website/docs/r/bigtable_table.html.markdown @@ -18,16 +18,19 @@ Creates a Google Cloud Bigtable table inside an instance. For more information s ```hcl resource "google_bigtable_instance" "instance" { - name = "tf-instance" - cluster_id = "tf-instance-cluster" - zone = "us-central1-b" - num_nodes = 3 - storage_type = "HDD" + name = "tf-instance" + + cluster { + cluster_id = "tf-instance-cluster" + zone = "us-central1-b" + num_nodes = 3 + storage_type = "HDD" + } } resource "google_bigtable_table" "table" { name = "tf-table" - instance_name = "${google_bigtable_instance.instance.name}" + instance_name = google_bigtable_instance.instance.name split_keys = ["a", "b", "c"] } ``` diff --git a/third_party/terraform/website/docs/r/cloudfunctions_function.html.markdown b/third_party/terraform/website/docs/r/cloudfunctions_function.html.markdown index b7681f5e5ea5..98611aa045ff 100644 --- a/third_party/terraform/website/docs/r/cloudfunctions_function.html.markdown +++ b/third_party/terraform/website/docs/r/cloudfunctions_function.html.markdown @@ -29,29 +29,29 @@ resource "google_storage_bucket" "bucket" { resource "google_storage_bucket_object" "archive" { name = "index.zip" - bucket = "${google_storage_bucket.bucket.name}" + bucket = google_storage_bucket.bucket.name source = "./path/to/zip/file/which/contains/code" } resource "google_cloudfunctions_function" "function" { - name = "function-test" - description = "My function" - runtime = "nodejs10" + name = "function-test" + description = "My function" + runtime = "nodejs10" available_memory_mb = 128 - source_archive_bucket = "${google_storage_bucket.bucket.name}" - source_archive_object = "${google_storage_bucket_object.archive.name}" + source_archive_bucket = google_storage_bucket.bucket.name + source_archive_object = google_storage_bucket_object.archive.name trigger_http = true entry_point = "helloGET" } # IAM entry for all users to invoke the function resource "google_cloudfunctions_function_iam_member" "invoker" { - project = "${google_cloudfunctions_function.function.project}" - region = "${google_cloudfunctions_function.function.region}" - cloud_function = "${google_cloudfunctions_function.function.name}" + project = google_cloudfunctions_function.function.project + region = google_cloudfunctions_function.function.region + cloud_function = google_cloudfunctions_function.function.name - role = "roles/cloudfunctions.invoker" + role = "roles/cloudfunctions.invoker" member = "allUsers" } ``` @@ -65,18 +65,18 @@ resource "google_storage_bucket" "bucket" { resource "google_storage_bucket_object" "archive" { name = "index.zip" - bucket = "${google_storage_bucket.bucket.name}" + bucket = google_storage_bucket.bucket.name source = "./path/to/zip/file/which/contains/code" } resource "google_cloudfunctions_function" "function" { - name = "function-test" - description = "My function" - runtime = "nodejs10" + name = "function-test" + description = "My function" + runtime = "nodejs10" available_memory_mb = 128 - source_archive_bucket = "${google_storage_bucket.bucket.name}" - source_archive_object = "${google_storage_bucket_object.archive.name}" + source_archive_bucket = google_storage_bucket.bucket.name + source_archive_object = google_storage_bucket_object.archive.name trigger_http = true timeout = 60 entry_point = "helloGET" @@ -91,11 +91,11 @@ resource "google_cloudfunctions_function" "function" { # IAM entry for a single user to invoke the function resource "google_cloudfunctions_function_iam_member" "invoker" { - project = "${google_cloudfunctions_function.function.project}" - region = "${google_cloudfunctions_function.function.region}" - cloud_function = "${google_cloudfunctions_function.function.name}" + project = google_cloudfunctions_function.function.project + region = google_cloudfunctions_function.function.region + cloud_function = google_cloudfunctions_function.function.name - role = "roles/cloudfunctions.invoker" + role = "roles/cloudfunctions.invoker" member = "user:myFunctionInvoker@example.com" } ``` diff --git a/third_party/terraform/website/docs/r/cloudiot_registry.html.markdown b/third_party/terraform/website/docs/r/cloudiot_registry.html.markdown index b1ee569ba5ca..5aca4f3eaf60 100644 --- a/third_party/terraform/website/docs/r/cloudiot_registry.html.markdown +++ b/third_party/terraform/website/docs/r/cloudiot_registry.html.markdown @@ -29,11 +29,11 @@ resource "google_cloudiot_registry" "default-registry" { name = "default-registry" event_notification_configs { - pubsub_topic_name = "${google_pubsub_topic.default-telemetry.id}" + pubsub_topic_name = google_pubsub_topic.default-telemetry.id } state_notification_config = { - pubsub_topic_name = "${google_pubsub_topic.default-devicestatus.id}" + pubsub_topic_name = google_pubsub_topic.default-devicestatus.id } http_config = { @@ -47,7 +47,7 @@ resource "google_cloudiot_registry" "default-registry" { credentials { public_key_certificate = { format = "X509_CERTIFICATE_PEM" - certificate = "${file("rsa_cert.pem")}" + certificate = file("rsa_cert.pem") } } } diff --git a/third_party/terraform/website/docs/r/composer_environment.html.markdown b/third_party/terraform/website/docs/r/composer_environment.html.markdown index 77a9feacefef..2b830feab889 100644 --- a/third_party/terraform/website/docs/r/composer_environment.html.markdown +++ b/third_party/terraform/website/docs/r/composer_environment.html.markdown @@ -50,27 +50,27 @@ on the IAM policy binding (see `google_project_iam_member` below). ```hcl resource "google_composer_environment" "test" { - name = "%s" + name = "%s" region = "us-central1" config { node_count = 4 node_config { - zone = "us-central1-a" + zone = "us-central1-a" machine_type = "n1-standard-1" - network = "${google_compute_network.test.self_link}" - subnetwork = "${google_compute_subnetwork.test.self_link}" + network = google_compute_network.test.self_link + subnetwork = google_compute_subnetwork.test.self_link - service_account = "${google_service_account.test.name}" + service_account = google_service_account.test.name } } - depends_on = ["google_project_iam_member.composer-worker"] + depends_on = [google_project_iam_member.composer-worker] } resource "google_compute_network" "test" { - name = "composer-test-network" + name = "composer-test-network" auto_create_subnetworks = false } @@ -78,7 +78,7 @@ resource "google_compute_subnetwork" "test" { name = "composer-test-subnetwork" ip_cidr_range = "10.2.0.0/16" region = "us-central1" - network = "${google_compute_network.test.self_link}" + network = google_compute_network.test.self_link } resource "google_service_account" "test" { @@ -87,15 +87,15 @@ resource "google_service_account" "test" { } resource "google_project_iam_member" "composer-worker" { - role = "roles/composer.worker" - member = "serviceAccount:${google_service_account.test.email}" + role = "roles/composer.worker" + member = "serviceAccount:${google_service_account.test.email}" } ``` ### With Software (Airflow) Config ```hcl resource "google_composer_environment" "test" { - name = "%s" + name = "%s" region = "us-central1" config { @@ -110,7 +110,7 @@ resource "google_composer_environment" "test" { } env_variables = { - FOO = "bar" + FOO = "bar" } } } diff --git a/third_party/terraform/website/docs/r/compute_attached_disk.html.markdown b/third_party/terraform/website/docs/r/compute_attached_disk.html.markdown index d673f2e784aa..df9c0e11139f 100644 --- a/third_party/terraform/website/docs/r/compute_attached_disk.html.markdown +++ b/third_party/terraform/website/docs/r/compute_attached_disk.html.markdown @@ -28,8 +28,8 @@ To get more information about attaching disks, see: ## Example Usage ```hcl resource "google_compute_attached_disk" "default" { - disk = "${google_compute_disk.default.self_link}" - instance = "${google_compute_instance.default.self_link}" + disk = google_compute_disk.default.self_link + instance = google_compute_instance.default.self_link } resource "google_compute_instance" "default" { @@ -37,7 +37,6 @@ resource "google_compute_instance" "default" { machine_type = "n1-standard-1" zone = "us-west1-a" - boot_disk { initialize_params { image = "debian-cloud/debian-9" @@ -49,7 +48,7 @@ resource "google_compute_instance" "default" { } lifecycle { - ignore_changes = ["attached_disk"] + ignore_changes = [attached_disk] } } ``` diff --git a/third_party/terraform/website/docs/r/compute_instance_from_template.html.markdown b/third_party/terraform/website/docs/r/compute_instance_from_template.html.markdown index 99491ad5458d..1458e654c478 100644 --- a/third_party/terraform/website/docs/r/compute_instance_from_template.html.markdown +++ b/third_party/terraform/website/docs/r/compute_instance_from_template.html.markdown @@ -23,14 +23,14 @@ This resource is specifically to create a compute instance from a given ```hcl resource "google_compute_instance_template" "tpl" { - name = "template" + name = "template" machine_type = "n1-standard-1" disk { source_image = "debian-cloud/debian-9" - auto_delete = true + auto_delete = true disk_size_gb = 100 - boot = true + boot = true } network_interface { @@ -45,15 +45,15 @@ resource "google_compute_instance_template" "tpl" { } resource "google_compute_instance_from_template" "tpl" { - name = "instance-from-template" - zone = "us-central1-a" + name = "instance-from-template" + zone = "us-central1-a" - source_instance_template = "${google_compute_instance_template.tpl.self_link}" + source_instance_template = google_compute_instance_template.tpl.self_link // Override fields from instance template can_ip_forward = false labels = { - my_key = "my_value" + my_key = "my_value" } } ``` diff --git a/third_party/terraform/website/docs/r/compute_instance_group.html.markdown b/third_party/terraform/website/docs/r/compute_instance_group.html.markdown index 6f62111f2968..4407f62caeae 100644 --- a/third_party/terraform/website/docs/r/compute_instance_group.html.markdown +++ b/third_party/terraform/website/docs/r/compute_instance_group.html.markdown @@ -24,7 +24,7 @@ resource "google_compute_instance_group" "test" { name = "terraform-test" description = "Terraform test instance group" zone = "us-central1-a" - network = "${google_compute_network.default.self_link}" + network = google_compute_network.default.self_link } ``` @@ -36,8 +36,8 @@ resource "google_compute_instance_group" "webservers" { description = "Terraform test instance group" instances = [ - "${google_compute_instance.test.self_link}", - "${google_compute_instance.test2.self_link}", + google_compute_instance.test.self_link, + google_compute_instance.test2.self_link, ] named_port { @@ -61,9 +61,9 @@ as shown in this example to avoid this type of error. ```hcl resource "google_compute_instance_group" "staging_group" { - name = "staging-instance-group" - zone = "us-central1-c" - instances = [ "${google_compute_instance.staging_vm.self_link}" ] + name = "staging-instance-group" + zone = "us-central1-c" + instances = [google_compute_instance.staging_vm.self_link] named_port { name = "http" port = "8080" @@ -85,12 +85,12 @@ data "google_compute_image" "debian_image" { } resource "google_compute_instance" "staging_vm" { - name = "staging-vm" + name = "staging-vm" machine_type = "n1-standard-1" - zone = "us-central1-c" + zone = "us-central1-c" boot_disk { initialize_params { - image = "${data.google_compute_image.debian_image.self_link}" + image = data.google_compute_image.debian_image.self_link } } @@ -105,11 +105,11 @@ resource "google_compute_backend_service" "staging_service" { protocol = "HTTPS" backend { - group = "${google_compute_instance_group.staging_group.self_link}" + group = google_compute_instance_group.staging_group.self_link } health_checks = [ - "${google_compute_https_health_check.staging_health.self_link}", + google_compute_https_health_check.staging_health.self_link, ] } diff --git a/third_party/terraform/website/docs/r/compute_instance_group_manager.html.markdown b/third_party/terraform/website/docs/r/compute_instance_group_manager.html.markdown index 992960fcdbe7..db30260b72cb 100644 --- a/third_party/terraform/website/docs/r/compute_instance_group_manager.html.markdown +++ b/third_party/terraform/website/docs/r/compute_instance_group_manager.html.markdown @@ -24,7 +24,7 @@ resource "google_compute_health_check" "autohealing" { check_interval_sec = 5 timeout_sec = 5 healthy_threshold = 2 - unhealthy_threshold = 10 # 50 seconds + unhealthy_threshold = 10 # 50 seconds http_health_check { request_path = "/healthz" @@ -39,10 +39,10 @@ resource "google_compute_instance_group_manager" "appserver" { zone = "us-central1-a" version { - instance_template = "${google_compute_instance_template.appserver.self_link}" + instance_template = google_compute_instance_template.appserver.self_link } - target_pools = ["${google_compute_target_pool.appserver.self_link}"] + target_pools = [google_compute_target_pool.appserver.self_link] target_size = 2 named_port { @@ -51,7 +51,7 @@ resource "google_compute_instance_group_manager" "appserver" { } auto_healing_policies { - health_check = "${google_compute_health_check.autohealing.self_link}" + health_check = google_compute_health_check.autohealing.self_link initial_delay_sec = 300 } } @@ -60,22 +60,22 @@ resource "google_compute_instance_group_manager" "appserver" { ## Example Usage with multiple versions (`google-beta` provider) ```hcl resource "google_compute_instance_group_manager" "appserver" { - provider = "google-beta" - name = "appserver-igm" + provider = google-beta + name = "appserver-igm" base_instance_name = "app" zone = "us-central1-a" - target_size = 5 + target_size = 5 version { - name = "appserver" - instance_template = "${google_compute_instance_template.appserver.self_link}" + name = "appserver" + instance_template = google_compute_instance_template.appserver.self_link } version { - name = "appserver-canary" - instance_template = "${google_compute_instance_template.appserver-canary.self_link}" + name = "appserver-canary" + instance_template = google_compute_instance_template.appserver-canary.self_link target_size { fixed = 1 } @@ -150,12 +150,12 @@ group. You can specify only one value. Structure is documented below. For more i The `update_policy` block supports: ```hcl -update_policy{ - type = "PROACTIVE" - minimal_action = "REPLACE" - max_surge_percent = 20 +update_policy { + type = "PROACTIVE" + minimal_action = "REPLACE" + max_surge_percent = 20 max_unavailable_fixed = 2 - min_ready_sec = 50 + min_ready_sec = 50 } ``` @@ -192,21 +192,23 @@ The `version` block supports: ```hcl version { - name = "appserver-canary" - instance_template = "${google_compute_instance_template.appserver-canary.self_link}" - target_size { - fixed = 1 - } + name = "appserver-canary" + instance_template = google_compute_instance_template.appserver-canary.self_link + + target_size { + fixed = 1 + } } ``` ```hcl version { - name = "appserver-canary" - instance_template = "${google_compute_instance_template.appserver-canary.self_link}" - target_size { - percent = 20 - } + name = "appserver-canary" + instance_template = google_compute_instance_template.appserver-canary.self_link + + target_size { + percent = 20 + } } ``` diff --git a/third_party/terraform/website/docs/r/compute_instance_iam.html.markdown b/third_party/terraform/website/docs/r/compute_instance_iam.html.markdown index 9e30d21f7856..bf5df4866c00 100644 --- a/third_party/terraform/website/docs/r/compute_instance_iam.html.markdown +++ b/third_party/terraform/website/docs/r/compute_instance_iam.html.markdown @@ -33,8 +33,8 @@ data "google_iam_policy" "admin" { } resource "google_compute_instance_iam_policy" "instance" { - instance_name = "your-instance-name" - policy_data = "${data.google_iam_policy.admin.policy_data}" + instance_name = "your-instance-name" + policy_data = data.google_iam_policy.admin.policy_data } ``` @@ -43,7 +43,7 @@ resource "google_compute_instance_iam_policy" "instance" { ```hcl resource "google_compute_instance_iam_binding" "instance" { instance_name = "your-instance-name" - role = "roles/compute.osLogin" + role = "roles/compute.osLogin" members = [ "user:jane@example.com", @@ -56,8 +56,8 @@ resource "google_compute_instance_iam_binding" "instance" { ```hcl resource "google_compute_instance_iam_member" "instance" { instance_name = "your-instance-name" - role = "roles/compute.osLogin" - member = "user:jane@example.com" + role = "roles/compute.osLogin" + member = "user:jane@example.com" } ``` diff --git a/third_party/terraform/website/docs/r/compute_instance_template.html.markdown b/third_party/terraform/website/docs/r/compute_instance_template.html.markdown index c7fc363f6b7c..c8d00105abca 100644 --- a/third_party/terraform/website/docs/r/compute_instance_template.html.markdown +++ b/third_party/terraform/website/docs/r/compute_instance_template.html.markdown @@ -47,7 +47,7 @@ resource "google_compute_instance_template" "default" { // Use an existing disk resource disk { // Instance Templates reference disks by name, not self link - source = "${google_compute_disk.foobar.name}" + source = google_compute_disk.foobar.name auto_delete = false boot = false } @@ -72,7 +72,7 @@ data "google_compute_image" "my_image" { resource "google_compute_disk" "foobar" { name = "existing-disk" - image = "${data.google_compute_image.my_image.self_link}" + image = data.google_compute_image.my_image.self_link size = 10 type = "pd-ssd" zone = "us-central1-a" @@ -112,7 +112,7 @@ resource "google_compute_instance_template" "instance_template" { resource "google_compute_instance_group_manager" "instance_group_manager" { name = "instance-group-manager" - instance_template = "${google_compute_instance_template.instance_template.self_link}" + instance_template = google_compute_instance_template.instance_template.self_link base_instance_name = "instance-group-manager" zone = "us-central1-f" target_size = "1" @@ -153,7 +153,7 @@ resource "google_compute_instance_template" "instance_template" { // boot disk disk { - source_image = "${google_compute_image.my_image.self_link}" + source_image = google_compute_image.my_image.self_link } } ``` diff --git a/third_party/terraform/website/docs/r/compute_network_peering.html.markdown b/third_party/terraform/website/docs/r/compute_network_peering.html.markdown index a35d79ab104f..3357a38aedcf 100644 --- a/third_party/terraform/website/docs/r/compute_network_peering.html.markdown +++ b/third_party/terraform/website/docs/r/compute_network_peering.html.markdown @@ -22,15 +22,15 @@ and ```hcl resource "google_compute_network_peering" "peering1" { - name = "peering1" - network = "${google_compute_network.default.self_link}" - peer_network = "${google_compute_network.other.self_link}" + name = "peering1" + network = google_compute_network.default.self_link + peer_network = google_compute_network.other.self_link } resource "google_compute_network_peering" "peering2" { - name = "peering2" - network = "${google_compute_network.other.self_link}" - peer_network = "${google_compute_network.default.self_link}" + name = "peering2" + network = google_compute_network.other.self_link + peer_network = google_compute_network.default.self_link } resource "google_compute_network" "default" { diff --git a/third_party/terraform/website/docs/r/compute_project_metadata_item.html.markdown b/third_party/terraform/website/docs/r/compute_project_metadata_item.html.markdown index d3f92a6a9971..b82d909e5521 100644 --- a/third_party/terraform/website/docs/r/compute_project_metadata_item.html.markdown +++ b/third_party/terraform/website/docs/r/compute_project_metadata_item.html.markdown @@ -18,7 +18,7 @@ project metadata map. ```hcl resource "google_compute_project_metadata_item" "default" { - key = "my_metadata" + key = "my_metadata" value = "my_value" } ``` diff --git a/third_party/terraform/website/docs/r/compute_region_instance_group_manager.html.markdown b/third_party/terraform/website/docs/r/compute_region_instance_group_manager.html.markdown index 16e1d4ecdab9..5c18330e9336 100644 --- a/third_party/terraform/website/docs/r/compute_region_instance_group_manager.html.markdown +++ b/third_party/terraform/website/docs/r/compute_region_instance_group_manager.html.markdown @@ -24,7 +24,7 @@ resource "google_compute_health_check" "autohealing" { check_interval_sec = 5 timeout_sec = 5 healthy_threshold = 2 - unhealthy_threshold = 10 # 50 seconds + unhealthy_threshold = 10 # 50 seconds http_health_check { request_path = "/healthz" @@ -36,14 +36,14 @@ resource "google_compute_region_instance_group_manager" "appserver" { name = "appserver-igm" base_instance_name = "app" + region = "us-central1" + distribution_policy_zones = ["us-central1-a", "us-central1-f"] version { - instance_template = "${google_compute_instance_template.appserver.self_link}" + instance_template = google_compute_instance_template.appserver.self_link } - region = "us-central1" - distribution_policy_zones = ["us-central1-a", "us-central1-f"] - target_pools = ["${google_compute_target_pool.appserver.self_link}"] + target_pools = [google_compute_target_pool.appserver.self_link] target_size = 2 named_port { @@ -52,11 +52,10 @@ resource "google_compute_region_instance_group_manager" "appserver" { } auto_healing_policies { - health_check = "${google_compute_health_check.autohealing.self_link}" + health_check = google_compute_health_check.autohealing.self_link initial_delay_sec = 300 } } - ``` ## Example Usage with multiple versions @@ -67,14 +66,14 @@ resource "google_compute_region_instance_group_manager" "appserver" { base_instance_name = "app" region = "us-central1" - target_size = 5 + target_size = 5 version { - instance_template = "${google_compute_instance_template.appserver.self_link}" + instance_template = google_compute_instance_template.appserver.self_link } version { - instance_template = "${google_compute_instance_template.appserver-canary.self_link}" + instance_template = google_compute_instance_template.appserver-canary.self_link target_size { fixed = 1 } @@ -150,13 +149,13 @@ group. You can specify one or more values. For more information, see the [offici The `update_policy` block supports: ```hcl -update_policy{ - type = "PROACTIVE" +update_policy { + type = "PROACTIVE" instance_redistribution_type = "PROACTIVE" - minimal_action = "REPLACE" - max_surge_percent = 20 - max_unavailable_fixed = 2 - min_ready_sec = 50 + minimal_action = "REPLACE" + max_surge_percent = 20 + max_unavailable_fixed = 2 + min_ready_sec = 50 } ``` @@ -195,21 +194,23 @@ The `version` block supports: ```hcl version { - name = "appserver-canary" - instance_template = "${google_compute_instance_template.appserver-canary.self_link}" - target_size { - fixed = 1 - } + name = "appserver-canary" + instance_template = google_compute_instance_template.appserver-canary.self_link + + target_size { + fixed = 1 + } } ``` ```hcl version { - name = "appserver-canary" - instance_template = "${google_compute_instance_template.appserver-canary.self_link}" - target_size { - percent = 20 - } + name = "appserver-canary" + instance_template = google_compute_instance_template.appserver-canary.self_link + + target_size { + percent = 20 + } } ``` diff --git a/third_party/terraform/website/docs/r/compute_shared_vpc_host_project.html.markdown b/third_party/terraform/website/docs/r/compute_shared_vpc_host_project.html.markdown index cbefbe3e9b8b..6a5a56f5cfa6 100644 --- a/third_party/terraform/website/docs/r/compute_shared_vpc_host_project.html.markdown +++ b/third_party/terraform/website/docs/r/compute_shared_vpc_host_project.html.markdown @@ -28,11 +28,12 @@ resource "google_compute_shared_vpc_host_project" "host" { # A service project gains access to network resources provided by its # associated host project. resource "google_compute_shared_vpc_service_project" "service1" { - host_project = "${google_compute_shared_vpc_host_project.host.project}" + host_project = google_compute_shared_vpc_host_project.host.project service_project = "service-project-id-1" } + resource "google_compute_shared_vpc_service_project" "service2" { - host_project = "${google_compute_shared_vpc_host_project.host.project}" + host_project = google_compute_shared_vpc_host_project.host.project service_project = "service-project-id-2" } ``` diff --git a/third_party/terraform/website/docs/r/compute_subnetwork_iam.html.markdown b/third_party/terraform/website/docs/r/compute_subnetwork_iam.html.markdown index 0964035c6c5a..3fc246d6f8fd 100644 --- a/third_party/terraform/website/docs/r/compute_subnetwork_iam.html.markdown +++ b/third_party/terraform/website/docs/r/compute_subnetwork_iam.html.markdown @@ -36,8 +36,8 @@ data "google_iam_policy" "admin" { } resource "google_compute_subnetwork_iam_policy" "subnet" { - subnetwork = "your-subnetwork-id" - policy_data = "${data.google_iam_policy.admin.policy_data}" + subnetwork = "your-subnetwork-id" + policy_data = data.google_iam_policy.admin.policy_data } ``` diff --git a/third_party/terraform/website/docs/r/compute_target_pool.html.markdown b/third_party/terraform/website/docs/r/compute_target_pool.html.markdown index 12e6b6f3ed30..47119d23d410 100644 --- a/third_party/terraform/website/docs/r/compute_target_pool.html.markdown +++ b/third_party/terraform/website/docs/r/compute_target_pool.html.markdown @@ -28,7 +28,7 @@ resource "google_compute_target_pool" "default" { ] health_checks = [ - "${google_compute_http_health_check.default.name}", + google_compute_http_health_check.default.name, ] } diff --git a/third_party/terraform/website/docs/r/container_cluster.html.markdown b/third_party/terraform/website/docs/r/container_cluster.html.markdown index a9a66b3ee27d..a2602e131b5c 100644 --- a/third_party/terraform/website/docs/r/container_cluster.html.markdown +++ b/third_party/terraform/website/docs/r/container_cluster.html.markdown @@ -28,7 +28,7 @@ resource "google_container_cluster" "primary" { # separately managed node pools. So we create the smallest possible default # node pool and immediately delete it. remove_default_node_pool = true - initial_node_count = 1 + initial_node_count = 1 master_auth { username = "" @@ -43,7 +43,7 @@ resource "google_container_cluster" "primary" { resource "google_container_node_pool" "primary_preemptible_nodes" { name = "my-node-pool" location = "us-central1" - cluster = "${google_container_cluster.primary.name}" + cluster = google_container_cluster.primary.name node_count = 1 node_config { @@ -329,11 +329,12 @@ The `addons_config` block supports: This example `addons_config` disables two addons: -``` +```hcl addons_config { http_load_balancing { disabled = true } + horizontal_pod_autoscaling { disabled = true } @@ -383,7 +384,7 @@ The `maintenance_policy` block supports: Specify `start_time` in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) format "HH:MM”, where HH : \[00-23\] and MM : \[00-59\] GMT. For example: -``` +```hcl maintenance_policy { daily_maintenance_window { start_time = "03:00" @@ -464,7 +465,7 @@ The `master_auth` block supports: * `client_certificate_config` - (Optional) Whether client certificate authorization is enabled for this cluster. For example: -``` +```hcl master_auth { client_certificate_config { issue_client_certificate = false @@ -585,7 +586,7 @@ The `guest_accelerator` block supports: The `workload_identity_config` block supports: * `identity_namespace` (Required) - Currently, the only supported identity namespace is the project's default. -``` +```hcl workload_identity_config { identity_namespace = "${data.google_project.project.project_id}.svc.id.goog" } @@ -638,9 +639,10 @@ The `resource_usage_export_config` block supports: * `bigquery_destination.dataset_id` (Required) - The ID of a BigQuery Dataset. For Example: -``` +```hcl resource_usage_export_config { enable_network_egress_metering = false + bigquery_destination { dataset_id = "cluster_resource_usage" } diff --git a/third_party/terraform/website/docs/r/container_node_pool.html.markdown b/third_party/terraform/website/docs/r/container_node_pool.html.markdown index 81508110540c..dbb9d8d3914c 100644 --- a/third_party/terraform/website/docs/r/container_node_pool.html.markdown +++ b/third_party/terraform/website/docs/r/container_node_pool.html.markdown @@ -19,18 +19,18 @@ and [the API reference](https://cloud.google.com/container-engine/reference/rest resource "google_container_cluster" "primary" { name = "my-gke-cluster" location = "us-central1" - + # We can't create a cluster with no node pool defined, but we want to only use # separately managed node pools. So we create the smallest possible default # node pool and immediately delete it. remove_default_node_pool = true - initial_node_count = 1 + initial_node_count = 1 } resource "google_container_node_pool" "primary_preemptible_nodes" { name = "my-node-pool" location = "us-central1" - cluster = "${google_container_cluster.primary.name}" + cluster = google_container_cluster.primary.name node_count = 1 node_config { @@ -51,7 +51,7 @@ resource "google_container_node_pool" "primary_preemptible_nodes" { resource "google_container_node_pool" "np" { name = "my-node-pool" location = "us-central1-a" - cluster = "${google_container_cluster.primary.name}" + cluster = google_container_cluster.primary.name node_count = 3 timeouts { @@ -94,7 +94,6 @@ resource "google_container_cluster" "primary" { } } } - ``` ## Argument Reference diff --git a/third_party/terraform/website/docs/r/dataflow_job.html.markdown b/third_party/terraform/website/docs/r/dataflow_job.html.markdown index a93ab643ef85..7b4aa2127cb6 100644 --- a/third_party/terraform/website/docs/r/dataflow_job.html.markdown +++ b/third_party/terraform/website/docs/r/dataflow_job.html.markdown @@ -18,13 +18,13 @@ the official documentation for ```hcl resource "google_dataflow_job" "big_data_job" { - name = "dataflow-job" - template_gcs_path = "gs://my-bucket/templates/template_file" - temp_gcs_location = "gs://my-bucket/tmp_dir" - parameters = { - foo = "bar" - baz = "qux" - } + name = "dataflow-job" + template_gcs_path = "gs://my-bucket/templates/template_file" + temp_gcs_location = "gs://my-bucket/tmp_dir" + parameters = { + foo = "bar" + baz = "qux" + } } ``` diff --git a/third_party/terraform/website/docs/r/dataproc_cluster.html.markdown b/third_party/terraform/website/docs/r/dataproc_cluster.html.markdown index 384554d54a38..c94aabe99b82 100644 --- a/third_party/terraform/website/docs/r/dataproc_cluster.html.markdown +++ b/third_party/terraform/website/docs/r/dataproc_cluster.html.markdown @@ -21,8 +21,8 @@ whole cluster! ```hcl resource "google_dataproc_cluster" "simplecluster" { - name = "simplecluster" - region = "us-central1" + name = "simplecluster" + region = "us-central1" } ``` @@ -30,69 +30,62 @@ resource "google_dataproc_cluster" "simplecluster" { ```hcl resource "google_dataproc_cluster" "mycluster" { - name = "mycluster" - region = "us-central1" - labels = { - foo = "bar" + name = "mycluster" + region = "us-central1" + labels = { + foo = "bar" + } + + cluster_config { + staging_bucket = "dataproc-staging-bucket" + + master_config { + num_instances = 1 + machine_type = "n1-standard-1" + disk_config { + boot_disk_type = "pd-ssd" + boot_disk_size_gb = 15 + } } - cluster_config { - staging_bucket = "dataproc-staging-bucket" - - master_config { - num_instances = 1 - machine_type = "n1-standard-1" - disk_config { - boot_disk_type = "pd-ssd" - boot_disk_size_gb = 15 - } - } - - worker_config { - num_instances = 2 - machine_type = "n1-standard-1" - min_cpu_platform = "Intel Skylake" - disk_config { - boot_disk_size_gb = 15 - num_local_ssds = 1 - } - } - - preemptible_worker_config { - num_instances = 0 - } - - # Override or set some custom properties - software_config { - image_version = "1.3.7-deb9" - override_properties = { - "dataproc:dataproc.allow.zero.workers" = "true" - } - } - - gce_cluster_config { - #network = "${google_compute_network.dataproc_network.name}" - tags = ["foo", "bar"] - service_account_scopes = [ - # User supplied scopes - "https://www.googleapis.com/auth/monitoring", - - # The following scopes necessary for the cluster to function properly are - # always added, even if not explicitly specified: - # useraccounts-ro: https://www.googleapis.com/auth/cloud.useraccounts.readonly - # storage-rw: https://www.googleapis.com/auth/devstorage.read_write - # logging-write: https://www.googleapis.com/auth/logging.write - "useraccounts-ro","storage-rw","logging-write" - ] - } + worker_config { + num_instances = 2 + machine_type = "n1-standard-1" + min_cpu_platform = "Intel Skylake" + disk_config { + boot_disk_size_gb = 15 + num_local_ssds = 1 + } + } - # You can define multiple initialization_action blocks - initialization_action { - script = "gs://dataproc-initialization-actions/stackdriver/stackdriver.sh" - timeout_sec = 500 - } + preemptible_worker_config { + num_instances = 0 + } + + # Override or set some custom properties + software_config { + image_version = "1.3.7-deb9" + override_properties = { + "dataproc:dataproc.allow.zero.workers" = "true" + } + } + + gce_cluster_config { + tags = ["foo", "bar"] + service_account_scopes = [ + "https://www.googleapis.com/auth/monitoring", + "useraccounts-ro", + "storage-rw", + "logging-write", + ] + } + # You can define multiple initialization_action blocks + initialization_action { + script = "gs://dataproc-initialization-actions/stackdriver/stackdriver.sh" + timeout_sec = 500 } + } } ``` @@ -100,21 +93,21 @@ resource "google_dataproc_cluster" "mycluster" { ```hcl resource "google_dataproc_cluster" "accelerated_cluster" { - name = "my-cluster-with-gpu" - region = "us-central1" + name = "my-cluster-with-gpu" + region = "us-central1" - cluster_config { - gce_cluster_config { - zone = "us-central1-a" - } - - master_config { - accelerators { - accelerator_type = "nvidia-tesla-k80" - accelerator_count = "1" - } - } + cluster_config { + gce_cluster_config { + zone = "us-central1-a" + } + + master_config { + accelerators { + accelerator_type = "nvidia-tesla-k80" + accelerator_count = "1" + } } + } } ``` @@ -189,18 +182,17 @@ The `cluster_config` block supports: The `cluster_config.gce_cluster_config` block supports: ```hcl - cluster_config { - gce_cluster_config { - - zone = "us-central1-a" + cluster_config { + gce_cluster_config { + zone = "us-central1-a" - # One of the below to hook into a custom network / subnetwork - network = "${google_compute_network.dataproc_network.name}" - subnetwork = "${google_compute_network.dataproc_subnetwork.name}" + # One of the below to hook into a custom network / subnetwork + network = google_compute_network.dataproc_network.name + subnetwork = google_compute_network.dataproc_subnetwork.name - tags = ["foo", "bar"] - } + tags = ["foo", "bar"] } + } ``` * `zone` - (Optional, Computed) The GCP zone where your data is stored and used (i.e. where @@ -248,18 +240,19 @@ The `cluster_config.gce_cluster_config` block supports: The `cluster_config.master_config` block supports: ```hcl - cluster_config { - master_config { - num_instances = 1 - machine_type = "n1-standard-1" - min_cpu_platform = "Intel Skylake" - disk_config { - boot_disk_type = "pd-ssd" - boot_disk_size_gb = 15 - num_local_ssds = 1 - } - } +cluster_config { + master_config { + num_instances = 1 + machine_type = "n1-standard-1" + min_cpu_platform = "Intel Skylake" + + disk_config { + boot_disk_type = "pd-ssd" + boot_disk_size_gb = 15 + num_local_ssds = 1 } + } +} ``` * `num_instances`- (Optional, Computed) Specifies the number of master nodes to create. @@ -306,18 +299,19 @@ if you are trying to use accelerators in a given zone. The `cluster_config.worker_config` block supports: ```hcl - cluster_config { - worker_config { - num_instances = 3 - machine_type = "n1-standard-1" - min_cpu_platform = "Intel Skylake" - disk_config { - boot_disk_type = "pd-standard" - boot_disk_size_gb = 15 - num_local_ssds = 1 - } - } +cluster_config { + worker_config { + num_instances = 3 + machine_type = "n1-standard-1" + min_cpu_platform = "Intel Skylake" + + disk_config { + boot_disk_type = "pd-standard" + boot_disk_size_gb = 15 + num_local_ssds = 1 } + } +} ``` * `num_instances`- (Optional, Computed) Specifies the number of worker nodes to create. @@ -368,16 +362,17 @@ if you are trying to use accelerators in a given zone. The `cluster_config.preemptible_worker_config` block supports: ```hcl - cluster_config { - preemptible_worker_config { - num_instances = 1 - disk_config { - boot_disk_type = "pd-standard" - boot_disk_size_gb = 15 - num_local_ssds = 1 - } - } +cluster_config { + preemptible_worker_config { + num_instances = 1 + + disk_config { + boot_disk_type = "pd-standard" + boot_disk_size_gb = 15 + num_local_ssds = 1 } + } +} ``` Note: Unlike `worker_config`, you cannot set the `machine_type` value directly. This @@ -404,15 +399,16 @@ will be set for you based on whatever was set for the `worker_config.machine_typ The `cluster_config.software_config` block supports: ```hcl - cluster_config { - # Override or set some custom properties - software_config { - image_version = "1.3.7-deb9" - override_properties = { - "dataproc:dataproc.allow.zero.workers" = "true" - } - } +cluster_config { + # Override or set some custom properties + software_config { + image_version = "1.3.7-deb9" + + override_properties = { + "dataproc:dataproc.allow.zero.workers" = "true" } + } +} ``` * `image_version` - (Optional, Computed) The Cloud Dataproc image version to use @@ -431,13 +427,13 @@ The `cluster_config.software_config` block supports: The `initialization_action` block (Optional) can be specified multiple times and supports: ```hcl - cluster_config { - # You can define multiple initialization_action blocks - initialization_action { - script = "gs://dataproc-initialization-actions/stackdriver/stackdriver.sh" - timeout_sec = 500 - } - } +cluster_config { + # You can define multiple initialization_action blocks + initialization_action { + script = "gs://dataproc-initialization-actions/stackdriver/stackdriver.sh" + timeout_sec = 500 + } +} ``` * `script`- (Required) The script to be executed during initialization of the cluster. @@ -452,11 +448,10 @@ The `initialization_action` block (Optional) can be specified multiple times and The `encryption_config` block supports: ```hcl - cluster_config { - encryption_config { - kms_key_name = "projects/projectId/locations/region/keyRings/keyRingName/cryptoKeys/keyName" - } - } +cluster_config { + encryption_config { + kms_key_name = "projects/projectId/locations/region/keyRings/keyRingName/cryptoKeys/keyName" + } } ``` diff --git a/third_party/terraform/website/docs/r/dataproc_cluster_iam.html.markdown b/third_party/terraform/website/docs/r/dataproc_cluster_iam.html.markdown index 0668b4b1a6bb..8e9dbbe84cc2 100644 --- a/third_party/terraform/website/docs/r/dataproc_cluster_iam.html.markdown +++ b/third_party/terraform/website/docs/r/dataproc_cluster_iam.html.markdown @@ -24,7 +24,7 @@ Three different resources help you manage IAM policies on dataproc clusters. Eac ```hcl data "google_iam_policy" "admin" { binding { - role = "roles/editor" + role = "roles/editor" members = [ "user:jane@example.com", ] @@ -32,10 +32,10 @@ data "google_iam_policy" "admin" { } resource "google_dataproc_cluster_iam_policy" "editor" { - project = "your-project" - region = "your-region" - cluster = "your-dataproc-cluster" - policy_data = "${data.google_iam_policy.admin.policy_data}" + project = "your-project" + region = "your-region" + cluster = "your-dataproc-cluster" + policy_data = data.google_iam_policy.admin.policy_data } ``` @@ -43,9 +43,9 @@ resource "google_dataproc_cluster_iam_policy" "editor" { ```hcl resource "google_dataproc_cluster_iam_binding" "editor" { - cluster = "your-dataproc-cluster" - role = "roles/editor" - members = [ + cluster = "your-dataproc-cluster" + role = "roles/editor" + members = [ "user:jane@example.com", ] } @@ -55,9 +55,9 @@ resource "google_dataproc_cluster_iam_binding" "editor" { ```hcl resource "google_dataproc_cluster_iam_member" "editor" { - cluster = "your-dataproc-cluster" - role = "roles/editor" - member = "user:jane@example.com" + cluster = "your-dataproc-cluster" + role = "roles/editor" + member = "user:jane@example.com" } ``` diff --git a/third_party/terraform/website/docs/r/dataproc_job.html.markdown b/third_party/terraform/website/docs/r/dataproc_job.html.markdown index 0fa795e14784..abfcc73da2c4 100644 --- a/third_party/terraform/website/docs/r/dataproc_job.html.markdown +++ b/third_party/terraform/website/docs/r/dataproc_job.html.markdown @@ -18,58 +18,58 @@ Manages a job resource within a Dataproc cluster within GCE. For more informatio ```hcl resource "google_dataproc_cluster" "mycluster" { - name = "dproc-cluster-unique-name" - region = "us-central1" + name = "dproc-cluster-unique-name" + region = "us-central1" } # Submit an example spark job to a dataproc cluster resource "google_dataproc_job" "spark" { - region = "${google_dataproc_cluster.mycluster.region}" - force_delete = true - placement { - cluster_name = "${google_dataproc_cluster.mycluster.name}" + region = google_dataproc_cluster.mycluster.region + force_delete = true + placement { + cluster_name = google_dataproc_cluster.mycluster.name + } + + spark_config { + main_class = "org.apache.spark.examples.SparkPi" + jar_file_uris = ["file:///usr/lib/spark/examples/jars/spark-examples.jar"] + args = ["1000"] + + properties = { + "spark.logConf" = "true" } - spark_config { - main_class = "org.apache.spark.examples.SparkPi" - jar_file_uris = ["file:///usr/lib/spark/examples/jars/spark-examples.jar"] - args = ["1000"] - - properties = { - "spark.logConf" = "true" - } - - logging_config { - driver_log_levels = { - "root" = "INFO" - } - } + logging_config { + driver_log_levels = { + "root" = "INFO" + } } + } } # Submit an example pyspark job to a dataproc cluster resource "google_dataproc_job" "pyspark" { - region = "${google_dataproc_cluster.mycluster.region}" - force_delete = true - placement { - cluster_name = "${google_dataproc_cluster.mycluster.name}" - } - - pyspark_config { - main_python_file_uri = "gs://dataproc-examples-2f10d78d114f6aaec76462e3c310f31f/src/pyspark/hello-world/hello-world.py" - properties = { - "spark.logConf" = "true" - } + region = google_dataproc_cluster.mycluster.region + force_delete = true + placement { + cluster_name = google_dataproc_cluster.mycluster.name + } + + pyspark_config { + main_python_file_uri = "gs://dataproc-examples-2f10d78d114f6aaec76462e3c310f31f/src/pyspark/hello-world/hello-world.py" + properties = { + "spark.logConf" = "true" } + } } # Check out current state of the jobs output "spark_status" { - value = "${google_dataproc_job.spark.status.0.state}" + value = google_dataproc_job.spark.status[0].state } output "pyspark_status" { - value = "${google_dataproc_job.pyspark.status.0.state}" + value = google_dataproc_job.pyspark.status[0].state } ``` @@ -112,17 +112,15 @@ The `pyspark_config` block supports: Submitting a pyspark job to the cluster. Below is an example configuration: ```hcl - # Submit a pyspark job to the cluster resource "google_dataproc_job" "pyspark" { - ... - - pyspark_config { - main_python_file_uri = "gs://dataproc-examples-2f10d78d114f6aaec76462e3c310f31f/src/pyspark/hello-world/hello-world.py" - properties = { - "spark.logConf" = "true" - } + ... + pyspark_config { + main_python_file_uri = "gs://dataproc-examples-2f10d78d114f6aaec76462e3c310f31f/src/pyspark/hello-world/hello-world.py" + properties = { + "spark.logConf" = "true" } + } } ``` @@ -152,26 +150,24 @@ are generally applicable: The `spark_config` block supports: ```hcl - # Submit a spark job to the cluster resource "google_dataproc_job" "spark" { - ... - - spark_config { - main_class = "org.apache.spark.examples.SparkPi" - jar_file_uris = ["file:///usr/lib/spark/examples/jars/spark-examples.jar"] - args = ["1000"] - - properties = { - "spark.logConf" = "true" - } - - logging_config { - driver_log_levels = { - "root" = "INFO" - } - } + ... + spark_config { + main_class = "org.apache.spark.examples.SparkPi" + jar_file_uris = ["file:///usr/lib/spark/examples/jars/spark-examples.jar"] + args = ["1000"] + + properties = { + "spark.logConf" = "true" + } + + logging_config { + driver_log_levels = { + "root" = "INFO" + } } + } } ``` @@ -197,19 +193,17 @@ resource "google_dataproc_job" "spark" { The `hadoop_config` block supports: ```hcl - # Submit a hadoop job to the cluster resource "google_dataproc_job" "hadoop" { - ... - - hadoop_config { - main_jar_file_uri = "file:///usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar" - args = [ - "wordcount", - "file:///usr/lib/spark/NOTICE", - "gs://${google_dataproc_cluster.basic.cluster_config.0.bucket}/hadoopjob_output" - ] - } + ... + hadoop_config { + main_jar_file_uri = "file:///usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar" + args = [ + "wordcount", + "file:///usr/lib/spark/NOTICE", + "gs://${google_dataproc_cluster.basic.cluster_config[0].bucket}/hadoopjob_output", + ] + } } ``` @@ -232,18 +226,16 @@ resource "google_dataproc_job" "hadoop" { The `hive_config` block supports: ```hcl - # Submit a hive job to the cluster resource "google_dataproc_job" "hive" { - ... - - hive_config { - query_list = [ - "DROP TABLE IF EXISTS dprocjob_test", - "CREATE EXTERNAL TABLE dprocjob_test(bar int) LOCATION 'gs://${google_dataproc_cluster.basic.cluster_config.0.bucket}/hive_dprocjob_test/'", - "SELECT * FROM dprocjob_test WHERE bar > 2", - ] - } + ... + hive_config { + query_list = [ + "DROP TABLE IF EXISTS dprocjob_test", + "CREATE EXTERNAL TABLE dprocjob_test(bar int) LOCATION 'gs://${google_dataproc_cluster.basic.cluster_config[0].bucket}/hive_dprocjob_test/'", + "SELECT * FROM dprocjob_test WHERE bar > 2", + ] + } } ``` @@ -264,20 +256,18 @@ resource "google_dataproc_job" "hive" { The `pig_config` block supports: ```hcl - # Submit a pig job to the cluster resource "google_dataproc_job" "pig" { - ... - - pig_config { - query_list = [ - "LNS = LOAD 'file:///usr/lib/pig/LICENSE.txt ' AS (line)", - "WORDS = FOREACH LNS GENERATE FLATTEN(TOKENIZE(line)) AS word", - "GROUPS = GROUP WORDS BY word", - "WORD_COUNTS = FOREACH GROUPS GENERATE group, COUNT(WORDS)", - "DUMP WORD_COUNTS" - ] - } + ... + pig_config { + query_list = [ + "LNS = LOAD 'file:///usr/lib/pig/LICENSE.txt ' AS (line)", + "WORDS = FOREACH LNS GENERATE FLATTEN(TOKENIZE(line)) AS word", + "GROUPS = GROUP WORDS BY word", + "WORD_COUNTS = FOREACH GROUPS GENERATE group, COUNT(WORDS)", + "DUMP WORD_COUNTS", + ] + } } ``` @@ -301,18 +291,16 @@ resource "google_dataproc_job" "pig" { The `sparksql_config` block supports: ```hcl - # Submit a spark SQL job to the cluster resource "google_dataproc_job" "sparksql" { - ... - - sparksql_config { - query_list = [ - "DROP TABLE IF EXISTS dprocjob_test", - "CREATE TABLE dprocjob_test(bar int)", - "SELECT * FROM dprocjob_test WHERE bar > 2", - ] - } + ... + sparksql_config { + query_list = [ + "DROP TABLE IF EXISTS dprocjob_test", + "CREATE TABLE dprocjob_test(bar int)", + "SELECT * FROM dprocjob_test WHERE bar > 2", + ] + } } ``` diff --git a/third_party/terraform/website/docs/r/dataproc_job_iam.html.markdown b/third_party/terraform/website/docs/r/dataproc_job_iam.html.markdown index 694d3126d7f6..0cdea119c9d0 100644 --- a/third_party/terraform/website/docs/r/dataproc_job_iam.html.markdown +++ b/third_party/terraform/website/docs/r/dataproc_job_iam.html.markdown @@ -24,7 +24,7 @@ Three different resources help you manage IAM policies on dataproc jobs. Each of ```hcl data "google_iam_policy" "admin" { binding { - role = "roles/editor" + role = "roles/editor" members = [ "user:jane@example.com", ] @@ -32,10 +32,10 @@ data "google_iam_policy" "admin" { } resource "google_dataproc_job_iam_policy" "editor" { - project = "your-project" - region = "your-region" - job_id = "your-dataproc-job" - policy_data = "${data.google_iam_policy.admin.policy_data}" + project = "your-project" + region = "your-region" + job_id = "your-dataproc-job" + policy_data = data.google_iam_policy.admin.policy_data } ``` @@ -43,9 +43,9 @@ resource "google_dataproc_job_iam_policy" "editor" { ```hcl resource "google_dataproc_job_iam_binding" "editor" { - job_id = "your-dataproc-job" - role = "roles/editor" - members = [ + job_id = "your-dataproc-job" + role = "roles/editor" + members = [ "user:jane@example.com", ] } @@ -55,9 +55,9 @@ resource "google_dataproc_job_iam_binding" "editor" { ```hcl resource "google_dataproc_job_iam_member" "editor" { - job_id = "your-dataproc-job" - role = "roles/editor" - member = "user:jane@example.com" + job_id = "your-dataproc-job" + role = "roles/editor" + member = "user:jane@example.com" } ``` diff --git a/third_party/terraform/website/docs/r/dns_record_set.markdown b/third_party/terraform/website/docs/r/dns_record_set.html.markdown similarity index 80% rename from third_party/terraform/website/docs/r/dns_record_set.markdown rename to third_party/terraform/website/docs/r/dns_record_set.html.markdown index 1c48f640a0ab..9bf54bf116e9 100644 --- a/third_party/terraform/website/docs/r/dns_record_set.markdown +++ b/third_party/terraform/website/docs/r/dns_record_set.html.markdown @@ -24,9 +24,9 @@ resource "google_dns_record_set" "frontend" { type = "A" ttl = 300 - managed_zone = "${google_dns_managed_zone.prod.name}" + managed_zone = google_dns_managed_zone.prod.name - rrdatas = ["${google_compute_instance.frontend.network_interface.0.access_config.0.nat_ip}"] + rrdatas = [google_compute_instance.frontend.network_interface[0].access_config[0].nat_ip] } resource "google_compute_instance" "frontend" { @@ -41,8 +41,9 @@ resource "google_compute_instance" "frontend" { } network_interface { - network = "default" - access_config = {} + network = "default" + access_config { + } } } @@ -56,10 +57,10 @@ resource "google_dns_managed_zone" "prod" { ```hcl resource "google_dns_record_set" "a" { - name = "backend.${google_dns_managed_zone.prod.dns_name}" - managed_zone = "${google_dns_managed_zone.prod.name}" - type = "A" - ttl = 300 + name = "backend.${google_dns_managed_zone.prod.dns_name}" + managed_zone = google_dns_managed_zone.prod.name + type = "A" + ttl = 300 rrdatas = ["8.8.8.8"] } @@ -74,17 +75,17 @@ resource "google_dns_managed_zone" "prod" { ```hcl resource "google_dns_record_set" "mx" { - name = "${google_dns_managed_zone.prod.dns_name}" - managed_zone = "${google_dns_managed_zone.prod.name}" - type = "MX" - ttl = 3600 + name = google_dns_managed_zone.prod.dns_name + managed_zone = google_dns_managed_zone.prod.name + type = "MX" + ttl = 3600 rrdatas = [ "1 aspmx.l.google.com.", "5 alt1.aspmx.l.google.com.", "5 alt2.aspmx.l.google.com.", "10 alt3.aspmx.l.google.com.", - "10 alt4.aspmx.l.google.com." + "10 alt4.aspmx.l.google.com.", ] } @@ -100,10 +101,10 @@ Quotes (`""`) must be added around your `rrdatas` for a SPF record. Otherwise `r ```hcl resource "google_dns_record_set" "spf" { - name = "frontend.${google_dns_managed_zone.prod.dns_name}" - managed_zone = "${google_dns_managed_zone.prod.name}" - type = "TXT" - ttl = 300 + name = "frontend.${google_dns_managed_zone.prod.dns_name}" + managed_zone = google_dns_managed_zone.prod.name + type = "TXT" + ttl = 300 rrdatas = ["\"v=spf1 ip4:111.111.111.111 include:backoff.email-example.com -all\""] } @@ -120,16 +121,16 @@ resource "google_dns_managed_zone" "prod" { ```hcl resource "google_dns_record_set" "cname" { - name = "frontend.${google_dns_managed_zone.prod.dns_name}" - managed_zone = "${google_dns_managed_zone.prod.name}" - type = "CNAME" - ttl = 300 - rrdatas = ["frontend.mydomain.com."] + name = "frontend.${google_dns_managed_zone.prod.dns_name}" + managed_zone = google_dns_managed_zone.prod.name + type = "CNAME" + ttl = 300 + rrdatas = ["frontend.mydomain.com."] } resource "google_dns_managed_zone" "prod" { - name = "prod-zone" - dns_name = "prod.mydomain.com." + name = "prod-zone" + dns_name = "prod.mydomain.com." } ``` diff --git a/third_party/terraform/website/docs/r/endpoints_service.html.markdown b/third_party/terraform/website/docs/r/endpoints_service.html.markdown index c4ee63714ce2..232068c8e5cc 100644 --- a/third_party/terraform/website/docs/r/endpoints_service.html.markdown +++ b/third_party/terraform/website/docs/r/endpoints_service.html.markdown @@ -17,14 +17,14 @@ This resource creates and rolls out a Cloud Endpoints service using OpenAPI or g resource "google_endpoints_service" "openapi_service" { service_name = "api-name.endpoints.project-id.cloud.goog" project = "project-id" - openapi_config = "${file("openapi_spec.yml")}" + openapi_config = file("openapi_spec.yml") } resource "google_endpoints_service" "grpc_service" { service_name = "api-name.endpoints.project-id.cloud.goog" project = "project-id" - grpc_config = "${file("service_spec.yml")}" - protoc_output_base64 = "${base64encode(file("compiled_descriptor_file.pb"))}" + grpc_config = file("service_spec.yml") + protoc_output_base64 = base64encode(file("compiled_descriptor_file.pb")) } ``` diff --git a/third_party/terraform/website/docs/r/google_billing_account_iam_binding.md b/third_party/terraform/website/docs/r/google_billing_account_iam_binding.html.markdown similarity index 100% rename from third_party/terraform/website/docs/r/google_billing_account_iam_binding.md rename to third_party/terraform/website/docs/r/google_billing_account_iam_binding.html.markdown diff --git a/third_party/terraform/website/docs/r/google_billing_account_iam_member.md b/third_party/terraform/website/docs/r/google_billing_account_iam_member.html.markdown similarity index 100% rename from third_party/terraform/website/docs/r/google_billing_account_iam_member.md rename to third_party/terraform/website/docs/r/google_billing_account_iam_member.html.markdown diff --git a/third_party/terraform/website/docs/r/google_billing_account_iam_policy.md b/third_party/terraform/website/docs/r/google_billing_account_iam_policy.html.markdown similarity index 93% rename from third_party/terraform/website/docs/r/google_billing_account_iam_policy.md rename to third_party/terraform/website/docs/r/google_billing_account_iam_policy.html.markdown index 5f571bab400d..e704e910bf73 100644 --- a/third_party/terraform/website/docs/r/google_billing_account_iam_policy.md +++ b/third_party/terraform/website/docs/r/google_billing_account_iam_policy.html.markdown @@ -25,8 +25,8 @@ by use of this resource. The safest alternative is to use multiple `google_billi ```hcl resource "google_billing_account_iam_policy" "policy" { - billing_account_id = "00AA00-000AAA-00AA0A" - policy_data = "${data.google_iam_policy.admin.policy_data}" + billing_account_id = "00AA00-000AAA-00AA0A" + policy_data = data.google_iam_policy.admin.policy_data } data "google_iam_policy" "admin" { diff --git a/third_party/terraform/website/docs/r/google_folder.html.markdown b/third_party/terraform/website/docs/r/google_folder.html.markdown index fb476f3b3a49..6f90117df581 100644 --- a/third_party/terraform/website/docs/r/google_folder.html.markdown +++ b/third_party/terraform/website/docs/r/google_folder.html.markdown @@ -29,13 +29,13 @@ doc for more information. # Top-level folder under an organization. resource "google_folder" "department1" { display_name = "Department 1" - parent = "organizations/1234567" + parent = "organizations/1234567" } # Folder nested under another folder. resource "google_folder" "team-abc" { display_name = "Team ABC" - parent = "${google_folder.department1.name}" + parent = google_folder.department1.name } ``` diff --git a/third_party/terraform/website/docs/r/google_folder_iam_binding.html.markdown b/third_party/terraform/website/docs/r/google_folder_iam_binding.html.markdown index a5201dde4573..8b8a453fffa4 100644 --- a/third_party/terraform/website/docs/r/google_folder_iam_binding.html.markdown +++ b/third_party/terraform/website/docs/r/google_folder_iam_binding.html.markdown @@ -29,8 +29,8 @@ resource "google_folder" "department1" { } resource "google_folder_iam_binding" "admin" { - folder = "${google_folder.department1.name}" - role = "roles/editor" + folder = google_folder.department1.name + role = "roles/editor" members = [ "user:alice@gmail.com", diff --git a/third_party/terraform/website/docs/r/google_folder_iam_member.html.markdown b/third_party/terraform/website/docs/r/google_folder_iam_member.html.markdown index e8e4b9634951..bf01ecaf8a9e 100644 --- a/third_party/terraform/website/docs/r/google_folder_iam_member.html.markdown +++ b/third_party/terraform/website/docs/r/google_folder_iam_member.html.markdown @@ -26,9 +26,9 @@ resource "google_folder" "department1" { } resource "google_folder_iam_member" "admin" { - folder = "${google_folder.department1.name}" - role = "roles/editor" - member = "user:alice@gmail.com" + folder = google_folder.department1.name + role = "roles/editor" + member = "user:alice@gmail.com" } ``` diff --git a/third_party/terraform/website/docs/r/google_folder_iam_policy.html.markdown b/third_party/terraform/website/docs/r/google_folder_iam_policy.html.markdown index f709a2aa80d7..59bfd0313003 100644 --- a/third_party/terraform/website/docs/r/google_folder_iam_policy.html.markdown +++ b/third_party/terraform/website/docs/r/google_folder_iam_policy.html.markdown @@ -16,13 +16,13 @@ Platform folder. ```hcl resource "google_folder_iam_policy" "folder_admin_policy" { - folder = "${google_folder.department1.name}" - policy_data = "${data.google_iam_policy.admin.policy_data}" + folder = google_folder.department1.name + policy_data = data.google_iam_policy.admin.policy_data } resource "google_folder" "department1" { display_name = "Department 1" - parent = "organizations/1234567" + parent = "organizations/1234567" } data "google_iam_policy" "admin" { diff --git a/third_party/terraform/website/docs/r/google_folder_organization_policy.html.markdown b/third_party/terraform/website/docs/r/google_folder_organization_policy.html.markdown index d6687932a4a3..59d461c38ca6 100644 --- a/third_party/terraform/website/docs/r/google_folder_organization_policy.html.markdown +++ b/third_party/terraform/website/docs/r/google_folder_organization_policy.html.markdown @@ -54,7 +54,7 @@ resource "google_folder_organization_policy" "services_policy" { constraint = "serviceuser.services" list_policy { - suggested_values = "compute.googleapis.com" + suggested_value = "compute.googleapis.com" deny { values = ["cloudresourcemanager.googleapis.com"] @@ -108,7 +108,7 @@ The `list_policy` block supports: * `allow` or `deny` - (Optional) One or the other must be set. -* `suggested_values` - (Optional) The Google Cloud Console will try to default to a configuration that matches the value specified in this field. +* `suggested_value` - (Optional) The Google Cloud Console will try to default to a configuration that matches the value specified in this field. * `inherit_from_parent` - (Optional) If set to true, the values from the effective Policy of the parent resource are inherited, meaning the values set in this Policy are added to the values inherited up the hierarchy. diff --git a/third_party/terraform/website/docs/r/google_iap_tunnel_instance_iam.markdown b/third_party/terraform/website/docs/r/google_iap_tunnel_instance_iam.html.markdown similarity index 100% rename from third_party/terraform/website/docs/r/google_iap_tunnel_instance_iam.markdown rename to third_party/terraform/website/docs/r/google_iap_tunnel_instance_iam.html.markdown diff --git a/third_party/terraform/website/docs/r/google_kms_key_ring_iam.html.markdown b/third_party/terraform/website/docs/r/google_kms_key_ring_iam.html.markdown index 4e16455d9bef..b06a0bb48c91 100644 --- a/third_party/terraform/website/docs/r/google_kms_key_ring_iam.html.markdown +++ b/third_party/terraform/website/docs/r/google_kms_key_ring_iam.html.markdown @@ -33,8 +33,8 @@ data "google_iam_policy" "admin" { } resource "google_kms_key_ring_iam_policy" "key_ring" { - key_ring_id = "your-key-ring-id" - policy_data = "${data.google_iam_policy.admin.policy_data}" + key_ring_id = "your-key-ring-id" + policy_data = data.google_iam_policy.admin.policy_data } ``` diff --git a/third_party/terraform/website/docs/r/google_organization_iam_member.md b/third_party/terraform/website/docs/r/google_organization_iam_member.html.markdown similarity index 96% rename from third_party/terraform/website/docs/r/google_organization_iam_member.md rename to third_party/terraform/website/docs/r/google_organization_iam_member.html.markdown index ca03fe63628a..df547c2937c8 100644 --- a/third_party/terraform/website/docs/r/google_organization_iam_member.md +++ b/third_party/terraform/website/docs/r/google_organization_iam_member.html.markdown @@ -21,8 +21,8 @@ the IAM policy for an existing Google Cloud Platform Organization. ```hcl resource "google_organization_iam_member" "binding" { org_id = "0123456789" - role = "roles/editor" - member = "user:alice@gmail.com" + role = "roles/editor" + member = "user:alice@gmail.com" } ``` diff --git a/third_party/terraform/website/docs/r/google_organization_iam_policy.md b/third_party/terraform/website/docs/r/google_organization_iam_policy.html.markdown similarity index 95% rename from third_party/terraform/website/docs/r/google_organization_iam_policy.md rename to third_party/terraform/website/docs/r/google_organization_iam_policy.html.markdown index 84962b74c2a6..a65b033054a0 100644 --- a/third_party/terraform/website/docs/r/google_organization_iam_policy.md +++ b/third_party/terraform/website/docs/r/google_organization_iam_policy.html.markdown @@ -28,8 +28,8 @@ Allows management of the entire IAM policy for an existing Google Cloud Platform ```hcl resource "google_organization_iam_policy" "policy" { - org_id = "123456789" - policy_data = "${data.google_iam_policy.admin.policy_data}" + org_id = "123456789" + policy_data = data.google_iam_policy.admin.policy_data } data "google_iam_policy" "admin" { diff --git a/third_party/terraform/website/docs/r/google_organization_policy.html.markdown b/third_party/terraform/website/docs/r/google_organization_policy.html.markdown index cafeb8dd6d71..5fa865badce8 100644 --- a/third_party/terraform/website/docs/r/google_organization_policy.html.markdown +++ b/third_party/terraform/website/docs/r/google_organization_policy.html.markdown @@ -53,7 +53,7 @@ resource "google_organization_policy" "services_policy" { constraint = "serviceuser.services" list_policy { - suggested_values = "compute.googleapis.com" + suggested_value = "compute.googleapis.com" deny { values = ["cloudresourcemanager.googleapis.com"] @@ -66,7 +66,7 @@ To restore the default organization policy, use the following instead: ```hcl resource "google_organization_policy" "services_policy" { - org_id = "123456789" + org_id = "123456789" constraint = "serviceuser.services" restore_policy { @@ -106,7 +106,7 @@ The `list_policy` block supports: * `allow` or `deny` - (Optional) One or the other must be set. -* `suggested_values` - (Optional) The Google Cloud Console will try to default to a configuration that matches the value specified in this field. +* `suggested_value` - (Optional) The Google Cloud Console will try to default to a configuration that matches the value specified in this field. * `inherit_from_parent` - (Optional) If set to true, the values from the effective Policy of the parent resource are inherited, meaning the values set in this Policy are added to the values inherited up the hierarchy. diff --git a/third_party/terraform/website/docs/r/google_project.html.markdown b/third_party/terraform/website/docs/r/google_project.html.markdown index 33b93e0827b7..2fc93707cd54 100755 --- a/third_party/terraform/website/docs/r/google_project.html.markdown +++ b/third_party/terraform/website/docs/r/google_project.html.markdown @@ -41,7 +41,7 @@ Terraform. Only newly added projects are affected. ```hcl resource "google_project" "my_project" { - name = "My Project" + name = "My Project" project_id = "your-project-id" org_id = "1234567" } @@ -51,14 +51,14 @@ To create a project under a specific folder ```hcl resource "google_project" "my_project-in-a-folder" { - name = "My Project" + name = "My Project" project_id = "your-project-id" - folder_id = "${google_folder.department1.name}" + folder_id = google_folder.department1.name } resource "google_folder" "department1" { display_name = "Department 1" - parent = "organizations/1234567" + parent = "organizations/1234567" } ``` diff --git a/third_party/terraform/website/docs/r/google_project_iam.html.markdown b/third_party/terraform/website/docs/r/google_project_iam.html.markdown index 94c95c523f77..6821d1b28a0b 100644 --- a/third_party/terraform/website/docs/r/google_project_iam.html.markdown +++ b/third_party/terraform/website/docs/r/google_project_iam.html.markdown @@ -33,7 +33,7 @@ Four different resources help you manage your IAM policy for a project. Each of ```hcl resource "google_project_iam_policy" "project" { project = "your-project-id" - policy_data = "${data.google_iam_policy.admin.policy_data}" + policy_data = data.google_iam_policy.admin.policy_data } data "google_iam_policy" "admin" { diff --git a/third_party/terraform/website/docs/r/google_project_organization_policy.html.markdown b/third_party/terraform/website/docs/r/google_project_organization_policy.html.markdown index 503fdb382d42..d211f132dc7e 100644 --- a/third_party/terraform/website/docs/r/google_project_organization_policy.html.markdown +++ b/third_party/terraform/website/docs/r/google_project_organization_policy.html.markdown @@ -54,7 +54,7 @@ resource "google_project_organization_policy" "services_policy" { constraint = "serviceuser.services" list_policy { - suggested_values = "compute.googleapis.com" + suggested_value = "compute.googleapis.com" deny { values = ["cloudresourcemanager.googleapis.com"] @@ -107,7 +107,7 @@ The `list_policy` block supports: * `allow` or `deny` - (Optional) One or the other must be set. -* `suggested_values` - (Optional) The Google Cloud Console will try to default to a configuration that matches the value specified in this field. +* `suggested_value` - (Optional) The Google Cloud Console will try to default to a configuration that matches the value specified in this field. * `inherit_from_parent` - (Optional) If set to true, the values from the effective Policy of the parent resource are inherited, meaning the values set in this Policy are added to the values inherited up the hierarchy. diff --git a/third_party/terraform/website/docs/r/google_service_account_iam.html.markdown b/third_party/terraform/website/docs/r/google_service_account_iam.html.markdown index 30e44b495918..176c88d4434a 100644 --- a/third_party/terraform/website/docs/r/google_service_account_iam.html.markdown +++ b/third_party/terraform/website/docs/r/google_service_account_iam.html.markdown @@ -40,22 +40,21 @@ resource "google_service_account" "sa" { } resource "google_service_account_iam_policy" "admin-account-iam" { - service_account_id = "${google_service_account.sa.name}" - policy_data = "${data.google_iam_policy.admin.policy_data}" + service_account_id = google_service_account.sa.name + policy_data = data.google_iam_policy.admin.policy_data } ``` ## google\_service\_account\_iam\_binding ```hcl - resource "google_service_account" "sa" { account_id = "my-service-account" display_name = "A service account that only Jane can use" } resource "google_service_account_iam_binding" "admin-account-iam" { - service_account_id = "${google_service_account.sa.name}" + service_account_id = google_service_account.sa.name role = "roles/iam.serviceAccountUser" members = [ @@ -91,7 +90,8 @@ resource "google_service_account_iam_binding" "admin-account-iam" { ## google\_service\_account\_iam\_member ```hcl -data "google_compute_default_service_account" "default" { } +data "google_compute_default_service_account" "default" { +} resource "google_service_account" "sa" { account_id = "my-service-account" @@ -99,14 +99,14 @@ resource "google_service_account" "sa" { } resource "google_service_account_iam_member" "admin-account-iam" { - service_account_id = "${google_service_account.sa.name}" + service_account_id = google_service_account.sa.name role = "roles/iam.serviceAccountUser" member = "user:jane@example.com" } # Allow SA service account use the default GCE account resource "google_service_account_iam_member" "gce-default-account-iam" { - service_account_id = "${data.google_compute_default_service_account.default.name}" + service_account_id = data.google_compute_default_service_account.default.name role = "roles/iam.serviceAccountUser" member = "serviceAccount:${google_service_account.sa.email}" } @@ -186,7 +186,7 @@ $ terraform import google_service_account_iam_policy.admin-account-iam projects/ $ terraform import google_service_account_iam_binding.admin-account-iam "projects/{your-project-id}/serviceAccounts/{your-service-account-email} iam.serviceAccountUser" -$ terraform import google_service_account_iam_member.admin-account-iam "projects/{your-project-id}/serviceAccounts/{your-service-account-email} iam.serviceAccountUser user:foo@example.com" +$ terraform import google_service_account_iam_member.admin-account-iam "projects/{your-project-id}/serviceAccounts/{your-service-account-email} roles/editor user:foo@example.com" ``` With conditions: diff --git a/third_party/terraform/website/docs/r/google_service_account_key.html.markdown b/third_party/terraform/website/docs/r/google_service_account_key.html.markdown index 87f80b2e9cc1..b8fbadd8f754 100644 --- a/third_party/terraform/website/docs/r/google_service_account_key.html.markdown +++ b/third_party/terraform/website/docs/r/google_service_account_key.html.markdown @@ -16,13 +16,13 @@ Creates and manages service account key-pairs, which allow the user to establish ```hcl resource "google_service_account" "myaccount" { - account_id = "myaccount" + account_id = "myaccount" display_name = "My Service Account" } resource "google_service_account_key" "mykey" { - service_account_id = "${google_service_account.myaccount.name}" - public_key_type = "TYPE_X509_PEM_FILE" + service_account_id = google_service_account.myaccount.name + public_key_type = "TYPE_X509_PEM_FILE" } ``` @@ -35,7 +35,7 @@ resource "google_service_account" "myaccount" { } resource "google_service_account_key" "mykey" { - service_account_id = "${google_service_account.myaccount.name}" + service_account_id = google_service_account.myaccount.name } resource "kubernetes_secret" "google-application-credentials" { @@ -43,7 +43,7 @@ resource "kubernetes_secret" "google-application-credentials" { name = "google-application-credentials" } data = { - credentials.json = "${base64decode(google_service_account_key.mykey.private_key)}" + credentials.json = base64decode(google_service_account_key.mykey.private_key) } } ``` @@ -52,13 +52,13 @@ resource "kubernetes_secret" "google-application-credentials" { ```hcl resource "google_service_account" "myaccount" { - account_id = "myaccount" + account_id = "myaccount" display_name = "My Service Account" } resource "google_service_account_key" "mykey" { - service_account_id = "${google_service_account.myaccount.name}" - public_key_type = "TYPE_X509_PEM_FILE" + service_account_id = google_service_account.myaccount.name + public_key_type = "TYPE_X509_PEM_FILE" } ``` diff --git a/third_party/terraform/website/docs/r/healthcare_dataset_iam.html.markdown b/third_party/terraform/website/docs/r/healthcare_dataset_iam.html.markdown index bc510041490c..37b418c4f162 100644 --- a/third_party/terraform/website/docs/r/healthcare_dataset_iam.html.markdown +++ b/third_party/terraform/website/docs/r/healthcare_dataset_iam.html.markdown @@ -36,8 +36,8 @@ data "google_iam_policy" "admin" { } resource "google_healthcare_dataset_iam_policy" "dataset" { - dataset_id = "your-dataset-id" - policy_data = "${data.google_iam_policy.admin.policy_data}" + dataset_id = "your-dataset-id" + policy_data = data.google_iam_policy.admin.policy_data } ``` @@ -46,7 +46,7 @@ resource "google_healthcare_dataset_iam_policy" "dataset" { ```hcl resource "google_healthcare_dataset_iam_binding" "dataset" { dataset_id = "your-dataset-id" - role = "roles/editor" + role = "roles/editor" members = [ "user:jane@example.com", @@ -59,8 +59,8 @@ resource "google_healthcare_dataset_iam_binding" "dataset" { ```hcl resource "google_healthcare_dataset_iam_member" "dataset" { dataset_id = "your-dataset-id" - role = "roles/editor" - member = "user:jane@example.com" + role = "roles/editor" + member = "user:jane@example.com" } ``` diff --git a/third_party/terraform/website/docs/r/healthcare_dicom_store_iam.html.markdown b/third_party/terraform/website/docs/r/healthcare_dicom_store_iam.html.markdown index 56c5f7834ff6..e871816c6cb9 100644 --- a/third_party/terraform/website/docs/r/healthcare_dicom_store_iam.html.markdown +++ b/third_party/terraform/website/docs/r/healthcare_dicom_store_iam.html.markdown @@ -36,8 +36,8 @@ data "google_iam_policy" "admin" { } resource "google_healthcare_dicom_store_iam_policy" "dicom_store" { - dicom_store_id = "your-dicom-store-id" - policy_data = "${data.google_iam_policy.admin.policy_data}" + dicom_store_id = "your-dicom-store-id" + policy_data = data.google_iam_policy.admin.policy_data } ``` @@ -46,7 +46,7 @@ resource "google_healthcare_dicom_store_iam_policy" "dicom_store" { ```hcl resource "google_healthcare_dicom_store_iam_binding" "dicom_store" { dicom_store_id = "your-dicom-store-id" - role = "roles/editor" + role = "roles/editor" members = [ "user:jane@example.com", @@ -59,8 +59,8 @@ resource "google_healthcare_dicom_store_iam_binding" "dicom_store" { ```hcl resource "google_healthcare_dicom_store_iam_member" "dicom_store" { dicom_store_id = "your-dicom-store-id" - role = "roles/editor" - member = "user:jane@example.com" + role = "roles/editor" + member = "user:jane@example.com" } ``` diff --git a/third_party/terraform/website/docs/r/healthcare_fhir_store_iam.html.markdown b/third_party/terraform/website/docs/r/healthcare_fhir_store_iam.html.markdown index 0074adf9143d..58084b82ae0b 100644 --- a/third_party/terraform/website/docs/r/healthcare_fhir_store_iam.html.markdown +++ b/third_party/terraform/website/docs/r/healthcare_fhir_store_iam.html.markdown @@ -36,8 +36,8 @@ data "google_iam_policy" "admin" { } resource "google_healthcare_fhir_store_iam_policy" "fhir_store" { - fhir_store_id = "your-fhir-store-id" - policy_data = "${data.google_iam_policy.admin.policy_data}" + fhir_store_id = "your-fhir-store-id" + policy_data = data.google_iam_policy.admin.policy_data } ``` @@ -46,7 +46,7 @@ resource "google_healthcare_fhir_store_iam_policy" "fhir_store" { ```hcl resource "google_healthcare_fhir_store_iam_binding" "fhir_store" { fhir_store_id = "your-fhir-store-id" - role = "roles/editor" + role = "roles/editor" members = [ "user:jane@example.com", @@ -59,8 +59,8 @@ resource "google_healthcare_fhir_store_iam_binding" "fhir_store" { ```hcl resource "google_healthcare_fhir_store_iam_member" "fhir_store" { fhir_store_id = "your-fhir-store-id" - role = "roles/editor" - member = "user:jane@example.com" + role = "roles/editor" + member = "user:jane@example.com" } ``` diff --git a/third_party/terraform/website/docs/r/healthcare_hl7_v2_store_iam.html.markdown b/third_party/terraform/website/docs/r/healthcare_hl7_v2_store_iam.html.markdown index 1a608c06affd..db8392014910 100644 --- a/third_party/terraform/website/docs/r/healthcare_hl7_v2_store_iam.html.markdown +++ b/third_party/terraform/website/docs/r/healthcare_hl7_v2_store_iam.html.markdown @@ -36,8 +36,8 @@ data "google_iam_policy" "admin" { } resource "google_healthcare_hl7_v2_store_iam_policy" "hl7_v2_store" { - hl7_v2_store_id = "your-hl7-v2-store-id" - policy_data = "${data.google_iam_policy.admin.policy_data}" + hl7_v2_store_id = "your-hl7-v2-store-id" + policy_data = data.google_iam_policy.admin.policy_data } ``` @@ -46,12 +46,13 @@ resource "google_healthcare_hl7_v2_store_iam_policy" "hl7_v2_store" { ```hcl resource "google_healthcare_hl7_v2_store_iam_binding" "hl7_v2_store" { hl7_v2_store_id = "your-hl7-v2-store-id" - role = "roles/editor" + role = "roles/editor" members = [ "user:jane@example.com", ] } + ``` ## google\_healthcare\_hl7\_v2\_store\_iam\_member @@ -59,8 +60,8 @@ resource "google_healthcare_hl7_v2_store_iam_binding" "hl7_v2_store" { ```hcl resource "google_healthcare_hl7_v2_store_iam_member" "hl7_v2_store" { hl7_v2_store_id = "your-hl7-v2-store-id" - role = "roles/editor" - member = "user:jane@example.com" + role = "roles/editor" + member = "user:jane@example.com" } ``` diff --git a/third_party/terraform/website/docs/r/logging_billing_account_exclusion.html.markdown b/third_party/terraform/website/docs/r/logging_billing_account_exclusion.html.markdown index 0bf107148196..b54161a8d10b 100644 --- a/third_party/terraform/website/docs/r/logging_billing_account_exclusion.html.markdown +++ b/third_party/terraform/website/docs/r/logging_billing_account_exclusion.html.markdown @@ -20,13 +20,13 @@ granted to the credentials used with Terraform. ```hcl resource "google_logging_billing_account_exclusion" "my-exclusion" { - name = "my-instance-debug-exclusion" - billing_account = "ABCDEF-012345-GHIJKL" + name = "my-instance-debug-exclusion" + billing_account = "ABCDEF-012345-GHIJKL" - description = "Exclude GCE instance debug logs" + description = "Exclude GCE instance debug logs" - # Exclude all DEBUG or lower severity messages relating to instances - filter = "resource.type = gce_instance AND severity <= DEBUG" + # Exclude all DEBUG or lower severity messages relating to instances + filter = "resource.type = gce_instance AND severity <= DEBUG" } ``` diff --git a/third_party/terraform/website/docs/r/logging_billing_account_sink.html.markdown b/third_party/terraform/website/docs/r/logging_billing_account_sink.html.markdown index b4b005c56d98..da8b54c2a452 100644 --- a/third_party/terraform/website/docs/r/logging_billing_account_sink.html.markdown +++ b/third_party/terraform/website/docs/r/logging_billing_account_sink.html.markdown @@ -22,23 +22,23 @@ typical IAM roles granted on a project. ```hcl resource "google_logging_billing_account_sink" "my-sink" { - name = "my-sink" - billing_account = "ABCDEF-012345-GHIJKL" + name = "my-sink" + billing_account = "ABCDEF-012345-GHIJKL" - # Can export to pubsub, cloud storage, or bigquery - destination = "storage.googleapis.com/${google_storage_bucket.log-bucket.name}" + # Can export to pubsub, cloud storage, or bigquery + destination = "storage.googleapis.com/${google_storage_bucket.log-bucket.name}" } resource "google_storage_bucket" "log-bucket" { - name = "billing-logging-bucket" + name = "billing-logging-bucket" } resource "google_project_iam_binding" "log-writer" { - role = "roles/storage.objectCreator" + role = "roles/storage.objectCreator" - members = [ - "${google_logging_billing_account_sink.my-sink.writer_identity}", - ] + members = [ + google_logging_billing_account_sink.my-sink.writer_identity, + ] } ``` diff --git a/third_party/terraform/website/docs/r/logging_folder_exclusion.html.markdown b/third_party/terraform/website/docs/r/logging_folder_exclusion.html.markdown index 107dc42c6c8c..615e53d85e7e 100644 --- a/third_party/terraform/website/docs/r/logging_folder_exclusion.html.markdown +++ b/third_party/terraform/website/docs/r/logging_folder_exclusion.html.markdown @@ -20,18 +20,18 @@ granted to the credentials used with Terraform. ```hcl resource "google_logging_folder_exclusion" "my-exclusion" { - name = "my-instance-debug-exclusion" - folder = "${google_folder.my-folder.name}" + name = "my-instance-debug-exclusion" + folder = google_folder.my-folder.name - description = "Exclude GCE instance debug logs" + description = "Exclude GCE instance debug logs" - # Exclude all DEBUG or lower severity messages relating to instances - filter = "resource.type = gce_instance AND severity <= DEBUG" + # Exclude all DEBUG or lower severity messages relating to instances + filter = "resource.type = gce_instance AND severity <= DEBUG" } resource "google_folder" "my-folder" { - display_name = "My folder" - parent = "organizations/123456" + display_name = "My folder" + parent = "organizations/123456" } ``` diff --git a/third_party/terraform/website/docs/r/logging_folder_sink.html.markdown b/third_party/terraform/website/docs/r/logging_folder_sink.html.markdown index ab0763768383..ec70627ab6f4 100644 --- a/third_party/terraform/website/docs/r/logging_folder_sink.html.markdown +++ b/third_party/terraform/website/docs/r/logging_folder_sink.html.markdown @@ -20,31 +20,31 @@ granted to the credentials used with terraform. ```hcl resource "google_logging_folder_sink" "my-sink" { - name = "my-sink" - folder = "${google_folder.my-folder.name}" + name = "my-sink" + folder = google_folder.my-folder.name - # Can export to pubsub, cloud storage, or bigquery - destination = "storage.googleapis.com/${google_storage_bucket.log-bucket.name}" + # Can export to pubsub, cloud storage, or bigquery + destination = "storage.googleapis.com/${google_storage_bucket.log-bucket.name}" - # Log all WARN or higher severity messages relating to instances - filter = "resource.type = gce_instance AND severity >= WARN" + # Log all WARN or higher severity messages relating to instances + filter = "resource.type = gce_instance AND severity >= WARN" } resource "google_storage_bucket" "log-bucket" { - name = "folder-logging-bucket" + name = "folder-logging-bucket" } resource "google_project_iam_binding" "log-writer" { - role = "roles/storage.objectCreator" + role = "roles/storage.objectCreator" - members = [ - "${google_logging_folder_sink.my-sink.writer_identity}", - ] + members = [ + google_logging_folder_sink.my-sink.writer_identity, + ] } resource "google_folder" "my-folder" { - display_name = "My folder" - parent = "organizations/123456" + display_name = "My folder" + parent = "organizations/123456" } ``` diff --git a/third_party/terraform/website/docs/r/logging_organization_exclusion.html.markdown b/third_party/terraform/website/docs/r/logging_organization_exclusion.html.markdown index e0bca87533e9..c580ba520dc0 100644 --- a/third_party/terraform/website/docs/r/logging_organization_exclusion.html.markdown +++ b/third_party/terraform/website/docs/r/logging_organization_exclusion.html.markdown @@ -20,13 +20,13 @@ granted to the credentials used with Terraform. ```hcl resource "google_logging_organization_exclusion" "my-exclusion" { - name = "my-instance-debug-exclusion" - org_id = "123456789" + name = "my-instance-debug-exclusion" + org_id = "123456789" - description = "Exclude GCE instance debug logs" + description = "Exclude GCE instance debug logs" - # Exclude all DEBUG or lower severity messages relating to instances - filter = "resource.type = gce_instance AND severity <= DEBUG" + # Exclude all DEBUG or lower severity messages relating to instances + filter = "resource.type = gce_instance AND severity <= DEBUG" } ``` diff --git a/third_party/terraform/website/docs/r/logging_organization_sink.html.markdown b/third_party/terraform/website/docs/r/logging_organization_sink.html.markdown index 74b9326ea0f7..c663da6e3500 100644 --- a/third_party/terraform/website/docs/r/logging_organization_sink.html.markdown +++ b/third_party/terraform/website/docs/r/logging_organization_sink.html.markdown @@ -20,24 +20,24 @@ granted to the credentials used with terraform. ```hcl resource "google_logging_organization_sink" "my-sink" { - name = "my-sink" - org_id = "123456789" + name = "my-sink" + org_id = "123456789" - # Can export to pubsub, cloud storage, or bigquery - destination = "storage.googleapis.com/${google_storage_bucket.log-bucket.name}" + # Can export to pubsub, cloud storage, or bigquery + destination = "storage.googleapis.com/${google_storage_bucket.log-bucket.name}" - # Log all WARN or higher severity messages relating to instances - filter = "resource.type = gce_instance AND severity >= WARN" + # Log all WARN or higher severity messages relating to instances + filter = "resource.type = gce_instance AND severity >= WARN" } resource "google_storage_bucket" "log-bucket" { - name = "organization-logging-bucket" + name = "organization-logging-bucket" } resource "google_project_iam_member" "log-writer" { - role = "roles/storage.objectCreator" + role = "roles/storage.objectCreator" - member = "${google_logging_organization_sink.my-sink.writer_identity}" + member = google_logging_organization_sink.my-sink.writer_identity } ``` diff --git a/third_party/terraform/website/docs/r/logging_project_exclusion.html.markdown b/third_party/terraform/website/docs/r/logging_project_exclusion.html.markdown index 74d4ea2ab94a..854d968db428 100644 --- a/third_party/terraform/website/docs/r/logging_project_exclusion.html.markdown +++ b/third_party/terraform/website/docs/r/logging_project_exclusion.html.markdown @@ -20,12 +20,12 @@ granted to the credentials used with Terraform. ```hcl resource "google_logging_project_exclusion" "my-exclusion" { - name = "my-instance-debug-exclusion" + name = "my-instance-debug-exclusion" - description = "Exclude GCE instance debug logs" + description = "Exclude GCE instance debug logs" - # Exclude all DEBUG or lower severity messages relating to instances - filter = "resource.type = gce_instance AND severity <= DEBUG" + # Exclude all DEBUG or lower severity messages relating to instances + filter = "resource.type = gce_instance AND severity <= DEBUG" } ``` diff --git a/third_party/terraform/website/docs/r/logging_project_sink.html.markdown b/third_party/terraform/website/docs/r/logging_project_sink.html.markdown index e0eacea8d50d..892c1dd24b6f 100644 --- a/third_party/terraform/website/docs/r/logging_project_sink.html.markdown +++ b/third_party/terraform/website/docs/r/logging_project_sink.html.markdown @@ -23,16 +23,16 @@ and ```hcl resource "google_logging_project_sink" "my-sink" { - name = "my-pubsub-instance-sink" + name = "my-pubsub-instance-sink" - # Can export to pubsub, cloud storage, or bigquery - destination = "pubsub.googleapis.com/projects/my-project/topics/instance-activity" + # Can export to pubsub, cloud storage, or bigquery + destination = "pubsub.googleapis.com/projects/my-project/topics/instance-activity" - # Log all WARN or higher severity messages relating to instances - filter = "resource.type = gce_instance AND severity >= WARN" + # Log all WARN or higher severity messages relating to instances + filter = "resource.type = gce_instance AND severity >= WARN" - # Use a unique writer (creates a unique service account used for writing) - unique_writer_identity = true + # Use a unique writer (creates a unique service account used for writing) + unique_writer_identity = true } ``` @@ -57,33 +57,33 @@ resource "google_compute_instance" "my-logged-instance" { network_interface { network = "default" - access_config {} + access_config { + } } } # A bucket to store logs in resource "google_storage_bucket" "log-bucket" { - name = "my-unique-logging-bucket" + name = "my-unique-logging-bucket" } # Our sink; this logs all activity related to our "my-logged-instance" instance resource "google_logging_project_sink" "instance-sink" { - name = "my-instance-sink" - destination = "storage.googleapis.com/${google_storage_bucket.log-bucket.name}" - filter = "resource.type = gce_instance AND resource.labels.instance_id = \"${google_compute_instance.my-logged-instance.instance_id}\"" + name = "my-instance-sink" + destination = "storage.googleapis.com/${google_storage_bucket.log-bucket.name}" + filter = "resource.type = gce_instance AND resource.labels.instance_id = \"${google_compute_instance.my-logged-instance.instance_id}\"" - unique_writer_identity = true + unique_writer_identity = true } # Because our sink uses a unique_writer, we must grant that writer access to the bucket. resource "google_project_iam_binding" "log-writer" { - role = "roles/storage.objectCreator" + role = "roles/storage.objectCreator" - members = [ - "${google_logging_project_sink.instance-sink.writer_identity}", - ] + members = [ + google_logging_project_sink.instance-sink.writer_identity, + ] } - ``` ## Argument Reference diff --git a/third_party/terraform/website/docs/r/pubsub_subscription_iam.html.markdown b/third_party/terraform/website/docs/r/pubsub_subscription_iam.html.markdown index 12e5181706d7..5b1371252319 100644 --- a/third_party/terraform/website/docs/r/pubsub_subscription_iam.html.markdown +++ b/third_party/terraform/website/docs/r/pubsub_subscription_iam.html.markdown @@ -24,7 +24,7 @@ Three different resources help you manage your IAM policy for pubsub subscriptio ```hcl data "google_iam_policy" "admin" { binding { - role = "roles/editor" + role = "roles/editor" members = [ "user:jane@example.com", ] @@ -33,7 +33,7 @@ data "google_iam_policy" "admin" { resource "google_pubsub_subscription_iam_policy" "editor" { subscription = "your-subscription-name" - policy_data = "${data.google_iam_policy.admin.policy_data}" + policy_data = data.google_iam_policy.admin.policy_data } ``` @@ -43,7 +43,7 @@ resource "google_pubsub_subscription_iam_policy" "editor" { resource "google_pubsub_subscription_iam_binding" "editor" { subscription = "your-subscription-name" role = "roles/editor" - members = [ + members = [ "user:jane@example.com", ] } diff --git a/third_party/terraform/website/docs/r/runtimeconfig_config.html.markdown b/third_party/terraform/website/docs/r/runtimeconfig_config.html.markdown index 713dee1a9424..0af0429327a5 100644 --- a/third_party/terraform/website/docs/r/runtimeconfig_config.html.markdown +++ b/third_party/terraform/website/docs/r/runtimeconfig_config.html.markdown @@ -20,8 +20,8 @@ Example creating a RuntimeConfig resource. ```hcl resource "google_runtimeconfig_config" "my-runtime-config" { - name = "my-service-runtime-config" - description = "Runtime configuration values for my service" + name = "my-service-runtime-config" + description = "Runtime configuration values for my service" } ``` diff --git a/third_party/terraform/website/docs/r/runtimeconfig_variable.html.markdown b/third_party/terraform/website/docs/r/runtimeconfig_variable.html.markdown index 3618b1ffbdc3..d5b5e80ba3d8 100644 --- a/third_party/terraform/website/docs/r/runtimeconfig_variable.html.markdown +++ b/third_party/terraform/website/docs/r/runtimeconfig_variable.html.markdown @@ -20,14 +20,14 @@ Example creating a RuntimeConfig variable. ```hcl resource "google_runtimeconfig_config" "my-runtime-config" { - name = "my-service-runtime-config" - description = "Runtime configuration values for my service" + name = "my-service-runtime-config" + description = "Runtime configuration values for my service" } resource "google_runtimeconfig_variable" "environment" { - parent = "${google_runtimeconfig_config.my-runtime-config.name}" - name = "prod-variables/hostname" - text = "example.com" + parent = google_runtimeconfig_config.my-runtime-config.name + name = "prod-variables/hostname" + text = "example.com" } ``` @@ -38,14 +38,14 @@ Example of using the `value` argument. ```hcl resource "google_runtimeconfig_config" "my-runtime-config" { - name = "my-service-runtime-config" - description = "Runtime configuration values for my service" + name = "my-service-runtime-config" + description = "Runtime configuration values for my service" } resource "google_runtimeconfig_variable" "my-secret" { - parent = "${google_runtimeconfig_config.my-runtime-config.name}" - name = "secret" - value = "${base64encode(file("my-encrypted-secret.dat"))}" + parent = google_runtimeconfig_config.my-runtime-config.name + name = "secret" + value = base64encode(file("my-encrypted-secret.dat")) } ``` diff --git a/third_party/terraform/website/docs/r/service_networking_connection.html.markdown b/third_party/terraform/website/docs/r/service_networking_connection.html.markdown index 1e377834bd7c..e201834c9315 100644 --- a/third_party/terraform/website/docs/r/service_networking_connection.html.markdown +++ b/third_party/terraform/website/docs/r/service_networking_connection.html.markdown @@ -26,13 +26,13 @@ resource "google_compute_global_address" "private_ip_alloc" { purpose = "VPC_PEERING" address_type = "INTERNAL" prefix_length = 16 - network = "${google_compute_network.peering_network.self_link}" + network = google_compute_network.peering_network.self_link } resource "google_service_networking_connection" "foobar" { - network = "${google_compute_network.peering_network.self_link}" + network = google_compute_network.peering_network.self_link service = "servicenetworking.googleapis.com" - reserved_peering_ranges = ["${google_compute_global_address.private_ip_alloc.name}"] + reserved_peering_ranges = [google_compute_global_address.private_ip_alloc.name] } ``` diff --git a/third_party/terraform/website/docs/r/spanner_database_iam.html.markdown b/third_party/terraform/website/docs/r/spanner_database_iam.html.markdown index 006e3ed75528..d386ef2d1010 100644 --- a/third_party/terraform/website/docs/r/spanner_database_iam.html.markdown +++ b/third_party/terraform/website/docs/r/spanner_database_iam.html.markdown @@ -38,7 +38,7 @@ data "google_iam_policy" "admin" { resource "google_spanner_database_iam_policy" "database" { instance = "your-instance-name" database = "your-database-name" - policy_data = "${data.google_iam_policy.admin.policy_data}" + policy_data = data.google_iam_policy.admin.policy_data } ``` @@ -46,9 +46,9 @@ resource "google_spanner_database_iam_policy" "database" { ```hcl resource "google_spanner_database_iam_binding" "database" { - instance = "your-instance-name" - database = "your-database-name" - role = "roles/compute.networkUser" + instance = "your-instance-name" + database = "your-database-name" + role = "roles/compute.networkUser" members = [ "user:jane@example.com", @@ -60,10 +60,10 @@ resource "google_spanner_database_iam_binding" "database" { ```hcl resource "google_spanner_database_iam_member" "database" { - instance = "your-instance-name" - database = "your-database-name" - role = "roles/compute.networkUser" - member = "user:jane@example.com" + instance = "your-instance-name" + database = "your-database-name" + role = "roles/compute.networkUser" + member = "user:jane@example.com" } ``` diff --git a/third_party/terraform/website/docs/r/spanner_instance_iam.html.markdown b/third_party/terraform/website/docs/r/spanner_instance_iam.html.markdown index 969a13a326bf..1b301502fc08 100644 --- a/third_party/terraform/website/docs/r/spanner_instance_iam.html.markdown +++ b/third_party/terraform/website/docs/r/spanner_instance_iam.html.markdown @@ -37,7 +37,7 @@ data "google_iam_policy" "admin" { resource "google_spanner_instance_iam_policy" "instance" { instance = "your-instance-name" - policy_data = "${data.google_iam_policy.admin.policy_data}" + policy_data = data.google_iam_policy.admin.policy_data } ``` @@ -45,8 +45,8 @@ resource "google_spanner_instance_iam_policy" "instance" { ```hcl resource "google_spanner_instance_iam_binding" "instance" { - instance = "your-instance-name" - role = "roles/compute.networkUser" + instance = "your-instance-name" + role = "roles/compute.networkUser" members = [ "user:jane@example.com", @@ -58,9 +58,9 @@ resource "google_spanner_instance_iam_binding" "instance" { ```hcl resource "google_spanner_instance_iam_member" "instance" { - instance = "your-instance-name" - role = "roles/compute.networkUser" - member = "user:jane@example.com" + instance = "your-instance-name" + role = "roles/compute.networkUser" + member = "user:jane@example.com" } ``` diff --git a/third_party/terraform/website/docs/r/sql_database_instance.html.markdown b/third_party/terraform/website/docs/r/sql_database_instance.html.markdown index f7c787ac9903..f16a5db743bb 100644 --- a/third_party/terraform/website/docs/r/sql_database_instance.html.markdown +++ b/third_party/terraform/website/docs/r/sql_database_instance.html.markdown @@ -27,8 +27,9 @@ resource "random_id" "db_name_suffix" { } resource "google_sql_database_instance" "master" { - name = "master-instance-${random_id.db_name_suffix.hex}" + name = "master-instance-${random_id.db_name_suffix.hex}" database_version = "MYSQL_5_6" + # First-generation instance regions are not the conventional # Google Compute Engine regions. See argument reference below. region = "us-central" @@ -43,9 +44,9 @@ resource "google_sql_database_instance" "master" { ```hcl resource "google_sql_database_instance" "master" { - name = "master-instance" + name = "master-instance" database_version = "POSTGRES_9_6" - region = "us-central1" + region = "us-central1" settings { # Second-generation instance tiers are based on the machine @@ -78,40 +79,42 @@ resource "google_compute_instance" "apps" { } } -data "null_data_source" "auth_netw_postgres_allowed_1" { - count = "${length(google_compute_instance.apps.*.self_link)}" - - inputs = { - name = "apps-${count.index + 1}" - value = "${element(google_compute_instance.apps.*.network_interface.0.access_config.0.nat_ip, count.index)}" - } -} - -data "null_data_source" "auth_netw_postgres_allowed_2" { - count = 2 - - inputs = { - name = "onprem-${count.index + 1}" - value = "${element(list("192.168.1.2", "192.168.2.3"), count.index)}" - } -} - resource "random_id" "db_name_suffix" { byte_length = 4 } +locals { + onprem = ["192.168.1.2", "192.168.2.3"] +} + resource "google_sql_database_instance" "postgres" { - name = "postgres-instance-${random_id.db_name_suffix.hex}" + name = "postgres-instance-${random_id.db_name_suffix.hex}" database_version = "POSTGRES_9_6" settings { tier = "db-f1-micro" ip_configuration { - authorized_networks = [ - "${data.null_data_source.auth_netw_postgres_allowed_1.*.outputs}", - "${data.null_data_source.auth_netw_postgres_allowed_2.*.outputs}", - ] + + dynamic "authorized_networks" { + for_each = google_compute_instance.apps + iterator = apps + + content { + name = apps.value.name + value = apps.value.network_interface.0.access_config.0.nat_ip + } + } + + dynamic "authorized_networks" { + for_each = local.onprem + iterator = onprem + + content { + name = "onprem-${onprem.key}" + value = onprem.value + } + } } } } @@ -122,27 +125,27 @@ resource "google_sql_database_instance" "postgres" { ```hcl resource "google_compute_network" "private_network" { - provider = "google-beta" + provider = google-beta - name = "private-network" + name = "private-network" } resource "google_compute_global_address" "private_ip_address" { - provider = "google-beta" + provider = google-beta name = "private-ip-address" purpose = "VPC_PEERING" - address_type = "INTERNAL" + address_type = "INTERNAL" prefix_length = 16 - network = "${google_compute_network.private_network.self_link}" + network = google_compute_network.private_network.self_link } resource "google_service_networking_connection" "private_vpc_connection" { - provider = "google-beta" + provider = google-beta - network = "${google_compute_network.private_network.self_link}" - service = "servicenetworking.googleapis.com" - reserved_peering_ranges = ["${google_compute_global_address.private_ip_address.name}"] + network = google_compute_network.private_network.self_link + service = "servicenetworking.googleapis.com" + reserved_peering_ranges = [google_compute_global_address.private_ip_address.name] } resource "random_id" "db_name_suffix" { @@ -150,25 +153,23 @@ resource "random_id" "db_name_suffix" { } resource "google_sql_database_instance" "instance" { - provider = "google-beta" + provider = google-beta - name = "private-instance-${random_id.db_name_suffix.hex}" + name = "private-instance-${random_id.db_name_suffix.hex}" region = "us-central1" - depends_on = [ - "google_service_networking_connection.private_vpc_connection" - ] + depends_on = [google_service_networking_connection.private_vpc_connection] settings { tier = "db-f1-micro" ip_configuration { - ipv4_enabled = false - private_network = "${google_compute_network.private_network.self_link}" + ipv4_enabled = false + private_network = google_compute_network.private_network.self_link } } } -provider "google-beta"{ +provider "google-beta" { region = "us-central1" zone = "us-central1-a" } diff --git a/third_party/terraform/website/docs/r/sql_ssl_cert.html.markdown b/third_party/terraform/website/docs/r/sql_ssl_cert.html.markdown index 76b4efc1cee3..9710ba8711dd 100644 --- a/third_party/terraform/website/docs/r/sql_ssl_cert.html.markdown +++ b/third_party/terraform/website/docs/r/sql_ssl_cert.html.markdown @@ -33,7 +33,7 @@ resource "google_sql_database_instance" "master" { resource "google_sql_ssl_cert" "client_cert" { common_name = "client-name" - instance = "${google_sql_database_instance.master.name}" + instance = google_sql_database_instance.master.name } ``` diff --git a/third_party/terraform/website/docs/r/sql_user.html.markdown b/third_party/terraform/website/docs/r/sql_user.html.markdown index a282e6100f34..8f78fa751929 100644 --- a/third_party/terraform/website/docs/r/sql_user.html.markdown +++ b/third_party/terraform/website/docs/r/sql_user.html.markdown @@ -34,7 +34,7 @@ resource "google_sql_database_instance" "master" { resource "google_sql_user" "users" { name = "me" - instance = "${google_sql_database_instance.master.name}" + instance = google_sql_database_instance.master.name host = "me.com" password = "changeme" } diff --git a/third_party/terraform/website/docs/r/storage_bucket_acl.html.markdown b/third_party/terraform/website/docs/r/storage_bucket_acl.html.markdown index 13422ab52267..db9e2467d556 100644 --- a/third_party/terraform/website/docs/r/storage_bucket_acl.html.markdown +++ b/third_party/terraform/website/docs/r/storage_bucket_acl.html.markdown @@ -25,7 +25,7 @@ resource "google_storage_bucket" "image-store" { } resource "google_storage_bucket_acl" "image-store-acl" { - bucket = "${google_storage_bucket.image-store.name}" + bucket = google_storage_bucket.image-store.name role_entity = [ "OWNER:user-my.email@gmail.com", diff --git a/third_party/terraform/website/docs/r/storage_bucket_iam.html.markdown b/third_party/terraform/website/docs/r/storage_bucket_iam.html.markdown index feb2c22b9e6c..bc2510a7730b 100644 --- a/third_party/terraform/website/docs/r/storage_bucket_iam.html.markdown +++ b/third_party/terraform/website/docs/r/storage_bucket_iam.html.markdown @@ -23,7 +23,7 @@ Three different resources help you manage your IAM policy for storage bucket. Ea ```hcl resource "google_storage_bucket_iam_binding" "binding" { bucket = "your-bucket-name" - role = "roles/storage.objectViewer" + role = "roles/storage.objectViewer" members = [ "user:jane@example.com", @@ -36,8 +36,8 @@ resource "google_storage_bucket_iam_binding" "binding" { ```hcl resource "google_storage_bucket_iam_member" "member" { bucket = "your-bucket-name" - role = "roles/storage.objectViewer" - member = "user:jane@example.com" + role = "roles/storage.objectViewer" + member = "user:jane@example.com" } ``` @@ -54,13 +54,13 @@ data "google_iam_policy" "foo-policy" { binding { role = "roles/your-role" - members = [ "group:yourgroup@example.com" ] + members = ["group:yourgroup@example.com"] } } resource "google_storage_bucket_iam_policy" "member" { - bucket = "your-bucket-name" - policy_data = "${data.google_iam_policy.foo-policy.policy_data}" + bucket = "your-bucket-name" + policy_data = data.google_iam_policy.foo-policy.policy_data } ``` diff --git a/third_party/terraform/website/docs/r/storage_default_object_acl.html.markdown b/third_party/terraform/website/docs/r/storage_default_object_acl.html.markdown index 596832b3cfda..72df1a5914b1 100644 --- a/third_party/terraform/website/docs/r/storage_default_object_acl.html.markdown +++ b/third_party/terraform/website/docs/r/storage_default_object_acl.html.markdown @@ -34,7 +34,7 @@ resource "google_storage_bucket" "image-store" { } resource "google_storage_default_object_acl" "image-store-default-acl" { - bucket = "${google_storage_bucket.image-store.name}" + bucket = google_storage_bucket.image-store.name role_entity = [ "OWNER:user-my.email@gmail.com", "READER:group-mygroup", diff --git a/third_party/terraform/website/docs/r/storage_notification.html.markdown b/third_party/terraform/website/docs/r/storage_notification.html.markdown index f78dc51af6b8..b94813bc371e 100644 --- a/third_party/terraform/website/docs/r/storage_notification.html.markdown +++ b/third_party/terraform/website/docs/r/storage_notification.html.markdown @@ -25,35 +25,35 @@ for an example of enabling notifications by granting the correct IAM permission. ```hcl resource "google_storage_notification" "notification" { - bucket = "${google_storage_bucket.bucket.name}" - payload_format = "JSON_API_V1" - topic = "${google_pubsub_topic.topic.name}" - event_types = ["OBJECT_FINALIZE", "OBJECT_METADATA_UPDATE"] - custom_attributes = { - new-attribute = "new-attribute-value" - } - depends_on = ["google_pubsub_topic_iam_binding.binding"] + bucket = google_storage_bucket.bucket.name + payload_format = "JSON_API_V1" + topic = google_pubsub_topic.topic.name + event_types = ["OBJECT_FINALIZE", "OBJECT_METADATA_UPDATE"] + custom_attributes = { + new-attribute = "new-attribute-value" + } + depends_on = [google_pubsub_topic_iam_binding.binding] } // Enable notifications by giving the correct IAM permission to the unique service account. -data "google_storage_project_service_account" "gcs_account" {} +data "google_storage_project_service_account" "gcs_account" { +} resource "google_pubsub_topic_iam_binding" "binding" { - topic = "${google_pubsub_topic.topic.name}" - role = "roles/pubsub.publisher" - members = ["serviceAccount:${data.google_storage_project_service_account.gcs_account.email_address}"] + topic = google_pubsub_topic.topic.name + role = "roles/pubsub.publisher" + members = ["serviceAccount:${data.google_storage_project_service_account.gcs_account.email_address}"] } // End enabling notifications - resource "google_storage_bucket" "bucket" { - name = "default_bucket" + name = "default_bucket" } resource "google_pubsub_topic" "topic" { - name = "default_topic" + name = "default_topic" } ``` diff --git a/third_party/terraform/website/docs/r/storage_object_acl.html.markdown b/third_party/terraform/website/docs/r/storage_object_acl.html.markdown index e8eb1d674736..3dedc497a628 100644 --- a/third_party/terraform/website/docs/r/storage_object_acl.html.markdown +++ b/third_party/terraform/website/docs/r/storage_object_acl.html.markdown @@ -33,13 +33,13 @@ resource "google_storage_bucket" "image-store" { resource "google_storage_bucket_object" "image" { name = "image1" - bucket = "${google_storage_bucket.image-store.name}" + bucket = google_storage_bucket.image-store.name source = "image1.jpg" } resource "google_storage_object_acl" "image-store-acl" { - bucket = "${google_storage_bucket.image-store.name}" - object = "${google_storage_bucket_object.image.output_name}" + bucket = google_storage_bucket.image-store.name + object = google_storage_bucket_object.image.output_name role_entity = [ "OWNER:user-my.email@gmail.com", diff --git a/third_party/terraform/website/docs/r/storage_transfer_job.html.markdown b/third_party/terraform/website/docs/r/storage_transfer_job.html.markdown index be2bc0172f91..8e8c69bcafc8 100644 --- a/third_party/terraform/website/docs/r/storage_transfer_job.html.markdown +++ b/third_party/terraform/website/docs/r/storage_transfer_job.html.markdown @@ -23,74 +23,69 @@ To get more information about Google Cloud Storage Transfer, see: Example creating a nightly Transfer Job from an AWS S3 Bucket to a GCS bucket. ```hcl - data "google_storage_transfer_project_service_account" "default" { - project = "${var.project}" + project = var.project } resource "google_storage_bucket" "s3-backup-bucket" { name = "${var.aws_s3_bucket}-backup" storage_class = "NEARLINE" - project = "${var.project}" + project = var.project } resource "google_storage_bucket_iam_member" "s3-backup-bucket" { - bucket = "${google_storage_bucket.s3-backup-bucket.name}" - role = "roles/storage.admin" - member = "serviceAccount:${data.google_storage_transfer_project_service_account.default.email}" - depends_on = [ - "google_storage_bucket.s3-backup-bucket" - ] + bucket = google_storage_bucket.s3-backup-bucket.name + role = "roles/storage.admin" + member = "serviceAccount:${data.google_storage_transfer_project_service_account.default.email}" + depends_on = [google_storage_bucket.s3-backup-bucket] } resource "google_storage_transfer_job" "s3-bucket-nightly-backup" { - description = "Nightly backup of S3 bucket" - project = "${var.project}" - - transfer_spec { - object_conditions { - max_time_elapsed_since_last_modification = "600s" - exclude_prefixes = [ - "requests.gz" - ] - } - transfer_options { - delete_objects_unique_in_sink = false - } - aws_s3_data_source { - bucket_name = "${var.aws_s3_bucket}" - aws_access_key { - access_key_id = "${var.aws_access_key}" - secret_access_key = "${var.aws_secret_key}" - } - } - gcs_data_sink { - bucket_name = "${google_storage_bucket.s3-backup-bucket.name}" - } - } - - schedule { - schedule_start_date { - year = 2018 - month = 10 - day = 1 - } - schedule_end_date { - year = 2019 - month = 1 - day = 15 - } - start_time_of_day { - hours = 23 - minutes = 30 - seconds = 0 - nanos = 0 - } - } - - depends_on = [ - "google_storage_bucket_iam_member.s3-backup-bucket" - ] + description = "Nightly backup of S3 bucket" + project = var.project + + transfer_spec { + object_conditions { + max_time_elapsed_since_last_modification = "600s" + exclude_prefixes = [ + "requests.gz", + ] + } + transfer_options { + delete_objects_unique_in_sink = false + } + aws_s3_data_source { + bucket_name = var.aws_s3_bucket + aws_access_key { + access_key_id = var.aws_access_key + secret_access_key = var.aws_secret_key + } + } + gcs_data_sink { + bucket_name = google_storage_bucket.s3-backup-bucket.name + } + } + + schedule { + schedule_start_date { + year = 2018 + month = 10 + day = 1 + } + schedule_end_date { + year = 2019 + month = 1 + day = 15 + } + start_time_of_day { + hours = 23 + minutes = 30 + seconds = 0 + nanos = 0 + } + } + + depends_on = [google_storage_bucket_iam_member.s3-backup-bucket] } ``` diff --git a/third_party/terraform/website/docs/r/usage_export_bucket.html.markdown b/third_party/terraform/website/docs/r/usage_export_bucket.html.markdown index d7bb95c66d49..6a7935c8fc14 100644 --- a/third_party/terraform/website/docs/r/usage_export_bucket.html.markdown +++ b/third_party/terraform/website/docs/r/usage_export_bucket.html.markdown @@ -25,8 +25,8 @@ safe to have multiple resources with the same backing bucket. ```hcl resource "google_project_usage_export_bucket" "usage_export" { - project = "development-project" - bucket_name = "usage-tracking-bucket" + project = "development-project" + bucket_name = "usage-tracking-bucket" } ```