diff --git a/templates/terraform/examples/binary_authorization_attestor_kms.tf.erb b/templates/terraform/examples/binary_authorization_attestor_kms.tf.erb index bbbb9bf0bbcf..a4b2240acddd 100644 --- a/templates/terraform/examples/binary_authorization_attestor_kms.tf.erb +++ b/templates/terraform/examples/binary_authorization_attestor_kms.tf.erb @@ -1,19 +1,19 @@ resource "google_binary_authorization_attestor" "<%= ctx[:primary_resource_id] %>" { name = "<%= ctx[:vars]["attestor_name"] %>" attestation_authority_note { - note_reference = "${google_container_analysis_note.note.name}" + note_reference = google_container_analysis_note.note.name public_keys { - id = "${data.google_kms_crypto_key_version.version.id}" + id = data.google_kms_crypto_key_version.version.id pkix_public_key { - public_key_pem = "${data.google_kms_crypto_key_version.version.public_key[0].pem}" - signature_algorithm = "${data.google_kms_crypto_key_version.version.public_key[0].algorithm}" + public_key_pem = data.google_kms_crypto_key_version.version.public_key[0].pem + signature_algorithm = data.google_kms_crypto_key_version.version.public_key[0].algorithm } } } } data "google_kms_crypto_key_version" "version" { - crypto_key = "${google_kms_crypto_key.crypto-key.self_link}" + crypto_key = google_kms_crypto_key.crypto-key.self_link } resource "google_container_analysis_note" "note" { @@ -27,7 +27,7 @@ resource "google_container_analysis_note" "note" { resource "google_kms_crypto_key" "crypto-key" { name = "<%= ctx[:vars]["key_name"] %>" - key_ring = "${google_kms_key_ring.keyring.self_link}" + key_ring = google_kms_key_ring.keyring.self_link purpose = "ASYMMETRIC_SIGN" version_template { diff --git a/templates/terraform/examples/logging_metric_basic.tf.erb b/templates/terraform/examples/logging_metric_basic.tf.erb index 4badab016d33..c23dae41ace8 100644 --- a/templates/terraform/examples/logging_metric_basic.tf.erb +++ b/templates/terraform/examples/logging_metric_basic.tf.erb @@ -1,23 +1,25 @@ resource "google_logging_metric" "<%= ctx[:primary_resource_id] %>" { - name = "<%= ctx[:vars]["logging_metric_name"] %>" + name = "<%= ctx[:vars]["logging_metric_name"] %>" filter = "resource.type=gae_app AND severity>=ERROR" metric_descriptor { metric_kind = "DELTA" - value_type = "DISTRIBUTION" - unit = "1" + value_type = "DISTRIBUTION" + unit = "1" labels { - key = "mass" - value_type = "STRING" - description = "amount of matter" + key = "mass" + value_type = "STRING" + description = "amount of matter" } } value_extractor = "EXTRACT(jsonPayload.request)" - label_extractors = { "mass": "EXTRACT(jsonPayload.request)" } + label_extractors = { + "mass" = "EXTRACT(jsonPayload.request)" + } bucket_options { linear_buckets { num_finite_buckets = 3 - width = 1 - offset = 1 + width = 1 + offset = 1 } } } diff --git a/templates/terraform/examples/logging_metric_counter_labels.tf.erb b/templates/terraform/examples/logging_metric_counter_labels.tf.erb index f313747ab6cc..b3a92374c915 100644 --- a/templates/terraform/examples/logging_metric_counter_labels.tf.erb +++ b/templates/terraform/examples/logging_metric_counter_labels.tf.erb @@ -1,14 +1,16 @@ resource "google_logging_metric" "<%= ctx[:primary_resource_id] %>" { - name = "<%= ctx[:vars]["logging_metric_name"] %>" + name = "<%= ctx[:vars]["logging_metric_name"] %>" filter = "resource.type=gae_app AND severity>=ERROR" metric_descriptor { metric_kind = "DELTA" - value_type = "INT64" + value_type = "INT64" labels { - key = "mass" - value_type = "STRING" - description = "amount of matter" + key = "mass" + value_type = "STRING" + description = "amount of matter" } } - label_extractors = { "mass": "EXTRACT(jsonPayload.request)" } + label_extractors = { + "mass" = "EXTRACT(jsonPayload.request)" + } } diff --git a/templates/terraform/examples/tpu_node_basic.tf.erb b/templates/terraform/examples/tpu_node_basic.tf.erb index 32fc6509e97a..90701ef38ee5 100644 --- a/templates/terraform/examples/tpu_node_basic.tf.erb +++ b/templates/terraform/examples/tpu_node_basic.tf.erb @@ -1,15 +1,17 @@ <%#- - WARNING: cidr_block must not overlap with other existing TPU blocks - Make sure if you change this value that it does not overlap with the - autogenerated examples. + WARNING: cidr_block must not overlap with other existing TPU blocks + Make sure if you change this value that it does not overlap with the + autogenerated examples. -%> -data "google_tpu_tensorflow_versions" "available" { } + +data "google_tpu_tensorflow_versions" "available" { +} resource "google_tpu_node" "<%= ctx[:primary_resource_id] %>" { - name = "<%= ctx[:vars]["node_name"] %>" - zone = "us-central1-b" + name = "<%= ctx[:vars]["node_name"] %>" + zone = "us-central1-b" - accelerator_type = "v3-8" - tensorflow_version = "${data.google_tpu_tensorflow_versions.available.versions[0]}" - cidr_block = "10.2.0.0/29" + accelerator_type = "v3-8" + tensorflow_version = data.google_tpu_tensorflow_versions.available.versions[0] + cidr_block = "10.2.0.0/29" } diff --git a/templates/terraform/examples/tpu_node_full.tf.erb b/templates/terraform/examples/tpu_node_full.tf.erb index 1780ee2436d7..818161d7fb4a 100644 --- a/templates/terraform/examples/tpu_node_full.tf.erb +++ b/templates/terraform/examples/tpu_node_full.tf.erb @@ -1,33 +1,35 @@ -data "google_tpu_tensorflow_versions" "available" { } +data "google_tpu_tensorflow_versions" "available" { +} <%#- - WARNING: cidr_block must not overlap with other existing TPU blocks - Make sure if you change this value that it does not overlap with the - autogenerated examples. + WARNING: cidr_block must not overlap with other existing TPU blocks + Make sure if you change this value that it does not overlap with the + autogenerated examples. -%> + resource "google_tpu_node" "<%= ctx[:primary_resource_id] %>" { - name = "<%= ctx[:vars]["node_name"] %>" - zone = "us-central1-b" + name = "<%= ctx[:vars]["node_name"] %>" + zone = "us-central1-b" - accelerator_type = "v3-8" + accelerator_type = "v3-8" - cidr_block = "10.3.0.0/29" - tensorflow_version = "${data.google_tpu_tensorflow_versions.available.versions[0]}" + cidr_block = "10.3.0.0/29" + tensorflow_version = data.google_tpu_tensorflow_versions.available.versions[0] - description = "Terraform Google Provider test TPU" + description = "Terraform Google Provider test TPU" <%#- - We previously used a separate network resource here, but TPUs only allow using 50 - different network names, ever. This caused our tests to start failing, so just - use the default network in order to still demonstrate using as many fields as - possible on the resource. + We previously used a separate network resource here, but TPUs only allow using 50 + different network names, ever. This caused our tests to start failing, so just + use the default network in order to still demonstrate using as many fields as + possible on the resource. -%> - network = "default" + network = "default" - labels = { - foo = "bar" - } + labels = { + foo = "bar" + } - scheduling_config { - preemptible = true - } + scheduling_config { + preemptible = true + } }