diff --git a/templates/terraform/examples/access_context_manager_access_level_basic.tf.erb b/templates/terraform/examples/access_context_manager_access_level_basic.tf.erb index a02eab096c1e..6a1f8feb3867 100644 --- a/templates/terraform/examples/access_context_manager_access_level_basic.tf.erb +++ b/templates/terraform/examples/access_context_manager_access_level_basic.tf.erb @@ -1,7 +1,7 @@ resource "google_access_context_manager_access_level" "<%= ctx[:primary_resource_id] %>" { - parent = "accessPolicies/${google_access_context_manager_access_policy.test-access.name}" - name = "accessPolicies/${google_access_context_manager_access_policy.test-access.name}/accessLevels/<%= ctx[:vars]['access_level_name'] %>" - title = "<%= ctx[:vars]['access_level_name'] %>" + parent = "accessPolicies/${google_access_context_manager_access_policy.test-access.name}" + name = "accessPolicies/${google_access_context_manager_access_policy.test-access.name}/accessLevels/<%= ctx[:vars]['access_level_name'] %>" + title = "<%= ctx[:vars]['access_level_name'] %>" basic { conditions { device_policy { diff --git a/templates/terraform/examples/access_context_manager_service_perimeter_basic.tf.erb b/templates/terraform/examples/access_context_manager_service_perimeter_basic.tf.erb index 812c54063d6f..825de2a04c6a 100644 --- a/templates/terraform/examples/access_context_manager_service_perimeter_basic.tf.erb +++ b/templates/terraform/examples/access_context_manager_service_perimeter_basic.tf.erb @@ -1,16 +1,16 @@ resource "google_access_context_manager_service_perimeter" "<%= ctx[:primary_resource_id] %>" { - parent = "accessPolicies/${google_access_context_manager_access_policy.test-access.name}" - name = "accessPolicies/${google_access_context_manager_access_policy.test-access.name}/servicePerimeters/<%= ctx[:vars]['service_perimeter_name'] %>" - title = "<%= ctx[:vars]['service_perimeter_name'] %>" + parent = "accessPolicies/${google_access_context_manager_access_policy.test-access.name}" + name = "accessPolicies/${google_access_context_manager_access_policy.test-access.name}/servicePerimeters/<%= ctx[:vars]['service_perimeter_name'] %>" + title = "<%= ctx[:vars]['service_perimeter_name'] %>" status { restricted_services = ["storage.googleapis.com"] } } resource "google_access_context_manager_access_level" "access-level" { - parent = "accessPolicies/${google_access_context_manager_access_policy.test-access.name}" - name = "accessPolicies/${google_access_context_manager_access_policy.test-access.name}/accessLevels/<%= ctx[:vars]['access_level_name'] %>" - title = "<%= ctx[:vars]['access_level_name'] %>" + parent = "accessPolicies/${google_access_context_manager_access_policy.test-access.name}" + name = "accessPolicies/${google_access_context_manager_access_policy.test-access.name}/accessLevels/<%= ctx[:vars]['access_level_name'] %>" + title = "<%= ctx[:vars]['access_level_name'] %>" basic { conditions { device_policy { diff --git a/templates/terraform/examples/address_with_subnetwork.tf.erb b/templates/terraform/examples/address_with_subnetwork.tf.erb index 236654234b78..95b5202af389 100644 --- a/templates/terraform/examples/address_with_subnetwork.tf.erb +++ b/templates/terraform/examples/address_with_subnetwork.tf.erb @@ -6,12 +6,12 @@ resource "google_compute_subnetwork" "default" { name = "<%= ctx[:vars]['subnetwork_name'] %>" ip_cidr_range = "10.0.0.0/16" region = "us-central1" - network = "${google_compute_network.default.self_link}" + network = google_compute_network.default.self_link } resource "google_compute_address" "<%= ctx[:primary_resource_id] %>" { name = "<%= ctx[:vars]['address_name'] %>" - subnetwork = "${google_compute_subnetwork.default.self_link}" + subnetwork = google_compute_subnetwork.default.self_link address_type = "INTERNAL" address = "10.0.42.42" region = "us-central1" diff --git a/templates/terraform/examples/app_engine_application_url_dispatch_rules_basic.tf.erb b/templates/terraform/examples/app_engine_application_url_dispatch_rules_basic.tf.erb index 056bb4804083..2516b058f8ad 100644 --- a/templates/terraform/examples/app_engine_application_url_dispatch_rules_basic.tf.erb +++ b/templates/terraform/examples/app_engine_application_url_dispatch_rules_basic.tf.erb @@ -1,21 +1,21 @@ resource "google_app_engine_application_url_dispatch_rules" "<%= ctx[:primary_resource_id] %>" { dispatch_rules { - domain = "*" - path = "/*" + domain = "*" + path = "/*" service = "default" } dispatch_rules { - domain = "*" - path = "/admin/*" - service = "${google_app_engine_standard_app_version.admin_v3.service}" + domain = "*" + path = "/admin/*" + service = google_app_engine_standard_app_version.admin_v3.service } } resource "google_app_engine_standard_app_version" "admin_v3" { version_id = "v3" - service = "admin" - runtime = "nodejs10" + service = "admin" + runtime = "nodejs10" entrypoint { shell = "node ./app.js" @@ -35,11 +35,11 @@ resource "google_app_engine_standard_app_version" "admin_v3" { } resource "google_storage_bucket" "bucket" { - name = "<%= ctx[:vars]['bucket_name'] %>" + name = "<%= ctx[:vars]['bucket_name'] %>" } resource "google_storage_bucket_object" "object" { - name = "hello-world.zip" - bucket = "${google_storage_bucket.bucket.name}" - source = "./test-fixtures/appengine/hello-world.zip" + name = "hello-world.zip" + bucket = google_storage_bucket.bucket.name + source = "./test-fixtures/appengine/hello-world.zip" } diff --git a/templates/terraform/examples/app_engine_domain_mapping_basic.tf.erb b/templates/terraform/examples/app_engine_domain_mapping_basic.tf.erb index d54f726c8ea6..b3806ca9df2b 100644 --- a/templates/terraform/examples/app_engine_domain_mapping_basic.tf.erb +++ b/templates/terraform/examples/app_engine_domain_mapping_basic.tf.erb @@ -1,6 +1,6 @@ resource "google_app_engine_domain_mapping" "<%= ctx[:primary_resource_id] %>" { domain_name = "<%= ctx[:vars]["domain"] %>.gcp.tfacc.hashicorptest.com" - + ssl_settings { ssl_management_type = "AUTOMATIC" } diff --git a/templates/terraform/examples/app_engine_firewall_rule_basic.tf.erb b/templates/terraform/examples/app_engine_firewall_rule_basic.tf.erb index 73ba20571d21..d21956cd3191 100644 --- a/templates/terraform/examples/app_engine_firewall_rule_basic.tf.erb +++ b/templates/terraform/examples/app_engine_firewall_rule_basic.tf.erb @@ -5,13 +5,13 @@ 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" } resource "google_app_engine_firewall_rule" "rule" { - project = "${google_app_engine_application.app.project}" - priority = 1000 - action = "ALLOW" + project = google_app_engine_application.app.project + priority = 1000 + action = "ALLOW" source_range = "*" } diff --git a/templates/terraform/examples/app_engine_standard_app_version.tf.erb b/templates/terraform/examples/app_engine_standard_app_version.tf.erb index f9bf973843a5..cdf15ef6acbb 100644 --- a/templates/terraform/examples/app_engine_standard_app_version.tf.erb +++ b/templates/terraform/examples/app_engine_standard_app_version.tf.erb @@ -43,11 +43,11 @@ resource "google_app_engine_standard_app_version" "myapp_v2" { } resource "google_storage_bucket" "bucket" { - name = "<%= ctx[:vars]['bucket_name'] %>" + name = "<%= ctx[:vars]['bucket_name'] %>" } resource "google_storage_bucket_object" "object" { - name = "hello-world.zip" - bucket = "${google_storage_bucket.bucket.name}" - source = "./test-fixtures/appengine/hello-world.zip" + name = "hello-world.zip" + bucket = google_storage_bucket.bucket.name + source = "./test-fixtures/appengine/hello-world.zip" } diff --git a/templates/terraform/examples/autoscaler_basic.tf.erb b/templates/terraform/examples/autoscaler_basic.tf.erb index 316904bf2a79..cf9f0b23097b 100644 --- a/templates/terraform/examples/autoscaler_basic.tf.erb +++ b/templates/terraform/examples/autoscaler_basic.tf.erb @@ -1,7 +1,7 @@ resource "google_compute_autoscaler" "foobar" { name = "<%= ctx[:vars]['autoscaler_name'] %>" zone = "us-central1-f" - target = "${google_compute_instance_group_manager.foobar.self_link}" + target = google_compute_instance_group_manager.foobar.self_link autoscaling_policy { max_replicas = 5 @@ -22,7 +22,7 @@ resource "google_compute_instance_template" "foobar" { tags = ["foo", "bar"] disk { - source_image = "${data.google_compute_image.debian_9.self_link}" + source_image = data.google_compute_image.debian_9.self_link } network_interface { @@ -46,13 +46,12 @@ resource "google_compute_instance_group_manager" "foobar" { name = "<%= ctx[:vars]['igm_name'] %>" zone = "us-central1-f" - instance_template = "${google_compute_instance_template.foobar.self_link}" - - target_pools = ["${google_compute_target_pool.foobar.self_link}"] + instance_template = google_compute_instance_template.foobar.self_link + target_pools = [google_compute_target_pool.foobar.self_link] base_instance_name = "foobar" } data "google_compute_image" "debian_9" { - family = "debian-9" - project = "debian-cloud" + family = "debian-9" + project = "debian-cloud" } diff --git a/templates/terraform/examples/autoscaler_single_instance.tf.erb b/templates/terraform/examples/autoscaler_single_instance.tf.erb index 66d7741642af..5963289d49e2 100644 --- a/templates/terraform/examples/autoscaler_single_instance.tf.erb +++ b/templates/terraform/examples/autoscaler_single_instance.tf.erb @@ -1,9 +1,9 @@ resource "google_compute_autoscaler" "<%= ctx[:primary_resource_id] %>" { - provider = "google-beta" + provider = google-beta name = "<%= ctx[:vars]['autoscaler_name'] %>" zone = "us-central1-f" - target = "${google_compute_instance_group_manager.default.self_link}" + target = google_compute_instance_group_manager.default.self_link autoscaling_policy { max_replicas = 5 @@ -19,7 +19,7 @@ resource "google_compute_autoscaler" "<%= ctx[:primary_resource_id] %>" { } resource "google_compute_instance_template" "default" { - provider = "google-beta" + provider = google-beta name = "<%= ctx[:vars]['instance_template_name'] %>" machine_type = "n1-standard-1" @@ -28,7 +28,7 @@ resource "google_compute_instance_template" "default" { tags = ["foo", "bar"] disk { - source_image = "${data.google_compute_image.debian_9.self_link}" + source_image = data.google_compute_image.debian_9.self_link } network_interface { @@ -45,34 +45,34 @@ resource "google_compute_instance_template" "default" { } resource "google_compute_target_pool" "default" { - provider = "google-beta" + provider = google-beta name = "<%= ctx[:vars]['target_pool_name'] %>" } resource "google_compute_instance_group_manager" "default" { - provider = "google-beta" + provider = google-beta name = "<%= ctx[:vars]['igm_name'] %>" zone = "us-central1-f" version { - instance_template = "${google_compute_instance_template.default.self_link}" - name = "primary" + instance_template = google_compute_instance_template.default.self_link + name = "primary" } - target_pools = ["${google_compute_target_pool.default.self_link}"] + target_pools = [google_compute_target_pool.default.self_link] base_instance_name = "autoscaler-sample" } data "google_compute_image" "debian_9" { - provider = "google-beta" + provider = google-beta family = "debian-9" project = "debian-cloud" } -provider "google-beta"{ +provider "google-beta" { region = "us-central1" zone = "us-central1-a" } diff --git a/templates/terraform/examples/backend_bucket_basic.tf.erb b/templates/terraform/examples/backend_bucket_basic.tf.erb index 89aa019daa8a..06496f64bbb3 100644 --- a/templates/terraform/examples/backend_bucket_basic.tf.erb +++ b/templates/terraform/examples/backend_bucket_basic.tf.erb @@ -1,7 +1,7 @@ resource "google_compute_backend_bucket" "image_backend" { name = "<%= ctx[:vars]['backend_bucket_name'] %>" description = "Contains beautiful images" - bucket_name = "${google_storage_bucket.image_bucket.name}" + bucket_name = google_storage_bucket.image_bucket.name enable_cdn = true } diff --git a/templates/terraform/examples/backend_bucket_signed_url_key.tf.erb b/templates/terraform/examples/backend_bucket_signed_url_key.tf.erb index a9341ce2167f..da56c1c8dda5 100644 --- a/templates/terraform/examples/backend_bucket_signed_url_key.tf.erb +++ b/templates/terraform/examples/backend_bucket_signed_url_key.tf.erb @@ -1,13 +1,13 @@ resource "google_compute_backend_bucket_signed_url_key" "backend_key" { name = "<%= ctx[:vars]['key_name'] %>" key_value = "pPsVemX8GM46QVeezid6Rw==" - backend_bucket = "${google_compute_backend_bucket.test_backend.name}" + backend_bucket = google_compute_backend_bucket.test_backend.name } resource "google_compute_backend_bucket" "test_backend" { name = "<%= ctx[:vars]['backend_name'] %>" description = "Contains beautiful images" - bucket_name = "${google_storage_bucket.bucket.name}" + bucket_name = google_storage_bucket.bucket.name enable_cdn = true } diff --git a/templates/terraform/examples/backend_service_basic.tf.erb b/templates/terraform/examples/backend_service_basic.tf.erb index a8a9d151087b..c3779e7cb9d2 100644 --- a/templates/terraform/examples/backend_service_basic.tf.erb +++ b/templates/terraform/examples/backend_service_basic.tf.erb @@ -1,6 +1,6 @@ resource "google_compute_backend_service" "<%= ctx[:primary_resource_id] %>" { name = "<%= ctx[:vars]['backend_service_name'] %>" - health_checks = ["${google_compute_http_health_check.default.self_link}"] + health_checks = [google_compute_http_health_check.default.self_link] } resource "google_compute_http_health_check" "default" { diff --git a/templates/terraform/examples/backend_service_signed_url_key.tf.erb b/templates/terraform/examples/backend_service_signed_url_key.tf.erb index ba36d402299e..1155e00b123d 100644 --- a/templates/terraform/examples/backend_service_signed_url_key.tf.erb +++ b/templates/terraform/examples/backend_service_signed_url_key.tf.erb @@ -1,7 +1,7 @@ resource "google_compute_backend_service_signed_url_key" "backend_key" { - name = "<%= ctx[:vars]['key_name'] %>" - key_value = "pPsVemX8GM46QVeezid6Rw==" - backend_service = "${google_compute_backend_service.example_backend.name}" + name = "<%= ctx[:vars]['key_name'] %>" + key_value = "pPsVemX8GM46QVeezid6Rw==" + backend_service = google_compute_backend_service.example_backend.name } resource "google_compute_backend_service" "example_backend" { @@ -13,15 +13,15 @@ resource "google_compute_backend_service" "example_backend" { enable_cdn = true backend { - group = "${google_compute_instance_group_manager.webservers.instance_group}" + group = google_compute_instance_group_manager.webservers.instance_group } - health_checks = ["${google_compute_http_health_check.default.self_link}"] + health_checks = [google_compute_http_health_check.default.self_link] } resource "google_compute_instance_group_manager" "webservers" { name = "my-webservers" - instance_template = "${google_compute_instance_template.webserver.self_link}" + instance_template = google_compute_instance_template.webserver.self_link base_instance_name = "webserver" zone = "us-central1-f" target_size = 1 @@ -47,4 +47,4 @@ resource "google_compute_http_health_check" "default" { request_path = "/" check_interval_sec = 1 timeout_sec = 1 -} \ No newline at end of file +} diff --git a/templates/terraform/examples/backend_service_traffic_director_ring_hash.tf.erb b/templates/terraform/examples/backend_service_traffic_director_ring_hash.tf.erb index 29476e438df7..9287a56e709b 100644 --- a/templates/terraform/examples/backend_service_traffic_director_ring_hash.tf.erb +++ b/templates/terraform/examples/backend_service_traffic_director_ring_hash.tf.erb @@ -1,11 +1,11 @@ resource "google_compute_backend_service" "<%= ctx[:primary_resource_id] %>" { - provider = "google-beta" + provider = google-beta - name = "<%= ctx[:vars]['backend_service_name'] %>" - health_checks = ["${google_compute_health_check.health_check.self_link}"] + name = "<%= ctx[:vars]['backend_service_name'] %>" + health_checks = [google_compute_health_check.health_check.self_link] load_balancing_scheme = "INTERNAL_SELF_MANAGED" - locality_lb_policy = "RING_HASH" - session_affinity = "HTTP_COOKIE" + locality_lb_policy = "RING_HASH" + session_affinity = "HTTP_COOKIE" circuit_breakers { max_connections = 10 } @@ -13,7 +13,7 @@ resource "google_compute_backend_service" "<%= ctx[:primary_resource_id] %>" { http_cookie { ttl { seconds = 11 - nanos = 1111 + nanos = 1111 } name = "mycookie" } @@ -24,10 +24,9 @@ resource "google_compute_backend_service" "<%= ctx[:primary_resource_id] %>" { } resource "google_compute_health_check" "health_check" { - provider = "google-beta" + provider = google-beta - name = "<%= ctx[:vars]['health_check_name'] %>" + name = "<%= ctx[:vars]['health_check_name'] %>" http_health_check { - } } diff --git a/templates/terraform/examples/backend_service_traffic_director_round_robin.tf.erb b/templates/terraform/examples/backend_service_traffic_director_round_robin.tf.erb index 7109a237a511..5e1a368f0b77 100644 --- a/templates/terraform/examples/backend_service_traffic_director_round_robin.tf.erb +++ b/templates/terraform/examples/backend_service_traffic_director_round_robin.tf.erb @@ -1,17 +1,16 @@ resource "google_compute_backend_service" "<%= ctx[:primary_resource_id] %>" { - provider = "google-beta" + provider = google-beta - name = "<%= ctx[:vars]['backend_service_name'] %>" - health_checks = ["${google_compute_health_check.health_check.self_link}"] + name = "<%= ctx[:vars]['backend_service_name'] %>" + health_checks = [google_compute_health_check.health_check.self_link] load_balancing_scheme = "INTERNAL_SELF_MANAGED" - locality_lb_policy = "ROUND_ROBIN" + locality_lb_policy = "ROUND_ROBIN" } resource "google_compute_health_check" "health_check" { - provider = "google-beta" + provider = google-beta - name = "<%= ctx[:vars]['health_check_name'] %>" + name = "<%= ctx[:vars]['health_check_name'] %>" http_health_check { - } } diff --git a/templates/terraform/examples/bigquery_dataset_cmek.tf.erb b/templates/terraform/examples/bigquery_dataset_cmek.tf.erb index a39106dabd3f..5bec43c07e05 100644 --- a/templates/terraform/examples/bigquery_dataset_cmek.tf.erb +++ b/templates/terraform/examples/bigquery_dataset_cmek.tf.erb @@ -6,13 +6,13 @@ resource "google_bigquery_dataset" "<%= ctx[:primary_resource_id] %>" { default_table_expiration_ms = 3600000 default_encryption_configuration { - kms_key_name = "${google_kms_crypto_key.crypto_key.self_link}" + kms_key_name = google_kms_crypto_key.crypto_key.self_link } } resource "google_kms_crypto_key" "crypto_key" { name = "<%= ctx[:vars]['key_name'] %>" - key_ring = "${google_kms_key_ring.key_ring.self_link}" + key_ring = google_kms_key_ring.key_ring.self_link } resource "google_kms_key_ring" "key_ring" { diff --git a/templates/terraform/examples/bigtable_app_profile_multicluster.tf.erb b/templates/terraform/examples/bigtable_app_profile_multicluster.tf.erb index 8a5bb3004daa..52748eeb377b 100644 --- a/templates/terraform/examples/bigtable_app_profile_multicluster.tf.erb +++ b/templates/terraform/examples/bigtable_app_profile_multicluster.tf.erb @@ -1,17 +1,17 @@ resource "google_bigtable_instance" "instance" { - name = "<%= ctx[:vars]['instance_name'] %>" - cluster { - cluster_id = "<%= ctx[:vars]['instance_name'] %>" - zone = "us-central1-b" - num_nodes = 3 - storage_type = "HDD" - } + name = "<%= ctx[:vars]['instance_name'] %>" + cluster { + cluster_id = "<%= ctx[:vars]['instance_name'] %>" + zone = "us-central1-b" + num_nodes = 3 + storage_type = "HDD" + } } resource "google_bigtable_app_profile" "ap" { - instance = google_bigtable_instance.instance.name - app_profile_id = "<%= ctx[:vars]['app_profile_name'] %>" + instance = google_bigtable_instance.instance.name + app_profile_id = "<%= ctx[:vars]['app_profile_name'] %>" - multi_cluster_routing_use_any = true - ignore_warnings = true + multi_cluster_routing_use_any = true + ignore_warnings = true } diff --git a/templates/terraform/examples/bigtable_app_profile_singlecluster.tf.erb b/templates/terraform/examples/bigtable_app_profile_singlecluster.tf.erb index d2b0d8c6aca2..3aee678a14fe 100644 --- a/templates/terraform/examples/bigtable_app_profile_singlecluster.tf.erb +++ b/templates/terraform/examples/bigtable_app_profile_singlecluster.tf.erb @@ -1,21 +1,21 @@ resource "google_bigtable_instance" "instance" { - name = "<%= ctx[:vars]['instance_name'] %>" - cluster { - cluster_id = "<%= ctx[:vars]['instance_name'] %>" - zone = "us-central1-b" - num_nodes = 3 - storage_type = "HDD" - } + name = "<%= ctx[:vars]['instance_name'] %>" + cluster { + cluster_id = "<%= ctx[:vars]['instance_name'] %>" + zone = "us-central1-b" + num_nodes = 3 + storage_type = "HDD" + } } resource "google_bigtable_app_profile" "ap" { - instance = google_bigtable_instance.instance.name - app_profile_id = "<%= ctx[:vars]['app_profile_name'] %>" + instance = google_bigtable_instance.instance.name + app_profile_id = "<%= ctx[:vars]['app_profile_name'] %>" - single_cluster_routing { - cluster_id = "<%= ctx[:vars]['instance_name'] %>" - allow_transactional_writes = true - } + single_cluster_routing { + cluster_id = "<%= ctx[:vars]['instance_name'] %>" + allow_transactional_writes = true + } - ignore_warnings = true + ignore_warnings = true } diff --git a/templates/terraform/examples/binary_authorization_attestor_basic.tf.erb b/templates/terraform/examples/binary_authorization_attestor_basic.tf.erb index 20580a9a3b9d..8d0fceec2b8d 100644 --- a/templates/terraform/examples/binary_authorization_attestor_basic.tf.erb +++ b/templates/terraform/examples/binary_authorization_attestor_basic.tf.erb @@ -1,7 +1,7 @@ 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 { ascii_armored_pgp_public_key = <" { 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/binary_authorization_policy_basic.tf.erb b/templates/terraform/examples/binary_authorization_policy_basic.tf.erb index 159478ba0f47..eb7d0904a068 100644 --- a/templates/terraform/examples/binary_authorization_policy_basic.tf.erb +++ b/templates/terraform/examples/binary_authorization_policy_basic.tf.erb @@ -1,18 +1,18 @@ resource "google_binary_authorization_policy" "<%= ctx[:primary_resource_id] %>" { admission_whitelist_patterns { - name_pattern= "gcr.io/google_containers/*" + name_pattern = "gcr.io/google_containers/*" } default_admission_rule { - evaluation_mode = "ALWAYS_ALLOW" + evaluation_mode = "ALWAYS_ALLOW" enforcement_mode = "ENFORCED_BLOCK_AND_AUDIT_LOG" } cluster_admission_rules { - cluster = "us-central1-a.prod-cluster" - evaluation_mode = "REQUIRE_ATTESTATION" - enforcement_mode = "ENFORCED_BLOCK_AND_AUDIT_LOG" - require_attestations_by = ["${google_binary_authorization_attestor.attestor.name}"] + cluster = "us-central1-a.prod-cluster" + evaluation_mode = "REQUIRE_ATTESTATION" + enforcement_mode = "ENFORCED_BLOCK_AND_AUDIT_LOG" + require_attestations_by = [google_binary_authorization_attestor.attestor.name] } } @@ -28,6 +28,6 @@ resource "google_container_analysis_note" "note" { resource "google_binary_authorization_attestor" "attestor" { name = "<%= ctx[:vars]["attestor_name"] %>" attestation_authority_note { - note_reference = "${google_container_analysis_note.note.name}" + note_reference = google_container_analysis_note.note.name } } diff --git a/templates/terraform/examples/binary_authorization_policy_global_evaluation.tf.erb b/templates/terraform/examples/binary_authorization_policy_global_evaluation.tf.erb index 0f83f97aba09..e96652d0fde8 100644 --- a/templates/terraform/examples/binary_authorization_policy_global_evaluation.tf.erb +++ b/templates/terraform/examples/binary_authorization_policy_global_evaluation.tf.erb @@ -1,13 +1,11 @@ resource "google_binary_authorization_policy" "<%= ctx[:primary_resource_id] %>" { - default_admission_rule { - evaluation_mode = "REQUIRE_ATTESTATION" - enforcement_mode = "ENFORCED_BLOCK_AND_AUDIT_LOG" - require_attestations_by = ["${google_binary_authorization_attestor.attestor.name}"] + evaluation_mode = "REQUIRE_ATTESTATION" + enforcement_mode = "ENFORCED_BLOCK_AND_AUDIT_LOG" + require_attestations_by = [google_binary_authorization_attestor.attestor.name] } global_policy_evaluation_mode = "ENABLE" - } resource "google_container_analysis_note" "note" { @@ -22,6 +20,6 @@ resource "google_container_analysis_note" "note" { resource "google_binary_authorization_attestor" "attestor" { name = "<%= ctx[:vars]["attestor_name"] %>" attestation_authority_note { - note_reference = "${google_container_analysis_note.note.name}" + note_reference = google_container_analysis_note.note.name } } diff --git a/templates/terraform/examples/cloud_run_domain_mapping_basic.tf.erb b/templates/terraform/examples/cloud_run_domain_mapping_basic.tf.erb index 9475fb5db089..33190b628706 100644 --- a/templates/terraform/examples/cloud_run_domain_mapping_basic.tf.erb +++ b/templates/terraform/examples/cloud_run_domain_mapping_basic.tf.erb @@ -1,7 +1,7 @@ resource "google_cloud_run_domain_mapping" "<%= ctx[:primary_resource_id] %>" { location = "us-central1" - provider = "google-beta" - name = "<%= ctx[:vars]['cloud_run_domain_name'] %>" + provider = google-beta + name = "<%= ctx[:vars]['cloud_run_domain_name'] %>" metadata { namespace = "<%= ctx[:test_env_vars]['namespace'] %>" diff --git a/templates/terraform/examples/cloudbuild_trigger_github.tf.erb b/templates/terraform/examples/cloudbuild_trigger_github.tf.erb index 699594b93b71..7acebda38bec 100644 --- a/templates/terraform/examples/cloudbuild_trigger_github.tf.erb +++ b/templates/terraform/examples/cloudbuild_trigger_github.tf.erb @@ -1,7 +1,7 @@ resource "google_cloudbuild_trigger" "<%= ctx[:primary_resource_id] %>" { github { owner = "terraform-providers" - name = "terraform-provider-google-beta" + name = "terraform-provider-google-beta" push { branch = "feature-.*" } diff --git a/templates/terraform/examples/cloudfunctions_cloud_function.tf.erb b/templates/terraform/examples/cloudfunctions_cloud_function.tf.erb index f96e9464d15a..c1b34fdd18b1 100644 --- a/templates/terraform/examples/cloudfunctions_cloud_function.tf.erb +++ b/templates/terraform/examples/cloudfunctions_cloud_function.tf.erb @@ -4,19 +4,19 @@ 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/index.zip" } resource "google_cloudfunctions_function" "<%= ctx[:primary_resource_id] %>" { - name = "<%= ctx[:vars]['function_name'] %>" - description = "My function" - runtime = "nodejs10" + name = "<%= ctx[:vars]['function_name'] %>" + 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" -} \ No newline at end of file +} diff --git a/templates/terraform/examples/dataproc_autoscaling_policy.tf.erb b/templates/terraform/examples/dataproc_autoscaling_policy.tf.erb index b0fbdb757213..1987a428977a 100644 --- a/templates/terraform/examples/dataproc_autoscaling_policy.tf.erb +++ b/templates/terraform/examples/dataproc_autoscaling_policy.tf.erb @@ -1,9 +1,10 @@ -provider "google-beta" {} +provider "google-beta" { +} resource "google_dataproc_cluster" "basic" { - provider = "google-beta" - name = "<%= ctx[:vars]['name'] %>" - region = "us-central1" + provider = google-beta + name = "<%= ctx[:vars]['name'] %>" + region = "us-central1" cluster_config { autoscaling_config { @@ -13,9 +14,9 @@ resource "google_dataproc_cluster" "basic" { } resource "google_dataproc_autoscaling_policy" "<%= ctx[:primary_resource_id] %>" { - provider = "google-beta" + provider = google-beta policy_id = "<%= ctx[:vars]['name'] %>" - location = "us-central1" + location = "us-central1" worker_config { max_instances = 3 diff --git a/templates/terraform/examples/dns_managed_zone_basic.tf.erb b/templates/terraform/examples/dns_managed_zone_basic.tf.erb index 8ecbb4ae821a..db5721b24113 100644 --- a/templates/terraform/examples/dns_managed_zone_basic.tf.erb +++ b/templates/terraform/examples/dns_managed_zone_basic.tf.erb @@ -1,6 +1,6 @@ resource "google_dns_managed_zone" "<%= ctx[:primary_resource_id] %>" { - name = "example-zone" - dns_name = "example-${random_id.rnd.hex}.com." + name = "example-zone" + dns_name = "example-${random_id.rnd.hex}.com." description = "Example DNS zone" labels = { foo = "bar" diff --git a/templates/terraform/examples/dns_managed_zone_private.tf.erb b/templates/terraform/examples/dns_managed_zone_private.tf.erb index 449a82f4f65f..b3afb2178df1 100644 --- a/templates/terraform/examples/dns_managed_zone_private.tf.erb +++ b/templates/terraform/examples/dns_managed_zone_private.tf.erb @@ -1,6 +1,6 @@ resource "google_dns_managed_zone" "<%= ctx[:primary_resource_id] %>" { - name = "<%= ctx[:vars]['zone_name'] %>" - dns_name = "private.example.com." + name = "<%= ctx[:vars]['zone_name'] %>" + dns_name = "private.example.com." description = "Example private DNS zone" labels = { foo = "bar" @@ -10,20 +10,20 @@ resource "google_dns_managed_zone" "<%= ctx[:primary_resource_id] %>" { private_visibility_config { networks { - network_url = "${google_compute_network.network-1.self_link}" + network_url = google_compute_network.network-1.self_link } networks { - network_url = "${google_compute_network.network-2.self_link}" + network_url = google_compute_network.network-2.self_link } } } resource "google_compute_network" "network-1" { - name = "<%= ctx[:vars]['network_1_name'] %>" + name = "<%= ctx[:vars]['network_1_name'] %>" auto_create_subnetworks = false } resource "google_compute_network" "network-2" { - name = "<%= ctx[:vars]['network_2_name'] %>" + name = "<%= ctx[:vars]['network_2_name'] %>" auto_create_subnetworks = false } diff --git a/templates/terraform/examples/dns_managed_zone_private_forwarding.tf.erb b/templates/terraform/examples/dns_managed_zone_private_forwarding.tf.erb index bd7a2c3ae3ee..6b38db0716d3 100644 --- a/templates/terraform/examples/dns_managed_zone_private_forwarding.tf.erb +++ b/templates/terraform/examples/dns_managed_zone_private_forwarding.tf.erb @@ -1,7 +1,7 @@ resource "google_dns_managed_zone" "<%= ctx[:primary_resource_id] %>" { - provider = "google-beta" - name = "<%= ctx[:vars]['zone_name'] %>" - dns_name = "private.example.com." + provider = google-beta + name = "<%= ctx[:vars]['zone_name'] %>" + dns_name = "private.example.com." description = "Example private DNS zone" labels = { foo = "bar" @@ -11,10 +11,10 @@ resource "google_dns_managed_zone" "<%= ctx[:primary_resource_id] %>" { private_visibility_config { networks { - network_url = "${google_compute_network.network-1.self_link}" + network_url = google_compute_network.network-1.self_link } networks { - network_url = "${google_compute_network.network-2.self_link}" + network_url = google_compute_network.network-2.self_link } } @@ -26,15 +26,14 @@ resource "google_dns_managed_zone" "<%= ctx[:primary_resource_id] %>" { ipv4_address = "172.16.1.20" } } - } resource "google_compute_network" "network-1" { - name = "<%= ctx[:vars]['network_1_name'] %>" + name = "<%= ctx[:vars]['network_1_name'] %>" auto_create_subnetworks = false } resource "google_compute_network" "network-2" { - name = "<%= ctx[:vars]['network_2_name'] %>" + name = "<%= ctx[:vars]['network_2_name'] %>" auto_create_subnetworks = false } diff --git a/templates/terraform/examples/dns_managed_zone_private_peering.tf.erb b/templates/terraform/examples/dns_managed_zone_private_peering.tf.erb index 4f9a71ffbb73..129b1aa8e25d 100644 --- a/templates/terraform/examples/dns_managed_zone_private_peering.tf.erb +++ b/templates/terraform/examples/dns_managed_zone_private_peering.tf.erb @@ -1,36 +1,36 @@ resource "google_dns_managed_zone" "<%= ctx[:primary_resource_id] %>" { - provider = "google-beta" + provider = google-beta - name = "<%= ctx[:vars]['zone_name'] %>" - dns_name = "peering.example.com." + name = "<%= ctx[:vars]['zone_name'] %>" + dns_name = "peering.example.com." description = "Example private DNS peering zone" visibility = "private" private_visibility_config { networks { - network_url = "${google_compute_network.network-source.self_link}" + network_url = google_compute_network.network-source.self_link } } peering_config { target_network { - network_url = "${google_compute_network.network-target.self_link}" + network_url = google_compute_network.network-target.self_link } } } resource "google_compute_network" "network-source" { - provider = "google-beta" + provider = google-beta - name = "<%= ctx[:vars]['network_source_name'] %>" + name = "<%= ctx[:vars]['network_source_name'] %>" auto_create_subnetworks = false } resource "google_compute_network" "network-target" { - provider = "google-beta" + provider = google-beta - name = "<%= ctx[:vars]['network_target_name'] %>" + name = "<%= ctx[:vars]['network_target_name'] %>" auto_create_subnetworks = false } diff --git a/templates/terraform/examples/dns_policy_basic.tf.erb b/templates/terraform/examples/dns_policy_basic.tf.erb index 1eeb9e08b57a..89b0f3f3b599 100644 --- a/templates/terraform/examples/dns_policy_basic.tf.erb +++ b/templates/terraform/examples/dns_policy_basic.tf.erb @@ -1,7 +1,7 @@ resource "google_dns_policy" "<%= ctx[:primary_resource_id] %>" { - provider = "google-beta" + provider = google-beta - name = "<%= ctx[:vars]['policy_name'] %>" + name = "<%= ctx[:vars]['policy_name'] %>" enable_inbound_forwarding = true enable_logging = true @@ -16,28 +16,28 @@ resource "google_dns_policy" "<%= ctx[:primary_resource_id] %>" { } networks { - network_url = "${google_compute_network.network-1.self_link}" + network_url = google_compute_network.network-1.self_link } networks { - network_url = "${google_compute_network.network-2.self_link}" + network_url = google_compute_network.network-2.self_link } } resource "google_compute_network" "network-1" { - provider = "google-beta" + provider = google-beta - name = "<%= ctx[:vars]['network_1_name'] %>" + name = "<%= ctx[:vars]['network_1_name'] %>" auto_create_subnetworks = false } resource "google_compute_network" "network-2" { - provider = "google-beta" + provider = google-beta - name = "<%= ctx[:vars]['network_2_name'] %>" + name = "<%= ctx[:vars]['network_2_name'] %>" auto_create_subnetworks = false } -provider "google-beta"{ +provider "google-beta" { region = "us-central1" zone = "us-central1-a" } diff --git a/templates/terraform/examples/external_vpn_gateway.tf.erb b/templates/terraform/examples/external_vpn_gateway.tf.erb index c8bf17228a19..2b45778d9edd 100644 --- a/templates/terraform/examples/external_vpn_gateway.tf.erb +++ b/templates/terraform/examples/external_vpn_gateway.tf.erb @@ -1,113 +1,113 @@ resource "google_compute_ha_vpn_gateway" "ha_gateway" { - provider = "google-beta" + provider = google-beta region = "us-central1" name = "<%= ctx[:vars]['ha_vpn_gateway_name'] %>" - network = "${google_compute_network.network.self_link}" + network = google_compute_network.network.self_link } resource "google_compute_external_vpn_gateway" "external_gateway" { - provider = "google-beta" + provider = google-beta name = "<%= ctx[:vars]['external_gateway_name'] %>" redundancy_type = "SINGLE_IP_INTERNALLY_REDUNDANT" description = "An externally managed VPN gateway" interface { - id = 0 + id = 0 ip_address = "8.8.8.8" } } resource "google_compute_network" "network" { - provider = "google-beta" + provider = google-beta name = "<%= ctx[:vars]['network_name'] %>" routing_mode = "GLOBAL" auto_create_subnetworks = false } resource "google_compute_subnetwork" "network_subnet1" { - provider = "google-beta" + provider = google-beta name = "ha-vpn-subnet-1" ip_cidr_range = "10.0.1.0/24" region = "us-central1" - network = "${google_compute_network.network.self_link}" + network = google_compute_network.network.self_link } resource "google_compute_subnetwork" "network_subnet2" { - provider = "google-beta" + provider = google-beta name = "ha-vpn-subnet-2" ip_cidr_range = "10.0.2.0/24" region = "us-west1" - network = "${google_compute_network.network.self_link}" + network = google_compute_network.network.self_link } resource "google_compute_router" "router1" { - provider = "google-beta" - name = "ha-vpn-router1" - network = "${google_compute_network.network.name}" + provider = google-beta + name = "ha-vpn-router1" + network = google_compute_network.network.name bgp { asn = 64514 } } resource "google_compute_vpn_tunnel" "tunnel1" { - provider = "google-beta" - name = "ha-vpn-tunnel1" - region = "us-central1" - vpn_gateway = "${google_compute_ha_vpn_gateway.ha_gateway.self_link}" - peer_external_gateway = "${google_compute_external_vpn_gateway.external_gateway.self_link}" + provider = google-beta + name = "ha-vpn-tunnel1" + region = "us-central1" + vpn_gateway = google_compute_ha_vpn_gateway.ha_gateway.self_link + peer_external_gateway = google_compute_external_vpn_gateway.external_gateway.self_link peer_external_gateway_interface = 0 - shared_secret = "a secret message" - router = "${google_compute_router.router1.self_link}" - vpn_gateway_interface = 0 + shared_secret = "a secret message" + router = google_compute_router.router1.self_link + vpn_gateway_interface = 0 } resource "google_compute_vpn_tunnel" "tunnel2" { - provider = "google-beta" - name = "ha-vpn-tunnel2" - region = "us-central1" - vpn_gateway = "${google_compute_ha_vpn_gateway.ha_gateway.self_link}" - peer_external_gateway = "${google_compute_external_vpn_gateway.external_gateway.self_link}" + provider = google-beta + name = "ha-vpn-tunnel2" + region = "us-central1" + vpn_gateway = google_compute_ha_vpn_gateway.ha_gateway.self_link + peer_external_gateway = google_compute_external_vpn_gateway.external_gateway.self_link peer_external_gateway_interface = 0 - shared_secret = "a secret message" - router = " ${google_compute_router.router1.self_link}" - vpn_gateway_interface = 1 + shared_secret = "a secret message" + router = " ${google_compute_router.router1.self_link}" + vpn_gateway_interface = 1 } resource "google_compute_router_interface" "router1_interface1" { - provider = "google-beta" + provider = google-beta name = "router1-interface1" - router = "${google_compute_router.router1.name}" + router = google_compute_router.router1.name region = "us-central1" ip_range = "169.254.0.1/30" - vpn_tunnel = "${google_compute_vpn_tunnel.tunnel1.name}" + vpn_tunnel = google_compute_vpn_tunnel.tunnel1.name } resource "google_compute_router_peer" "router1_peer1" { - provider = "google-beta" + provider = google-beta name = "router1-peer1" - router = "${google_compute_router.router1.name}" + router = google_compute_router.router1.name region = "us-central1" peer_ip_address = "169.254.0.2" peer_asn = 64515 advertised_route_priority = 100 - interface = "${google_compute_router_interface.router1_interface1.name}" + interface = google_compute_router_interface.router1_interface1.name } resource "google_compute_router_interface" "router1_interface2" { - provider = "google-beta" + provider = google-beta name = "router1-interface2" - router = "${google_compute_router.router1.name}" + router = google_compute_router.router1.name region = "us-central1" ip_range = "169.254.1.1/30" - vpn_tunnel = "${google_compute_vpn_tunnel.tunnel2.name}" + vpn_tunnel = google_compute_vpn_tunnel.tunnel2.name } resource "google_compute_router_peer" "router1_peer2" { - provider = "google-beta" + provider = google-beta name = "router1-peer2" - router = "${google_compute_router.router1.name}" + router = google_compute_router.router1.name region = "us-central1" peer_ip_address = "169.254.1.2" peer_asn = 64515 advertised_route_priority = 100 - interface = "${google_compute_router_interface.router1_interface2.name}" -} \ No newline at end of file + interface = google_compute_router_interface.router1_interface2.name +} diff --git a/templates/terraform/examples/firestore_index_basic.tf.erb b/templates/terraform/examples/firestore_index_basic.tf.erb index b0e79dbc0f20..90fbf4963bb1 100644 --- a/templates/terraform/examples/firestore_index_basic.tf.erb +++ b/templates/terraform/examples/firestore_index_basic.tf.erb @@ -1,5 +1,5 @@ resource "google_firestore_index" "<%= ctx[:primary_resource_id] %>" { - project = "<%= ctx[:test_env_vars]['project_id'] %>" + project = "<%= ctx[:test_env_vars]['project_id'] %>" collection = "chatrooms" diff --git a/templates/terraform/examples/firewall_basic.tf.erb b/templates/terraform/examples/firewall_basic.tf.erb index af0e2f4dc627..7b868126159f 100644 --- a/templates/terraform/examples/firewall_basic.tf.erb +++ b/templates/terraform/examples/firewall_basic.tf.erb @@ -1,6 +1,6 @@ resource "google_compute_firewall" "default" { name = "<%= ctx[:vars]['firewall_name'] %>" - network = "${google_compute_network.default.name}" + network = google_compute_network.default.name allow { protocol = "icmp" diff --git a/templates/terraform/examples/forwarding_rule_basic.tf.erb b/templates/terraform/examples/forwarding_rule_basic.tf.erb index aaa4d9c73d79..47fa4a17245c 100644 --- a/templates/terraform/examples/forwarding_rule_basic.tf.erb +++ b/templates/terraform/examples/forwarding_rule_basic.tf.erb @@ -1,6 +1,6 @@ resource "google_compute_forwarding_rule" "<%= ctx[:primary_resource_id] %>" { name = "<%= ctx[:vars]['forwarding_rule_name'] %>" - target = "${google_compute_target_pool.default.self_link}" + target = google_compute_target_pool.default.self_link port_range = "80" } diff --git a/templates/terraform/examples/forwarding_rule_internallb.tf.erb b/templates/terraform/examples/forwarding_rule_internallb.tf.erb index 2867dbf6d0e4..d78072f6392e 100644 --- a/templates/terraform/examples/forwarding_rule_internallb.tf.erb +++ b/templates/terraform/examples/forwarding_rule_internallb.tf.erb @@ -1,19 +1,19 @@ // Forwarding rule for Internal Load Balancing resource "google_compute_forwarding_rule" "<%= ctx[:primary_resource_id] %>" { - name = "<%= ctx[:vars]['forwarding_rule_name'] %>" - region = "us-central1" + name = "<%= ctx[:vars]['forwarding_rule_name'] %>" + region = "us-central1" load_balancing_scheme = "INTERNAL" - backend_service = "${google_compute_region_backend_service.backend.self_link}" + backend_service = google_compute_region_backend_service.backend.self_link all_ports = true - network = "${google_compute_network.default.name}" - subnetwork = "${google_compute_subnetwork.default.name}" + network = google_compute_network.default.name + subnetwork = google_compute_subnetwork.default.name } resource "google_compute_region_backend_service" "backend" { - name = "<%= ctx[:vars]['backend_name'] %>" - region = "us-central1" - health_checks = ["${google_compute_health_check.hc.self_link}"] + name = "<%= ctx[:vars]['backend_name'] %>" + region = "us-central1" + health_checks = [google_compute_health_check.hc.self_link] } resource "google_compute_health_check" "hc" { @@ -27,7 +27,7 @@ resource "google_compute_health_check" "hc" { } resource "google_compute_network" "default" { - name = "<%= ctx[:vars]['network_name'] %>" + name = "<%= ctx[:vars]['network_name'] %>" auto_create_subnetworks = false } @@ -35,5 +35,5 @@ resource "google_compute_subnetwork" "default" { name = "<%= ctx[:vars]['network_name'] %>" ip_cidr_range = "10.0.0.0/16" region = "us-central1" - network = "${google_compute_network.default.self_link}" + network = google_compute_network.default.self_link } diff --git a/templates/terraform/examples/global_forwarding_rule_http.tf.erb b/templates/terraform/examples/global_forwarding_rule_http.tf.erb index fef12245b099..71225b15e162 100644 --- a/templates/terraform/examples/global_forwarding_rule_http.tf.erb +++ b/templates/terraform/examples/global_forwarding_rule_http.tf.erb @@ -1,19 +1,19 @@ resource "google_compute_global_forwarding_rule" "default" { name = "<%= ctx[:vars]['forwarding_rule_name'] %>" - target = "${google_compute_target_http_proxy.default.self_link}" + target = google_compute_target_http_proxy.default.self_link port_range = "80" } resource "google_compute_target_http_proxy" "default" { name = "<%= ctx[:vars]['http_proxy_name'] %>" description = "a description" - url_map = "${google_compute_url_map.default.self_link}" + url_map = google_compute_url_map.default.self_link } resource "google_compute_url_map" "default" { name = "url-map-<%= ctx[:vars]['http_proxy_name'] %>" description = "a description" - default_service = "${google_compute_backend_service.default.self_link}" + default_service = google_compute_backend_service.default.self_link host_rule { hosts = ["mysite.com"] @@ -22,11 +22,11 @@ resource "google_compute_url_map" "default" { path_matcher { name = "allpaths" - default_service = "${google_compute_backend_service.default.self_link}" + default_service = google_compute_backend_service.default.self_link path_rule { paths = ["/*"] - service = "${google_compute_backend_service.default.self_link}" + service = google_compute_backend_service.default.self_link } } } @@ -37,7 +37,7 @@ resource "google_compute_backend_service" "default" { protocol = "HTTP" timeout_sec = 10 - health_checks = ["${google_compute_http_health_check.default.self_link}"] + health_checks = [google_compute_http_health_check.default.self_link] } resource "google_compute_http_health_check" "default" { diff --git a/templates/terraform/examples/global_forwarding_rule_internal.tf.erb b/templates/terraform/examples/global_forwarding_rule_internal.tf.erb index ef991db33733..aa01994cb81e 100644 --- a/templates/terraform/examples/global_forwarding_rule_internal.tf.erb +++ b/templates/terraform/examples/global_forwarding_rule_internal.tf.erb @@ -1,31 +1,31 @@ resource "google_compute_global_forwarding_rule" "default" { - provider = "google-beta" + provider = google-beta name = "<%= ctx[:vars]['forwarding_rule_name'] %>" - target = "${google_compute_target_http_proxy.default.self_link}" + target = google_compute_target_http_proxy.default.self_link port_range = "80" load_balancing_scheme = "INTERNAL_SELF_MANAGED" ip_address = "0.0.0.0" metadata_filters { filter_match_criteria = "MATCH_ANY" filter_labels { - name = "PLANET" + name = "PLANET" value = "MARS" } } } resource "google_compute_target_http_proxy" "default" { - provider = "google-beta" + provider = google-beta name = "<%= ctx[:vars]['http_proxy_name'] %>" description = "a description" - url_map = "${google_compute_url_map.default.self_link}" + url_map = google_compute_url_map.default.self_link } resource "google_compute_url_map" "default" { - provider = "google-beta" + provider = google-beta name = "url-map-<%= ctx[:vars]['http_proxy_name'] %>" description = "a description" - default_service = "${google_compute_backend_service.default.self_link}" + default_service = google_compute_backend_service.default.self_link host_rule { hosts = ["mysite.com"] @@ -34,17 +34,17 @@ resource "google_compute_url_map" "default" { path_matcher { name = "allpaths" - default_service = "${google_compute_backend_service.default.self_link}" + default_service = google_compute_backend_service.default.self_link path_rule { paths = ["/*"] - service = "${google_compute_backend_service.default.self_link}" + service = google_compute_backend_service.default.self_link } } } resource "google_compute_backend_service" "default" { - provider = "google-beta" + provider = google-beta name = "<%= ctx[:vars]['backend_service_name'] %>" port_name = "http" protocol = "HTTP" @@ -52,27 +52,27 @@ resource "google_compute_backend_service" "default" { load_balancing_scheme = "INTERNAL_SELF_MANAGED" backend { - group = "${google_compute_instance_group_manager.igm.instance_group}" - balancing_mode = "RATE" - capacity_scaler = 0.4 + group = google_compute_instance_group_manager.igm.instance_group + balancing_mode = "RATE" + capacity_scaler = 0.4 max_rate_per_instance = 50 } - health_checks = ["${google_compute_health_check.default.self_link}"] + health_checks = [google_compute_health_check.default.self_link] } data "google_compute_image" "debian_image" { - provider = "google-beta" + provider = google-beta family = "debian-9" project = "debian-cloud" } resource "google_compute_instance_group_manager" "igm" { - provider = "google-beta" - name = "igm-internal" + provider = google-beta + name = "igm-internal" version { - instance_template = "${google_compute_instance_template.instance_template.self_link}" - name = "primary" + instance_template = google_compute_instance_template.instance_template.self_link + name = "primary" } base_instance_name = "internal-glb" zone = "us-central1-f" @@ -80,7 +80,7 @@ resource "google_compute_instance_group_manager" "igm" { } resource "google_compute_instance_template" "instance_template" { - provider = "google-beta" + provider = google-beta name = "template-<%= ctx[:vars]['backend_service_name'] %>" machine_type = "n1-standard-1" @@ -89,14 +89,14 @@ resource "google_compute_instance_template" "instance_template" { } disk { - source_image = "${data.google_compute_image.debian_image.self_link}" + source_image = data.google_compute_image.debian_image.self_link auto_delete = true boot = true } } resource "google_compute_health_check" "default" { - provider = "google-beta" + provider = google-beta name = "check-<%= ctx[:vars]['backend_service_name'] %>" check_interval_sec = 1 timeout_sec = 1 @@ -105,3 +105,4 @@ resource "google_compute_health_check" "default" { port = "80" } } + diff --git a/templates/terraform/examples/ha_vpn_gateway_basic.tf.erb b/templates/terraform/examples/ha_vpn_gateway_basic.tf.erb index 1624c0316f46..98c135c1621d 100644 --- a/templates/terraform/examples/ha_vpn_gateway_basic.tf.erb +++ b/templates/terraform/examples/ha_vpn_gateway_basic.tf.erb @@ -1,12 +1,12 @@ resource "google_compute_ha_vpn_gateway" "ha_gateway1" { - provider = "google-beta" + provider = google-beta region = "us-central1" name = "<%= ctx[:vars]['ha_vpn_gateway1_name'] %>" - network = "${google_compute_network.network1.self_link}" + network = google_compute_network.network1.self_link } resource "google_compute_network" "network1" { - provider = "google-beta" + provider = google-beta name = "<%= ctx[:vars]['network1_name'] %>" auto_create_subnetworks = false -} \ No newline at end of file +} diff --git a/templates/terraform/examples/ha_vpn_gateway_gcp_to_gcp.tf.erb b/templates/terraform/examples/ha_vpn_gateway_gcp_to_gcp.tf.erb index 71930b4f57ad..abc47c260485 100644 --- a/templates/terraform/examples/ha_vpn_gateway_gcp_to_gcp.tf.erb +++ b/templates/terraform/examples/ha_vpn_gateway_gcp_to_gcp.tf.erb @@ -1,201 +1,201 @@ resource "google_compute_ha_vpn_gateway" "ha_gateway1" { - provider = "google-beta" + provider = google-beta region = "us-central1" name = "<%= ctx[:vars]['ha_vpn_gateway1_name'] %>" - network = "${google_compute_network.network1.self_link}" + network = google_compute_network.network1.self_link } resource "google_compute_ha_vpn_gateway" "ha_gateway2" { - provider = "google-beta" + provider = google-beta region = "us-central1" name = "<%= ctx[:vars]['ha_vpn_gateway2_name'] %>" - network = "${google_compute_network.network2.self_link}" + network = google_compute_network.network2.self_link } resource "google_compute_network" "network1" { - provider = "google-beta" + provider = google-beta name = "<%= ctx[:vars]['network1_name'] %>" routing_mode = "GLOBAL" auto_create_subnetworks = false } resource "google_compute_network" "network2" { - provider = "google-beta" + provider = google-beta name = "<%= ctx[:vars]['network2_name'] %>" routing_mode = "GLOBAL" auto_create_subnetworks = false } resource "google_compute_subnetwork" "network1_subnet1" { - provider = "google-beta" + provider = google-beta name = "ha-vpn-subnet-1" ip_cidr_range = "10.0.1.0/24" region = "us-central1" - network = "${google_compute_network.network1.self_link}" + network = google_compute_network.network1.self_link } resource "google_compute_subnetwork" "network1_subnet2" { - provider = "google-beta" + provider = google-beta name = "ha-vpn-subnet-2" ip_cidr_range = "10.0.2.0/24" region = "us-west1" - network = "${google_compute_network.network1.self_link}" + network = google_compute_network.network1.self_link } resource "google_compute_subnetwork" "network2_subnet1" { - provider = "google-beta" + provider = google-beta name = "ha-vpn-subnet-3" ip_cidr_range = "192.168.1.0/24" region = "us-central1" - network = "${google_compute_network.network2.self_link}" + network = google_compute_network.network2.self_link } resource "google_compute_subnetwork" "network2_subnet2" { - provider = "google-beta" + provider = google-beta name = "ha-vpn-subnet-4" ip_cidr_range = "192.168.2.0/24" region = "us-east1" - network = "${google_compute_network.network2.self_link}" + network = google_compute_network.network2.self_link } resource "google_compute_router" "router1" { - provider = "google-beta" - name = "ha-vpn-router1" - network = "${google_compute_network.network1.name}" + provider = google-beta + name = "ha-vpn-router1" + network = google_compute_network.network1.name bgp { asn = 64514 } } resource "google_compute_router" "router2" { - provider = "google-beta" + provider = google-beta name = "ha-vpn-router2" - network = "${google_compute_network.network2.name}" + network = google_compute_network.network2.name bgp { asn = 64515 } } resource "google_compute_vpn_tunnel" "tunnel1" { - provider = "google-beta" - name = "ha-vpn-tunnel1" - region = "us-central1" - vpn_gateway = "${google_compute_ha_vpn_gateway.ha_gateway1.self_link}" - peer_gcp_gateway = "${google_compute_ha_vpn_gateway.ha_gateway2.self_link}" - shared_secret = "a secret message" - router = "${google_compute_router.router1.self_link}" + provider = google-beta + name = "ha-vpn-tunnel1" + region = "us-central1" + vpn_gateway = google_compute_ha_vpn_gateway.ha_gateway1.self_link + peer_gcp_gateway = google_compute_ha_vpn_gateway.ha_gateway2.self_link + shared_secret = "a secret message" + router = google_compute_router.router1.self_link vpn_gateway_interface = 0 } resource "google_compute_vpn_tunnel" "tunnel2" { - provider = "google-beta" - name = "ha-vpn-tunnel2" - region = "us-central1" - vpn_gateway = "${google_compute_ha_vpn_gateway.ha_gateway1.self_link}" - peer_gcp_gateway = "${google_compute_ha_vpn_gateway.ha_gateway2.self_link}" - shared_secret = "a secret message" - router = " ${google_compute_router.router1.self_link}" + provider = google-beta + name = "ha-vpn-tunnel2" + region = "us-central1" + vpn_gateway = google_compute_ha_vpn_gateway.ha_gateway1.self_link + peer_gcp_gateway = google_compute_ha_vpn_gateway.ha_gateway2.self_link + shared_secret = "a secret message" + router = google_compute_router.router1.self_link vpn_gateway_interface = 1 } resource "google_compute_vpn_tunnel" "tunnel3" { - provider = "google-beta" - name = "ha-vpn-tunnel3" - region = "us-central1" - vpn_gateway = "${google_compute_ha_vpn_gateway.ha_gateway2.self_link}" - peer_gcp_gateway = "${google_compute_ha_vpn_gateway.ha_gateway1.self_link}" - shared_secret = "a secret message" - router = "${google_compute_router.router2.self_link}" + provider = google-beta + name = "ha-vpn-tunnel3" + region = "us-central1" + vpn_gateway = google_compute_ha_vpn_gateway.ha_gateway2.self_link + peer_gcp_gateway = google_compute_ha_vpn_gateway.ha_gateway1.self_link + shared_secret = "a secret message" + router = google_compute_router.router2.self_link vpn_gateway_interface = 0 } resource "google_compute_vpn_tunnel" "tunnel4" { - provider = "google-beta" - name = "ha-vpn-tunnel4" - region = "us-central1" - vpn_gateway = "${google_compute_ha_vpn_gateway.ha_gateway2.self_link}" - peer_gcp_gateway = "${google_compute_ha_vpn_gateway.ha_gateway1.self_link}" - shared_secret = "a secret message" - router = "${google_compute_router.router2.self_link}" + provider = google-beta + name = "ha-vpn-tunnel4" + region = "us-central1" + vpn_gateway = google_compute_ha_vpn_gateway.ha_gateway2.self_link + peer_gcp_gateway = google_compute_ha_vpn_gateway.ha_gateway1.self_link + shared_secret = "a secret message" + router = google_compute_router.router2.self_link vpn_gateway_interface = 1 } resource "google_compute_router_interface" "router1_interface1" { - provider = "google-beta" + provider = google-beta name = "router1-interface1" - router = "${google_compute_router.router1.name}" + router = google_compute_router.router1.name region = "us-central1" ip_range = "169.254.0.1/30" - vpn_tunnel = "${google_compute_vpn_tunnel.tunnel1.name}" + vpn_tunnel = google_compute_vpn_tunnel.tunnel1.name } resource "google_compute_router_peer" "router1_peer1" { - provider = "google-beta" + provider = google-beta name = "router1-peer1" - router = "${google_compute_router.router1.name}" + router = google_compute_router.router1.name region = "us-central1" peer_ip_address = "169.254.0.2" peer_asn = 64515 advertised_route_priority = 100 - interface = "${google_compute_router_interface.router1_interface1.name}" + interface = google_compute_router_interface.router1_interface1.name } resource "google_compute_router_interface" "router1_interface2" { - provider = "google-beta" + provider = google-beta name = "router1-interface2" - router = "${google_compute_router.router1.name}" + router = google_compute_router.router1.name region = "us-central1" ip_range = "169.254.1.1/30" - vpn_tunnel = "${google_compute_vpn_tunnel.tunnel2.name}" + vpn_tunnel = google_compute_vpn_tunnel.tunnel2.name } resource "google_compute_router_peer" "router1_peer2" { - provider = "google-beta" + provider = google-beta name = "router1-peer2" - router = "${google_compute_router.router1.name}" + router = google_compute_router.router1.name region = "us-central1" peer_ip_address = "169.254.1.2" peer_asn = 64515 advertised_route_priority = 100 - interface = "${google_compute_router_interface.router1_interface2.name}" + interface = google_compute_router_interface.router1_interface2.name } resource "google_compute_router_interface" "router2_interface1" { - provider = "google-beta" + provider = google-beta name = "router2-interface1" - router = "${google_compute_router.router2.name}" + router = google_compute_router.router2.name region = "us-central1" ip_range = "169.254.0.1/30" - vpn_tunnel = "${google_compute_vpn_tunnel.tunnel3.name}" + vpn_tunnel = google_compute_vpn_tunnel.tunnel3.name } resource "google_compute_router_peer" "router2_peer1" { - provider = "google-beta" + provider = google-beta name = "router2-peer1" - router = "${google_compute_router.router2.name}" + router = google_compute_router.router2.name region = "us-central1" peer_ip_address = "169.254.0.2" peer_asn = 64514 advertised_route_priority = 100 - interface = "${google_compute_router_interface.router2_interface1.name}" + interface = google_compute_router_interface.router2_interface1.name } resource "google_compute_router_interface" "router2_interface2" { - provider = "google-beta" + provider = google-beta name = "router2-interface2" - router = "${google_compute_router.router2.name}" + router = google_compute_router.router2.name region = "us-central1" ip_range = "169.254.1.1/30" - vpn_tunnel = "${google_compute_vpn_tunnel.tunnel4.name}" + vpn_tunnel = google_compute_vpn_tunnel.tunnel4.name } resource "google_compute_router_peer" "router2_peer2" { - provider = "google-beta" + provider = google-beta name = "router2-peer2" - router = "${google_compute_router.router2.name}" + router = google_compute_router.router2.name region = "us-central1" peer_ip_address = "169.254.1.2" peer_asn = 64514 advertised_route_priority = 100 - interface = "${google_compute_router_interface.router2_interface2.name}" -} \ No newline at end of file + interface = google_compute_router_interface.router2_interface2.name +} diff --git a/templates/terraform/examples/health_check_http.tf.erb b/templates/terraform/examples/health_check_http.tf.erb index 36ed60ee5395..bb9c776bbb48 100644 --- a/templates/terraform/examples/health_check_http.tf.erb +++ b/templates/terraform/examples/health_check_http.tf.erb @@ -1,10 +1,10 @@ resource "google_compute_health_check" "http-health-check" { - name = "<%= ctx[:vars]['health_check_name'] %>" + name = "<%= ctx[:vars]['health_check_name'] %>" - timeout_sec = 1 - check_interval_sec = 1 + timeout_sec = 1 + check_interval_sec = 1 - http_health_check { - port = 80 - } + http_health_check { + port = 80 + } } diff --git a/templates/terraform/examples/health_check_http2.tf.erb b/templates/terraform/examples/health_check_http2.tf.erb index 757d9bcca504..95c57512b903 100644 --- a/templates/terraform/examples/health_check_http2.tf.erb +++ b/templates/terraform/examples/health_check_http2.tf.erb @@ -1,10 +1,10 @@ resource "google_compute_health_check" "http2-health-check" { - name = "<%= ctx[:vars]['health_check_name'] %>" + name = "<%= ctx[:vars]['health_check_name'] %>" - timeout_sec = 1 - check_interval_sec = 1 + timeout_sec = 1 + check_interval_sec = 1 - http2_health_check { - port = "443" - } + http2_health_check { + port = "443" + } } diff --git a/templates/terraform/examples/health_check_http2_full.tf.erb b/templates/terraform/examples/health_check_http2_full.tf.erb index b19b9fb23a3f..737c96d8ae8a 100644 --- a/templates/terraform/examples/health_check_http2_full.tf.erb +++ b/templates/terraform/examples/health_check_http2_full.tf.erb @@ -1,5 +1,5 @@ resource "google_compute_health_check" "http2-health-check" { - name = "<%= ctx[:vars]['health_check_name'] %>" + name = "<%= ctx[:vars]['health_check_name'] %>" description = "Health check via http2" timeout_sec = 1 @@ -8,11 +8,11 @@ resource "google_compute_health_check" "http2-health-check" { unhealthy_threshold = 5 http2_health_check { - port_name = "health-check-port" + port_name = "health-check-port" port_specification = "USE_NAMED_PORT" - host = "1.2.3.4" - request_path = "/mypath" - proxy_header = "NONE" - response = "I AM HEALTHY" + host = "1.2.3.4" + request_path = "/mypath" + proxy_header = "NONE" + response = "I AM HEALTHY" } } diff --git a/templates/terraform/examples/health_check_http_full.tf.erb b/templates/terraform/examples/health_check_http_full.tf.erb index 1cb552c0c813..4d8a430c3343 100644 --- a/templates/terraform/examples/health_check_http_full.tf.erb +++ b/templates/terraform/examples/health_check_http_full.tf.erb @@ -1,5 +1,5 @@ resource "google_compute_health_check" "http-health-check" { - name = "<%= ctx[:vars]['health_check_name'] %>" + name = "<%= ctx[:vars]['health_check_name'] %>" description = "Health check via http" timeout_sec = 1 @@ -8,11 +8,11 @@ resource "google_compute_health_check" "http-health-check" { unhealthy_threshold = 5 http_health_check { - port_name = "health-check-port" + port_name = "health-check-port" port_specification = "USE_NAMED_PORT" - host = "1.2.3.4" - request_path = "/mypath" - proxy_header = "NONE" - response = "I AM HEALTHY" + host = "1.2.3.4" + request_path = "/mypath" + proxy_header = "NONE" + response = "I AM HEALTHY" } } diff --git a/templates/terraform/examples/health_check_https.tf.erb b/templates/terraform/examples/health_check_https.tf.erb index 0c41868b17ac..2d6e932cb369 100644 --- a/templates/terraform/examples/health_check_https.tf.erb +++ b/templates/terraform/examples/health_check_https.tf.erb @@ -1,10 +1,10 @@ resource "google_compute_health_check" "https-health-check" { - name = "<%= ctx[:vars]['health_check_name'] %>" + name = "<%= ctx[:vars]['health_check_name'] %>" - timeout_sec = 1 - check_interval_sec = 1 + timeout_sec = 1 + check_interval_sec = 1 - https_health_check { - port = "443" - } + https_health_check { + port = "443" + } } diff --git a/templates/terraform/examples/health_check_https_full.tf.erb b/templates/terraform/examples/health_check_https_full.tf.erb index 9369239fd687..0816179dd71d 100644 --- a/templates/terraform/examples/health_check_https_full.tf.erb +++ b/templates/terraform/examples/health_check_https_full.tf.erb @@ -1,5 +1,5 @@ resource "google_compute_health_check" "https-health-check" { - name = "<%= ctx[:vars]['health_check_name'] %>" + name = "<%= ctx[:vars]['health_check_name'] %>" description = "Health check via https" timeout_sec = 1 @@ -8,11 +8,11 @@ resource "google_compute_health_check" "https-health-check" { unhealthy_threshold = 5 https_health_check { - port_name = "health-check-port" + port_name = "health-check-port" port_specification = "USE_NAMED_PORT" - host = "1.2.3.4" - request_path = "/mypath" - proxy_header = "NONE" - response = "I AM HEALTHY" + host = "1.2.3.4" + request_path = "/mypath" + proxy_header = "NONE" + response = "I AM HEALTHY" } } diff --git a/templates/terraform/examples/health_check_ssl.tf.erb b/templates/terraform/examples/health_check_ssl.tf.erb index 0521af93a3bd..5e340b3b429c 100644 --- a/templates/terraform/examples/health_check_ssl.tf.erb +++ b/templates/terraform/examples/health_check_ssl.tf.erb @@ -1,12 +1,10 @@ resource "google_compute_health_check" "ssl-health-check" { - name = "<%= ctx[:vars]['health_check_name'] %>" + name = "<%= ctx[:vars]['health_check_name'] %>" - timeout_sec = 1 - check_interval_sec = 1 + timeout_sec = 1 + check_interval_sec = 1 - ssl_health_check { - port = "443" - } + ssl_health_check { + port = "443" + } } - - diff --git a/templates/terraform/examples/health_check_ssl_full.tf.erb b/templates/terraform/examples/health_check_ssl_full.tf.erb index 30e78578a421..9ea722c5d49a 100644 --- a/templates/terraform/examples/health_check_ssl_full.tf.erb +++ b/templates/terraform/examples/health_check_ssl_full.tf.erb @@ -1,5 +1,5 @@ resource "google_compute_health_check" "ssl-health-check" { - name = "<%= ctx[:vars]['health_check_name'] %>" + name = "<%= ctx[:vars]['health_check_name'] %>" description = "Health check via ssl" timeout_sec = 1 @@ -8,10 +8,10 @@ resource "google_compute_health_check" "ssl-health-check" { unhealthy_threshold = 5 ssl_health_check { - port_name = "health-check-port" + port_name = "health-check-port" port_specification = "USE_NAMED_PORT" - request = "ARE YOU HEALTHY?" - proxy_header = "NONE" - response = "I AM HEALTHY" + request = "ARE YOU HEALTHY?" + proxy_header = "NONE" + response = "I AM HEALTHY" } } diff --git a/templates/terraform/examples/health_check_tcp.tf.erb b/templates/terraform/examples/health_check_tcp.tf.erb index a0bcb7def6bd..c4ca9033189d 100644 --- a/templates/terraform/examples/health_check_tcp.tf.erb +++ b/templates/terraform/examples/health_check_tcp.tf.erb @@ -1,10 +1,10 @@ resource "google_compute_health_check" "tcp-health-check" { - name = "<%= ctx[:vars]['health_check_name'] %>" + name = "<%= ctx[:vars]['health_check_name'] %>" - timeout_sec = 1 - check_interval_sec = 1 + timeout_sec = 1 + check_interval_sec = 1 - tcp_health_check { - port = "80" - } + tcp_health_check { + port = "80" + } } diff --git a/templates/terraform/examples/health_check_tcp_full.tf.erb b/templates/terraform/examples/health_check_tcp_full.tf.erb index e452ebc54f60..2baf567275a8 100644 --- a/templates/terraform/examples/health_check_tcp_full.tf.erb +++ b/templates/terraform/examples/health_check_tcp_full.tf.erb @@ -1,5 +1,5 @@ resource "google_compute_health_check" "tcp-health-check" { - name = "<%= ctx[:vars]['health_check_name'] %>" + name = "<%= ctx[:vars]['health_check_name'] %>" description = "Health check via tcp" timeout_sec = 1 @@ -8,11 +8,10 @@ resource "google_compute_health_check" "tcp-health-check" { unhealthy_threshold = 5 tcp_health_check { - port_name = "health-check-port" + port_name = "health-check-port" port_specification = "USE_NAMED_PORT" - request = "ARE YOU HEALTHY?" - proxy_header = "NONE" - response = "I AM HEALTHY" + request = "ARE YOU HEALTHY?" + proxy_header = "NONE" + response = "I AM HEALTHY" } } - diff --git a/templates/terraform/examples/healthcare_dataset_basic.tf.erb b/templates/terraform/examples/healthcare_dataset_basic.tf.erb index 184b6ff103cb..a8c8c6b98615 100644 --- a/templates/terraform/examples/healthcare_dataset_basic.tf.erb +++ b/templates/terraform/examples/healthcare_dataset_basic.tf.erb @@ -1,6 +1,6 @@ resource "google_healthcare_dataset" "default" { - name = "<%= ctx[:vars]['dataset_name'] %>" - location = "us-central1" - time_zone = "UTC" - provider = "google-beta" + name = "<%= ctx[:vars]['dataset_name'] %>" + location = "us-central1" + time_zone = "UTC" + provider = google-beta } diff --git a/templates/terraform/examples/healthcare_dicom_store_basic.tf.erb b/templates/terraform/examples/healthcare_dicom_store_basic.tf.erb index f8bef37a4444..8828bb2294bb 100644 --- a/templates/terraform/examples/healthcare_dicom_store_basic.tf.erb +++ b/templates/terraform/examples/healthcare_dicom_store_basic.tf.erb @@ -1,25 +1,24 @@ resource "google_healthcare_dicom_store" "default" { - name = "<%= ctx[:vars]['dicom_store_name'] %>" - dataset = "${google_healthcare_dataset.dataset.id}" + name = "<%= ctx[:vars]['dicom_store_name'] %>" + dataset = google_healthcare_dataset.dataset.id notification_config { - pubsub_topic = "${google_pubsub_topic.topic.id}" + pubsub_topic = google_pubsub_topic.topic.id } labels = { label1 = "labelvalue1" } - provider = "google-beta" + provider = google-beta } resource "google_pubsub_topic" "topic" { - name = "<%= ctx[:vars]['pubsub_topic']%>" - provider = "google-beta" + name = "<%= ctx[:vars]['pubsub_topic']%>" + provider = google-beta } resource "google_healthcare_dataset" "dataset" { - name = "<%= ctx[:vars]['dataset_name'] %>" - location = "us-central1" - provider = "google-beta" + name = "<%= ctx[:vars]['dataset_name'] %>" + location = "us-central1" + provider = google-beta } - diff --git a/templates/terraform/examples/healthcare_fhir_store_basic.tf.erb b/templates/terraform/examples/healthcare_fhir_store_basic.tf.erb index 965b57f26db6..6c500b9c872b 100644 --- a/templates/terraform/examples/healthcare_fhir_store_basic.tf.erb +++ b/templates/terraform/examples/healthcare_fhir_store_basic.tf.erb @@ -1,6 +1,6 @@ resource "google_healthcare_fhir_store" "default" { - name = "<%= ctx[:vars]['fhir_store_name'] %>" - dataset = "${google_healthcare_dataset.dataset.id}" + name = "<%= ctx[:vars]['fhir_store_name'] %>" + dataset = google_healthcare_dataset.dataset.id enable_update_create = false disable_referential_integrity = false @@ -8,23 +8,22 @@ resource "google_healthcare_fhir_store" "default" { enable_history_import = false notification_config { - pubsub_topic = "${google_pubsub_topic.topic.id}" + pubsub_topic = google_pubsub_topic.topic.id } labels = { label1 = "labelvalue1" } - provider = "google-beta" + provider = google-beta } resource "google_pubsub_topic" "topic" { - name = "<%= ctx[:vars]['pubsub_topic']%>" - provider = "google-beta" + name = "<%= ctx[:vars]['pubsub_topic']%>" + provider = google-beta } resource "google_healthcare_dataset" "dataset" { - name = "<%= ctx[:vars]['dataset_name'] %>" - location = "us-central1" - provider = "google-beta" + name = "<%= ctx[:vars]['dataset_name'] %>" + location = "us-central1" + provider = google-beta } - diff --git a/templates/terraform/examples/healthcare_hl7_v2_store_basic.tf.erb b/templates/terraform/examples/healthcare_hl7_v2_store_basic.tf.erb index ec3e35057c95..c49aba55018e 100644 --- a/templates/terraform/examples/healthcare_hl7_v2_store_basic.tf.erb +++ b/templates/terraform/examples/healthcare_hl7_v2_store_basic.tf.erb @@ -1,30 +1,29 @@ resource "google_healthcare_hl7_v2_store" "default" { - name = "<%= ctx[:vars]['hl7_v2_store_name'] %>" - dataset = "${google_healthcare_dataset.dataset.id}" + name = "<%= ctx[:vars]['hl7_v2_store_name'] %>" + dataset = google_healthcare_dataset.dataset.id parser_config { - allow_null_header = false + allow_null_header = false segment_terminator = "Jw==" } notification_config { - pubsub_topic = "${google_pubsub_topic.topic.id}" + pubsub_topic = google_pubsub_topic.topic.id } labels = { label1 = "labelvalue1" } - provider = "google-beta" + provider = google-beta } resource "google_pubsub_topic" "topic" { - name = "<%= ctx[:vars]['pubsub_topic']%>" - provider = "google-beta" + name = "<%= ctx[:vars]['pubsub_topic']%>" + provider = google-beta } resource "google_healthcare_dataset" "dataset" { - name = "<%= ctx[:vars]['dataset_name'] %>" - location = "us-central1" - provider = "google-beta" + name = "<%= ctx[:vars]['dataset_name'] %>" + location = "us-central1" + provider = google-beta } - diff --git a/templates/terraform/examples/iap_app_engine_service.tf.erb b/templates/terraform/examples/iap_app_engine_service.tf.erb index 48ce29f3d49d..c1ec0be21d29 100644 --- a/templates/terraform/examples/iap_app_engine_service.tf.erb +++ b/templates/terraform/examples/iap_app_engine_service.tf.erb @@ -6,36 +6,36 @@ resource "google_project" "my_project" { } resource "google_project_service" "project_service" { - project = "${google_project.my_project.project_id}" + project = google_project.my_project.project_id service = "iap.googleapis.com" } resource "google_project_service" "cloudbuild_service" { - project = "${google_project_service.project_service.project}" + project = google_project_service.project_service.project service = "cloudbuild.googleapis.com" } resource "google_app_engine_application" "app" { - project = "${google_project_service.cloudbuild_service.project}" + project = google_project_service.cloudbuild_service.project location_id = "us-central" } resource "google_storage_bucket" "bucket" { - project = "${google_app_engine_application.app.project}" + project = google_app_engine_application.app.project name = "appengine-static-content-%{random_suffix}" } resource "google_storage_bucket_object" "object" { - name = "hello-world.zip" - bucket = "${google_storage_bucket.bucket.name}" - source = "./test-fixtures/appengine/hello-world.zip" + name = "hello-world.zip" + bucket = google_storage_bucket.bucket.name + source = "./test-fixtures/appengine/hello-world.zip" } resource "google_app_engine_standard_app_version" "version" { - project = "${google_app_engine_application.app.project}" - version_id = "v2" - service = "default" - runtime = "nodejs10" + project = google_app_engine_application.app.project + version_id = "v2" + service = "default" + runtime = "nodejs10" noop_on_destroy = true entrypoint { shell = "node ./app.js" @@ -48,4 +48,4 @@ resource "google_app_engine_standard_app_version" "version" { env_variables = { port = "8080" } -} \ No newline at end of file +} diff --git a/templates/terraform/examples/iap_app_engine_version.tf.erb b/templates/terraform/examples/iap_app_engine_version.tf.erb index 70f741cfa5ea..bcadc9012d03 100644 --- a/templates/terraform/examples/iap_app_engine_version.tf.erb +++ b/templates/terraform/examples/iap_app_engine_version.tf.erb @@ -1,17 +1,17 @@ resource "google_storage_bucket" "bucket" { - name = "appengine-static-content-%{random_suffix}" + name = "appengine-static-content-%{random_suffix}" } resource "google_storage_bucket_object" "object" { - name = "hello-world.zip" - bucket = "${google_storage_bucket.bucket.name}" - source = "./test-fixtures/appengine/hello-world.zip" + name = "hello-world.zip" + bucket = google_storage_bucket.bucket.name + source = "./test-fixtures/appengine/hello-world.zip" } resource "google_app_engine_standard_app_version" "version" { - version_id = "%{random_suffix}" - service = "default" - runtime = "nodejs10" + version_id = "%{random_suffix}" + service = "default" + runtime = "nodejs10" noop_on_destroy = false entrypoint { shell = "node ./app.js" @@ -24,4 +24,4 @@ resource "google_app_engine_standard_app_version" "version" { env_variables = { port = "8080" } -} \ No newline at end of file +} diff --git a/templates/terraform/examples/iap_appengine.tf.erb b/templates/terraform/examples/iap_appengine.tf.erb index 931226248fd6..a1af1e206dc2 100644 --- a/templates/terraform/examples/iap_appengine.tf.erb +++ b/templates/terraform/examples/iap_appengine.tf.erb @@ -1,15 +1,15 @@ resource "google_project" "my_project" { - name = "%{project_id}" - project_id = "%{project_id}" - org_id = "%{org_id}" + name = "%{project_id}" + project_id = "%{project_id}" + org_id = "%{org_id}" } resource "google_project_service" "project_service" { - project = "${google_project.my_project.project_id}" - service = "iap.googleapis.com" + project = google_project.my_project.project_id + service = "iap.googleapis.com" } resource "google_app_engine_application" "app" { - project = "${google_project_service.project_service.project}" - location_id = "us-central" + project = google_project_service.project_service.project + location_id = "us-central" } diff --git a/templates/terraform/examples/iap_project.tf.erb b/templates/terraform/examples/iap_project.tf.erb index 8d93a6af5a0e..53737074febb 100644 --- a/templates/terraform/examples/iap_project.tf.erb +++ b/templates/terraform/examples/iap_project.tf.erb @@ -1,10 +1,10 @@ resource "google_project" "project" { - project_id = "tf-test%{random_suffix}" - name = "tf-test%{random_suffix}" - org_id = "%{org_id}" + project_id = "tf-test%{random_suffix}" + name = "tf-test%{random_suffix}" + org_id = "%{org_id}" } resource "google_project_service" "project_service" { - project = "${google_project.project.project_id}" - service = "iap.googleapis.com" + project = google_project.project.project_id + service = "iap.googleapis.com" } diff --git a/templates/terraform/examples/instance_with_ip.tf.erb b/templates/terraform/examples/instance_with_ip.tf.erb index bd852bb598d1..eb5e63acf2f0 100644 --- a/templates/terraform/examples/instance_with_ip.tf.erb +++ b/templates/terraform/examples/instance_with_ip.tf.erb @@ -3,25 +3,25 @@ resource "google_compute_address" "<%= ctx[:primary_resource_id] %>" { } data "google_compute_image" "debian_image" { - family = "debian-9" - project = "debian-cloud" + family = "debian-9" + project = "debian-cloud" } resource "google_compute_instance" "instance_with_ip" { - name = "<%= ctx[:vars]['instance_name'] %>" - machine_type = "f1-micro" - zone = "us-central1-a" + name = "<%= ctx[:vars]['instance_name'] %>" + machine_type = "f1-micro" + zone = "us-central1-a" - boot_disk { - initialize_params{ - image = "${data.google_compute_image.debian_image.self_link}" - } - } + boot_disk { + initialize_params { + image = data.google_compute_image.debian_image.self_link + } + } - network_interface { - network = "default" - access_config { - nat_ip = "${google_compute_address.static.address}" - } - } + network_interface { + network = "default" + access_config { + nat_ip = google_compute_address.static.address + } + } } diff --git a/templates/terraform/examples/interconnect_attachment_basic.tf.erb b/templates/terraform/examples/interconnect_attachment_basic.tf.erb index d720bf118c68..fbba255e8d09 100644 --- a/templates/terraform/examples/interconnect_attachment_basic.tf.erb +++ b/templates/terraform/examples/interconnect_attachment_basic.tf.erb @@ -1,10 +1,10 @@ resource "google_compute_interconnect_attachment" "<%= ctx[:primary_resource_id] %>" { name = "<%= ctx[:vars]['interconnect_attachment_name'] %>" interconnect = "my-interconnect-id" - router = "${google_compute_router.foobar.self_link}" + router = google_compute_router.foobar.self_link } resource "google_compute_router" "foobar" { name = "<%= ctx[:vars]['router_name'] %>" - network = "${google_compute_network.foobar.name}" + network = google_compute_network.foobar.name } diff --git a/templates/terraform/examples/kms_crypto_key_asymmetric_sign.tf.erb b/templates/terraform/examples/kms_crypto_key_asymmetric_sign.tf.erb index 9c2533190adc..2d3152d67351 100644 --- a/templates/terraform/examples/kms_crypto_key_asymmetric_sign.tf.erb +++ b/templates/terraform/examples/kms_crypto_key_asymmetric_sign.tf.erb @@ -5,7 +5,7 @@ resource "google_kms_key_ring" "keyring" { resource "google_kms_crypto_key" "<%= ctx[:primary_resource_id] %>" { name = "crypto-key-example" - 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/kms_crypto_key_basic.tf.erb b/templates/terraform/examples/kms_crypto_key_basic.tf.erb index 2444cfc0ded4..9e95e976cce0 100644 --- a/templates/terraform/examples/kms_crypto_key_basic.tf.erb +++ b/templates/terraform/examples/kms_crypto_key_basic.tf.erb @@ -1,11 +1,11 @@ resource "google_kms_key_ring" "keyring" { - name = "keyring-example" + name = "keyring-example" location = "global" } resource "google_kms_crypto_key" "<%= ctx[:primary_resource_id] %>" { name = "crypto-key-example" - key_ring = "${google_kms_key_ring.keyring.self_link}" + key_ring = google_kms_key_ring.keyring.self_link rotation_period = "100000s" lifecycle { diff --git a/templates/terraform/examples/kms_key_ring_basic.tf.erb b/templates/terraform/examples/kms_key_ring_basic.tf.erb index 70ccead587de..998e29d1f832 100644 --- a/templates/terraform/examples/kms_key_ring_basic.tf.erb +++ b/templates/terraform/examples/kms_key_ring_basic.tf.erb @@ -1,4 +1,4 @@ resource "google_kms_key_ring" "<%= ctx[:primary_resource_id] %>" { - name = "keyring-example" + name = "keyring-example" location = "global" } 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_basic.tf.erb b/templates/terraform/examples/logging_metric_counter_basic.tf.erb index 018bed142a4d..f6af100da121 100644 --- a/templates/terraform/examples/logging_metric_counter_basic.tf.erb +++ b/templates/terraform/examples/logging_metric_counter_basic.tf.erb @@ -1,8 +1,8 @@ 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" } } 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/managed_ssl_certificate_basic.tf.erb b/templates/terraform/examples/managed_ssl_certificate_basic.tf.erb index b9659404dea7..fce3f3fe2403 100644 --- a/templates/terraform/examples/managed_ssl_certificate_basic.tf.erb +++ b/templates/terraform/examples/managed_ssl_certificate_basic.tf.erb @@ -1,5 +1,5 @@ resource "google_compute_managed_ssl_certificate" "default" { - provider = "google-beta" + provider = google-beta name = "<%= ctx[:vars]['cert_name'] %>" @@ -9,20 +9,20 @@ resource "google_compute_managed_ssl_certificate" "default" { } resource "google_compute_target_https_proxy" "default" { - provider = "google-beta" + provider = google-beta name = "<%= ctx[:vars]['proxy_name'] %>" - url_map = "${google_compute_url_map.default.self_link}" - ssl_certificates = ["${google_compute_managed_ssl_certificate.default.self_link}"] + url_map = google_compute_url_map.default.self_link + ssl_certificates = [google_compute_managed_ssl_certificate.default.self_link] } resource "google_compute_url_map" "default" { - provider = "google-beta" + provider = google-beta name = "<%= ctx[:vars]['url_map_name'] %>" description = "a description" - default_service = "${google_compute_backend_service.default.self_link}" + default_service = google_compute_backend_service.default.self_link host_rule { hosts = ["sslcert.tf-test.club"] @@ -31,28 +31,28 @@ resource "google_compute_url_map" "default" { path_matcher { name = "allpaths" - default_service = "${google_compute_backend_service.default.self_link}" + default_service = google_compute_backend_service.default.self_link path_rule { paths = ["/*"] - service = "${google_compute_backend_service.default.self_link}" + service = google_compute_backend_service.default.self_link } } } resource "google_compute_backend_service" "default" { - provider = "google-beta" + provider = google-beta name = "<%= ctx[:vars]['backend_service_name'] %>" port_name = "http" protocol = "HTTP" timeout_sec = 10 - health_checks = ["${google_compute_http_health_check.default.self_link}"] + health_checks = [google_compute_http_health_check.default.self_link] } resource "google_compute_http_health_check" "default" { - provider = "google-beta" + provider = google-beta name = "<%= ctx[:vars]['http_health_check_name'] %>" request_path = "/" @@ -61,31 +61,31 @@ resource "google_compute_http_health_check" "default" { } resource "google_dns_managed_zone" "zone" { - provider = "google-beta" + provider = google-beta name = "<%= ctx[:vars]['dns_zone_name'] %>" dns_name = "sslcert.tf-test.club." } resource "google_compute_global_forwarding_rule" "default" { - provider = "google-beta" + provider = google-beta name = "<%= ctx[:vars]['forwarding_rule_name'] %>" - target = "${google_compute_target_https_proxy.default.self_link}" + target = google_compute_target_https_proxy.default.self_link port_range = 443 } resource "google_dns_record_set" "set" { - provider = "google-beta" + provider = google-beta name = "sslcert.tf-test.club." type = "A" ttl = 3600 - managed_zone = "${google_dns_managed_zone.zone.name}" - rrdatas = ["${google_compute_global_forwarding_rule.default.ip_address}"] + managed_zone = google_dns_managed_zone.zone.name + rrdatas = [google_compute_global_forwarding_rule.default.ip_address] } -provider "google-beta"{ +provider "google-beta" { region = "us-central1" zone = "us-central1-a" } diff --git a/templates/terraform/examples/ml_model_basic.tf.erb b/templates/terraform/examples/ml_model_basic.tf.erb index 879090fae990..b99930e9f974 100644 --- a/templates/terraform/examples/ml_model_basic.tf.erb +++ b/templates/terraform/examples/ml_model_basic.tf.erb @@ -1,5 +1,5 @@ resource "google_ml_engine_model" "<%= ctx[:primary_resource_id] -%>" { - name = "<%= ctx[:vars]['model_name'] -%>" + name = "<%= ctx[:vars]['model_name'] -%>" description = "My model" - regions = ["us-central1"] + regions = ["us-central1"] } diff --git a/templates/terraform/examples/ml_model_full.tf.erb b/templates/terraform/examples/ml_model_full.tf.erb index 7590028bce17..5bd76110e7e9 100644 --- a/templates/terraform/examples/ml_model_full.tf.erb +++ b/templates/terraform/examples/ml_model_full.tf.erb @@ -1,10 +1,10 @@ resource "google_ml_engine_model" "<%= ctx[:primary_resource_id] -%>" { - name = "<%= ctx[:vars]['model_name'] -%>" + name = "<%= ctx[:vars]['model_name'] -%>" description = "My model" - regions = ["us-central1"] - labels = { + regions = ["us-central1"] + labels = { my_model = "foo" } - online_prediction_logging = true + online_prediction_logging = true online_prediction_console_logging = true } diff --git a/templates/terraform/examples/monitoring_alert_policy_basic.tf.erb b/templates/terraform/examples/monitoring_alert_policy_basic.tf.erb index b87a791c9158..0a3b2f487b40 100644 --- a/templates/terraform/examples/monitoring_alert_policy_basic.tf.erb +++ b/templates/terraform/examples/monitoring_alert_policy_basic.tf.erb @@ -1,14 +1,14 @@ resource "google_monitoring_alert_policy" "<%= ctx[:primary_resource_id] %>" { display_name = "<%= ctx[:vars]["alert_policy_display_name"] %>" - combiner = "OR" + combiner = "OR" conditions { display_name = "test condition" condition_threshold { - filter = "metric.type=\"compute.googleapis.com/instance/disk/write_bytes_count\" AND resource.type=\"gce_instance\"" - duration = "60s" + filter = "metric.type=\"compute.googleapis.com/instance/disk/write_bytes_count\" AND resource.type=\"gce_instance\"" + duration = "60s" comparison = "COMPARISON_GT" aggregations { - alignment_period = "60s" + alignment_period = "60s" per_series_aligner = "ALIGN_RATE" } } diff --git a/templates/terraform/examples/monitoring_group_subgroup.tf.erb b/templates/terraform/examples/monitoring_group_subgroup.tf.erb index 2ad154ed2898..1659a9efbef4 100644 --- a/templates/terraform/examples/monitoring_group_subgroup.tf.erb +++ b/templates/terraform/examples/monitoring_group_subgroup.tf.erb @@ -1,10 +1,10 @@ resource "google_monitoring_group" "parent" { display_name = "<%= ctx[:vars]["display_name"] %>" - filter = "resource.metadata.region=\"europe-west2\"" + filter = "resource.metadata.region=\"europe-west2\"" } resource "google_monitoring_group" "<%= ctx[:primary_resource_id] %>" { display_name = "<%= ctx[:vars]["display_name"] %>" - filter = "resource.metadata.region=\"europe-west2\"" - parent_name = "${google_monitoring_group.parent.name}" -} \ No newline at end of file + filter = "resource.metadata.region=\"europe-west2\"" + parent_name = google_monitoring_group.parent.name +} diff --git a/templates/terraform/examples/network_endpoint.tf.erb b/templates/terraform/examples/network_endpoint.tf.erb index 4e51553c5714..52ad5025ebb5 100644 --- a/templates/terraform/examples/network_endpoint.tf.erb +++ b/templates/terraform/examples/network_endpoint.tf.erb @@ -1,9 +1,9 @@ resource "google_compute_network_endpoint" "<%= ctx[:primary_resource_id] %>" { - network_endpoint_group = "${google_compute_network_endpoint_group.neg.name}" + network_endpoint_group = google_compute_network_endpoint_group.neg.name - instance = "${google_compute_instance.endpoint-instance.name}" - port = "${google_compute_network_endpoint_group.neg.default_port}" - ip_address = "${google_compute_instance.endpoint-instance.network_interface.0.network_ip}" + instance = google_compute_instance.endpoint-instance.name + port = google_compute_network_endpoint_group.neg.default_port + ip_address = google_compute_instance.endpoint-instance.network_interface[0].network_ip } data "google_compute_image" "my_image" { @@ -12,31 +12,32 @@ data "google_compute_image" "my_image" { } resource "google_compute_instance" "endpoint-instance" { - name = "<%= ctx[:vars]['instance_name'] %>" + name = "<%= ctx[:vars]['instance_name'] %>" machine_type = "n1-standard-1" boot_disk { - initialize_params{ - image = "${data.google_compute_image.my_image.self_link}" + initialize_params { + image = data.google_compute_image.my_image.self_link } } network_interface { - subnetwork = "${google_compute_subnetwork.default.self_link}" - access_config { } + subnetwork = google_compute_subnetwork.default.self_link + access_config { + } } } resource "google_compute_network_endpoint_group" "group" { name = "<%= ctx[:vars]['neg_name'] %>" - network = "${google_compute_network.default.self_link}" - subnetwork = "${google_compute_subnetwork.default.self_link}" + network = google_compute_network.default.self_link + subnetwork = google_compute_subnetwork.default.self_link default_port = "90" zone = "us-central1-a" } resource "google_compute_network" "default" { - name = "<%= ctx[:vars]['network_name'] %>" + name = "<%= ctx[:vars]['network_name'] %>" auto_create_subnetworks = false } @@ -44,5 +45,5 @@ resource "google_compute_subnetwork" "default" { name = "<%= ctx[:vars]['subnetwork_name'] %>" ip_cidr_range = "10.0.0.1/16" region = "us-central1" - network = "${google_compute_network.default.self_link}" + network = google_compute_network.default.self_link } diff --git a/templates/terraform/examples/network_endpoint_group.tf.erb b/templates/terraform/examples/network_endpoint_group.tf.erb index db3200ee6ccf..693d60782028 100644 --- a/templates/terraform/examples/network_endpoint_group.tf.erb +++ b/templates/terraform/examples/network_endpoint_group.tf.erb @@ -1,13 +1,13 @@ resource "google_compute_network_endpoint_group" "<%= ctx[:primary_resource_id] %>" { name = "<%= ctx[:vars]['neg_name'] %>" - network = "${google_compute_network.default.self_link}" - subnetwork = "${google_compute_subnetwork.default.self_link}" + network = google_compute_network.default.self_link + subnetwork = google_compute_subnetwork.default.self_link default_port = "90" zone = "us-central1-a" } resource "google_compute_network" "default" { - name = "<%= ctx[:vars]['network_name'] %>" + name = "<%= ctx[:vars]['network_name'] %>" auto_create_subnetworks = false } @@ -15,5 +15,5 @@ resource "google_compute_subnetwork" "default" { name = "<%= ctx[:vars]['subnetwork_name'] %>" ip_cidr_range = "10.0.0.0/16" region = "us-central1" - network = "${google_compute_network.default.self_link}" + network = google_compute_network.default.self_link } diff --git a/templates/terraform/examples/node_group_basic.tf.erb b/templates/terraform/examples/node_group_basic.tf.erb index fc303a227944..821d7e16cb40 100644 --- a/templates/terraform/examples/node_group_basic.tf.erb +++ b/templates/terraform/examples/node_group_basic.tf.erb @@ -3,16 +3,16 @@ data "google_compute_node_types" "central1a" { } resource "google_compute_node_template" "soletenant-tmpl" { - name = "<%= ctx[:vars]['template_name'] %>" - region = "us-central1" - node_type = "${data.google_compute_node_types.central1a.names[0]}" + name = "<%= ctx[:vars]['template_name'] %>" + region = "us-central1" + node_type = data.google_compute_node_types.central1a.names[0] } resource "google_compute_node_group" "<%= ctx[:primary_resource_id] %>" { - name = "<%= ctx[:vars]['group_name'] %>" - zone = "us-central1-a" + name = "<%= ctx[:vars]['group_name'] %>" + zone = "us-central1-a" description = "example google_compute_node_group for Terraform Google Provider" - size = 1 - node_template = "${google_compute_node_template.soletenant-tmpl.self_link}" + size = 1 + node_template = google_compute_node_template.soletenant-tmpl.self_link } diff --git a/templates/terraform/examples/node_template_basic.tf.erb b/templates/terraform/examples/node_template_basic.tf.erb index b67e465e6148..7dc0ce41c03d 100644 --- a/templates/terraform/examples/node_template_basic.tf.erb +++ b/templates/terraform/examples/node_template_basic.tf.erb @@ -3,7 +3,7 @@ data "google_compute_node_types" "central1a" { } resource "google_compute_node_template" "<%= ctx[:primary_resource_id] %>" { - name = "<%= ctx[:vars]['template_name'] %>" - region = "us-central1" - node_type = "${data.google_compute_node_types.central1a.names[0]}" + name = "<%= ctx[:vars]['template_name'] %>" + region = "us-central1" + node_type = data.google_compute_node_types.central1a.names[0] } diff --git a/templates/terraform/examples/node_template_server_binding.tf.erb b/templates/terraform/examples/node_template_server_binding.tf.erb index 2aac44490164..f300437aa4dc 100644 --- a/templates/terraform/examples/node_template_server_binding.tf.erb +++ b/templates/terraform/examples/node_template_server_binding.tf.erb @@ -4,16 +4,16 @@ provider "google-beta" { } data "google_compute_node_types" "central1a" { - provider = "google-beta" - zone = "us-central1-a" + provider = google-beta + zone = "us-central1-a" } resource "google_compute_node_template" "<%= ctx[:primary_resource_id] %>" { - provider = "google-beta" + provider = google-beta - name = "<%= ctx[:vars]['template_name'] %>" - region = "us-central1" - node_type = "${data.google_compute_node_types.central1a.names[0]}" + name = "<%= ctx[:vars]['template_name'] %>" + region = "us-central1" + node_type = data.google_compute_node_types.central1a.names[0] node_affinity_labels = { foo = "baz" @@ -23,4 +23,3 @@ resource "google_compute_node_template" "<%= ctx[:primary_resource_id] %>" { type = "RESTART_NODE_ON_MINIMAL_SERVERS" } } - diff --git a/templates/terraform/examples/notification_channel_basic.tf.erb b/templates/terraform/examples/notification_channel_basic.tf.erb index 421e3acef35d..b5b4a5a8d7ad 100644 --- a/templates/terraform/examples/notification_channel_basic.tf.erb +++ b/templates/terraform/examples/notification_channel_basic.tf.erb @@ -1,7 +1,7 @@ resource "google_monitoring_notification_channel" "<%= ctx[:primary_resource_id] %>" { display_name = "<%= ctx[:vars]["display_name"] %>" - type = "email" + type = "email" labels = { email_address = "fake_email@blahblah.com" } -} \ No newline at end of file +} diff --git a/templates/terraform/examples/pubsub_subscription_different_project.tf.erb b/templates/terraform/examples/pubsub_subscription_different_project.tf.erb index eeebc111ace3..4bf08dfe2460 100644 --- a/templates/terraform/examples/pubsub_subscription_different_project.tf.erb +++ b/templates/terraform/examples/pubsub_subscription_different_project.tf.erb @@ -6,5 +6,5 @@ resource "google_pubsub_topic" "<%= ctx[:primary_resource_id] %>" { resource "google_pubsub_subscription" "<%= ctx[:primary_resource_id] %>" { project = "<%= ctx[:vars]['subscription_project'] %>" name = "<%= ctx[:vars]['subscription_name'] %>" - topic = "${google_pubsub_topic.<%= ctx[:primary_resource_id] %>.name}" + topic = google_pubsub_topic.<%= ctx[:primary_resource_id] %>.name } diff --git a/templates/terraform/examples/pubsub_subscription_pull.tf.erb b/templates/terraform/examples/pubsub_subscription_pull.tf.erb index b9e6c6590418..ed42cee630c2 100644 --- a/templates/terraform/examples/pubsub_subscription_pull.tf.erb +++ b/templates/terraform/examples/pubsub_subscription_pull.tf.erb @@ -4,7 +4,7 @@ resource "google_pubsub_topic" "<%= ctx[:primary_resource_id] %>" { resource "google_pubsub_subscription" "<%= ctx[:primary_resource_id] %>" { name = "<%= ctx[:vars]['subscription_name'] %>" - topic = "${google_pubsub_topic.<%= ctx[:primary_resource_id] %>.name}" + topic = google_pubsub_topic.<%= ctx[:primary_resource_id] %>.name labels = { foo = "bar" @@ -12,7 +12,7 @@ resource "google_pubsub_subscription" "<%= ctx[:primary_resource_id] %>" { # 20 minutes message_retention_duration = "1200s" - retain_acked_messages = true + retain_acked_messages = true ack_deadline_seconds = 20 diff --git a/templates/terraform/examples/pubsub_subscription_push.tf.erb b/templates/terraform/examples/pubsub_subscription_push.tf.erb index b631dfd30976..690cbca6aa6e 100644 --- a/templates/terraform/examples/pubsub_subscription_push.tf.erb +++ b/templates/terraform/examples/pubsub_subscription_push.tf.erb @@ -4,7 +4,7 @@ resource "google_pubsub_topic" "<%= ctx[:primary_resource_id] %>" { resource "google_pubsub_subscription" "<%= ctx[:primary_resource_id] %>" { name = "<%= ctx[:vars]['subscription_name'] %>" - topic = "${google_pubsub_topic.<%= ctx[:primary_resource_id] %>.name}" + topic = google_pubsub_topic.<%= ctx[:primary_resource_id] %>.name ack_deadline_seconds = 20 @@ -15,7 +15,7 @@ resource "google_pubsub_subscription" "<%= ctx[:primary_resource_id] %>" { push_config { push_endpoint = "https://example.com/push" - attributes { + attributes = { x-goog-version = "v1" } } diff --git a/templates/terraform/examples/pubsub_topic_cmek.tf.erb b/templates/terraform/examples/pubsub_topic_cmek.tf.erb index 9acefaef0d42..974de2457c3a 100644 --- a/templates/terraform/examples/pubsub_topic_cmek.tf.erb +++ b/templates/terraform/examples/pubsub_topic_cmek.tf.erb @@ -1,11 +1,11 @@ resource "google_pubsub_topic" "<%= ctx[:primary_resource_id] %>" { name = "<%= ctx[:vars]['topic_name'] %>" - kms_key_name = "${google_kms_crypto_key.crypto_key.self_link}" + kms_key_name = google_kms_crypto_key.crypto_key.self_link } resource "google_kms_crypto_key" "crypto_key" { name = "<%= ctx[:vars]['key_name'] %>" - key_ring = "${google_kms_key_ring.key_ring.self_link}" + key_ring = google_kms_key_ring.key_ring.self_link } resource "google_kms_key_ring" "key_ring" { diff --git a/templates/terraform/examples/pubsub_topic_geo_restricted.tf.erb b/templates/terraform/examples/pubsub_topic_geo_restricted.tf.erb index 75e066391426..c082d009b841 100644 --- a/templates/terraform/examples/pubsub_topic_geo_restricted.tf.erb +++ b/templates/terraform/examples/pubsub_topic_geo_restricted.tf.erb @@ -6,5 +6,4 @@ resource "google_pubsub_topic" "<%= ctx[:primary_resource_id] %>" { "europe-west3", ] } - } diff --git a/templates/terraform/examples/redis_instance_full.tf.erb b/templates/terraform/examples/redis_instance_full.tf.erb index d15e44de0b5a..e48484fbf1b6 100644 --- a/templates/terraform/examples/redis_instance_full.tf.erb +++ b/templates/terraform/examples/redis_instance_full.tf.erb @@ -6,7 +6,7 @@ resource "google_redis_instance" "<%= ctx[:primary_resource_id] %>" { location_id = "us-central1-a" alternative_location_id = "us-central1-f" - authorized_network = "${google_compute_network.auto-network.self_link}" + authorized_network = google_compute_network.auto-network.self_link redis_version = "REDIS_3_2" display_name = "Terraform Test Instance" diff --git a/templates/terraform/examples/region_autoscaler_basic.tf.erb b/templates/terraform/examples/region_autoscaler_basic.tf.erb index 5565149beff6..51e7937056f4 100644 --- a/templates/terraform/examples/region_autoscaler_basic.tf.erb +++ b/templates/terraform/examples/region_autoscaler_basic.tf.erb @@ -1,7 +1,7 @@ resource "google_compute_region_autoscaler" "foobar" { name = "<%= ctx[:vars]['region_autoscaler_name'] %>" region = "us-central1" - target = "${google_compute_region_instance_group_manager.foobar.self_link}" + target = google_compute_region_instance_group_manager.foobar.self_link autoscaling_policy { max_replicas = 5 @@ -22,7 +22,7 @@ resource "google_compute_instance_template" "foobar" { tags = ["foo", "bar"] disk { - source_image = "${data.google_compute_image.debian_9.self_link}" + source_image = data.google_compute_image.debian_9.self_link } network_interface { @@ -46,13 +46,13 @@ resource "google_compute_region_instance_group_manager" "foobar" { name = "<%= ctx[:vars]['rigm_name'] %>" region = "us-central1" - instance_template = "${google_compute_instance_template.foobar.self_link}" + instance_template = google_compute_instance_template.foobar.self_link - target_pools = ["${google_compute_target_pool.foobar.self_link}"] + target_pools = [google_compute_target_pool.foobar.self_link] base_instance_name = "foobar" } data "google_compute_image" "debian_9" { - family = "debian-9" - project = "debian-cloud" + family = "debian-9" + project = "debian-cloud" } diff --git a/templates/terraform/examples/region_autoscaler_beta.tf.erb b/templates/terraform/examples/region_autoscaler_beta.tf.erb index 2aa87b54ec44..1049f226965e 100644 --- a/templates/terraform/examples/region_autoscaler_beta.tf.erb +++ b/templates/terraform/examples/region_autoscaler_beta.tf.erb @@ -1,9 +1,9 @@ resource "google_compute_region_autoscaler" "foobar" { - provider = "google-beta" + provider = google-beta name = "<%= ctx[:vars]['region_autoscaler_name'] %>" region = "us-central1" - target = "${google_compute_region_instance_group_manager.foobar.self_link}" + target = google_compute_region_instance_group_manager.foobar.self_link autoscaling_policy { max_replicas = 5 @@ -17,7 +17,7 @@ resource "google_compute_region_autoscaler" "foobar" { } resource "google_compute_instance_template" "foobar" { - provider = "google-beta" + provider = google-beta name = "<%= ctx[:vars]['instance_template_name'] %>" machine_type = "n1-standard-1" @@ -26,7 +26,7 @@ resource "google_compute_instance_template" "foobar" { tags = ["foo", "bar"] disk { - source_image = "${data.google_compute_image.debian_9.self_link}" + source_image = data.google_compute_image.debian_9.self_link } network_interface { @@ -43,34 +43,34 @@ resource "google_compute_instance_template" "foobar" { } resource "google_compute_target_pool" "foobar" { - provider = "google-beta" + provider = google-beta name = "<%= ctx[:vars]['target_pool_name'] %>" } resource "google_compute_region_instance_group_manager" "foobar" { - provider = "google-beta" + provider = google-beta name = "<%= ctx[:vars]['rigm_name'] %>" region = "us-central1" version { - instance_template = "${google_compute_instance_template.foobar.self_link}" - name = "primary" + instance_template = google_compute_instance_template.foobar.self_link + name = "primary" } - target_pools = ["${google_compute_target_pool.foobar.self_link}"] + target_pools = [google_compute_target_pool.foobar.self_link] base_instance_name = "foobar" } data "google_compute_image" "debian_9" { - provider = "google-beta" + provider = google-beta - family = "debian-9" - project = "debian-cloud" + family = "debian-9" + project = "debian-cloud" } -provider "google-beta"{ +provider "google-beta" { region = "us-central1" zone = "us-central1-a" } diff --git a/templates/terraform/examples/region_backend_service_basic.tf.erb b/templates/terraform/examples/region_backend_service_basic.tf.erb index 0f49480b1b75..b7a04720e926 100644 --- a/templates/terraform/examples/region_backend_service_basic.tf.erb +++ b/templates/terraform/examples/region_backend_service_basic.tf.erb @@ -1,7 +1,7 @@ resource "google_compute_region_backend_service" "<%= ctx[:primary_resource_id] %>" { name = "<%= ctx[:vars]['region_backend_service_name'] %>" region = "us-central1" - health_checks = ["${google_compute_health_check.default.self_link}"] + health_checks = [google_compute_health_check.default.self_link] connection_draining_timeout_sec = 10 session_affinity = "CLIENT_IP" } diff --git a/templates/terraform/examples/region_disk_basic.tf.erb b/templates/terraform/examples/region_disk_basic.tf.erb index dc00113d21f2..52726d6d9277 100644 --- a/templates/terraform/examples/region_disk_basic.tf.erb +++ b/templates/terraform/examples/region_disk_basic.tf.erb @@ -1,23 +1,23 @@ resource "google_compute_region_disk" "regiondisk" { - name = "<%= ctx[:vars]['region_disk_name'] %>" - snapshot = "${google_compute_snapshot.snapdisk.self_link}" - type = "pd-ssd" - region = "us-central1" + name = "<%= ctx[:vars]['region_disk_name'] %>" + snapshot = google_compute_snapshot.snapdisk.self_link + type = "pd-ssd" + region = "us-central1" physical_block_size_bytes = 4096 replica_zones = ["us-central1-a", "us-central1-f"] } resource "google_compute_disk" "disk" { - name = "<%= ctx[:vars]['disk_name'] %>" + name = "<%= ctx[:vars]['disk_name'] %>" image = "debian-cloud/debian-9" - size = 50 - type = "pd-ssd" - zone = "us-central1-a" + size = 50 + type = "pd-ssd" + zone = "us-central1-a" } resource "google_compute_snapshot" "snapdisk" { - name = "<%= ctx[:vars]['snapshot_name'] %>" - source_disk = "${google_compute_disk.disk.name}" - zone = "us-central1-a" + name = "<%= ctx[:vars]['snapshot_name'] %>" + source_disk = google_compute_disk.disk.name + zone = "us-central1-a" } diff --git a/templates/terraform/examples/region_health_check_http.tf.erb b/templates/terraform/examples/region_health_check_http.tf.erb index 99c8adab1956..eab516fcb12a 100644 --- a/templates/terraform/examples/region_health_check_http.tf.erb +++ b/templates/terraform/examples/region_health_check_http.tf.erb @@ -1,6 +1,6 @@ resource "google_compute_region_health_check" "http-region-health-check" { - provider = "google-beta" - name = "<%= ctx[:vars]['health_check_name'] %>" + provider = google-beta + name = "<%= ctx[:vars]['health_check_name'] %>" timeout_sec = 1 check_interval_sec = 1 diff --git a/templates/terraform/examples/region_health_check_http2.tf.erb b/templates/terraform/examples/region_health_check_http2.tf.erb index fe560e571066..f82a15ed7ef3 100644 --- a/templates/terraform/examples/region_health_check_http2.tf.erb +++ b/templates/terraform/examples/region_health_check_http2.tf.erb @@ -1,6 +1,6 @@ resource "google_compute_region_health_check" "http2-region-health-check" { - provider = "google-beta" - name = "<%= ctx[:vars]['health_check_name'] %>" + provider = google-beta + name = "<%= ctx[:vars]['health_check_name'] %>" timeout_sec = 1 check_interval_sec = 1 diff --git a/templates/terraform/examples/region_health_check_http2_full.tf.erb b/templates/terraform/examples/region_health_check_http2_full.tf.erb index 5bd4738a27b5..4d68b92ff56b 100644 --- a/templates/terraform/examples/region_health_check_http2_full.tf.erb +++ b/templates/terraform/examples/region_health_check_http2_full.tf.erb @@ -1,6 +1,6 @@ resource "google_compute_region_health_check" "http2-region-health-check" { - provider = "google-beta" - name = "<%= ctx[:vars]['health_check_name'] %>" + provider = google-beta + name = "<%= ctx[:vars]['health_check_name'] %>" description = "Health check via http2" timeout_sec = 1 @@ -9,11 +9,11 @@ resource "google_compute_region_health_check" "http2-region-health-check" { unhealthy_threshold = 5 http2_health_check { - port_name = "health-check-port" + port_name = "health-check-port" port_specification = "USE_NAMED_PORT" - host = "1.2.3.4" - request_path = "/mypath" - proxy_header = "NONE" - response = "I AM HEALTHY" + host = "1.2.3.4" + request_path = "/mypath" + proxy_header = "NONE" + response = "I AM HEALTHY" } } diff --git a/templates/terraform/examples/region_health_check_http_full.tf.erb b/templates/terraform/examples/region_health_check_http_full.tf.erb index 2adf32d5de7b..3be92c4fef74 100644 --- a/templates/terraform/examples/region_health_check_http_full.tf.erb +++ b/templates/terraform/examples/region_health_check_http_full.tf.erb @@ -1,6 +1,6 @@ resource "google_compute_region_health_check" "http-region-health-check" { - provider = "google-beta" - name = "<%= ctx[:vars]['health_check_name'] %>" + provider = google-beta + name = "<%= ctx[:vars]['health_check_name'] %>" description = "Health check via http" timeout_sec = 1 @@ -9,11 +9,11 @@ resource "google_compute_region_health_check" "http-region-health-check" { unhealthy_threshold = 5 http_health_check { - port_name = "health-check-port" + port_name = "health-check-port" port_specification = "USE_NAMED_PORT" - host = "1.2.3.4" - request_path = "/mypath" - proxy_header = "NONE" - response = "I AM HEALTHY" + host = "1.2.3.4" + request_path = "/mypath" + proxy_header = "NONE" + response = "I AM HEALTHY" } } diff --git a/templates/terraform/examples/region_health_check_https.tf.erb b/templates/terraform/examples/region_health_check_https.tf.erb index 693664f29df6..a52fc7661daf 100644 --- a/templates/terraform/examples/region_health_check_https.tf.erb +++ b/templates/terraform/examples/region_health_check_https.tf.erb @@ -1,6 +1,6 @@ resource "google_compute_region_health_check" "https-region-health-check" { - provider = "google-beta" - name = "<%= ctx[:vars]['health_check_name'] %>" + provider = google-beta + name = "<%= ctx[:vars]['health_check_name'] %>" timeout_sec = 1 check_interval_sec = 1 diff --git a/templates/terraform/examples/region_health_check_https_full.tf.erb b/templates/terraform/examples/region_health_check_https_full.tf.erb index 7547b6305686..3035bfa69eef 100644 --- a/templates/terraform/examples/region_health_check_https_full.tf.erb +++ b/templates/terraform/examples/region_health_check_https_full.tf.erb @@ -1,6 +1,6 @@ resource "google_compute_region_health_check" "https-region-health-check" { - provider = "google-beta" - name = "<%= ctx[:vars]['health_check_name'] %>" + provider = google-beta + name = "<%= ctx[:vars]['health_check_name'] %>" description = "Health check via https" timeout_sec = 1 @@ -9,11 +9,11 @@ resource "google_compute_region_health_check" "https-region-health-check" { unhealthy_threshold = 5 https_health_check { - port_name = "health-check-port" + port_name = "health-check-port" port_specification = "USE_NAMED_PORT" - host = "1.2.3.4" - request_path = "/mypath" - proxy_header = "NONE" - response = "I AM HEALTHY" + host = "1.2.3.4" + request_path = "/mypath" + proxy_header = "NONE" + response = "I AM HEALTHY" } } diff --git a/templates/terraform/examples/region_health_check_ssl.tf.erb b/templates/terraform/examples/region_health_check_ssl.tf.erb index a41e28000a61..48cb47f4cd61 100644 --- a/templates/terraform/examples/region_health_check_ssl.tf.erb +++ b/templates/terraform/examples/region_health_check_ssl.tf.erb @@ -1,6 +1,6 @@ resource "google_compute_region_health_check" "ssl-region-health-check" { - provider = "google-beta" - name = "<%= ctx[:vars]['health_check_name'] %>" + provider = google-beta + name = "<%= ctx[:vars]['health_check_name'] %>" timeout_sec = 1 check_interval_sec = 1 diff --git a/templates/terraform/examples/region_health_check_ssl_full.tf.erb b/templates/terraform/examples/region_health_check_ssl_full.tf.erb index 9d4946d6c9ea..ce1d96551788 100644 --- a/templates/terraform/examples/region_health_check_ssl_full.tf.erb +++ b/templates/terraform/examples/region_health_check_ssl_full.tf.erb @@ -1,6 +1,6 @@ resource "google_compute_region_health_check" "ssl-region-health-check" { - provider = "google-beta" - name = "<%= ctx[:vars]['health_check_name'] %>" + provider = google-beta + name = "<%= ctx[:vars]['health_check_name'] %>" description = "Health check via ssl" timeout_sec = 1 @@ -9,10 +9,10 @@ resource "google_compute_region_health_check" "ssl-region-health-check" { unhealthy_threshold = 5 ssl_health_check { - port_name = "health-check-port" + port_name = "health-check-port" port_specification = "USE_NAMED_PORT" - request = "ARE YOU HEALTHY?" - proxy_header = "NONE" - response = "I AM HEALTHY" + request = "ARE YOU HEALTHY?" + proxy_header = "NONE" + response = "I AM HEALTHY" } } diff --git a/templates/terraform/examples/region_health_check_tcp.tf.erb b/templates/terraform/examples/region_health_check_tcp.tf.erb index f21b46dfcf49..5f45bda63d24 100644 --- a/templates/terraform/examples/region_health_check_tcp.tf.erb +++ b/templates/terraform/examples/region_health_check_tcp.tf.erb @@ -1,6 +1,6 @@ resource "google_compute_region_health_check" "tcp-region-health-check" { - provider = "google-beta" - name = "<%= ctx[:vars]['health_check_name'] %>" + provider = google-beta + name = "<%= ctx[:vars]['health_check_name'] %>" timeout_sec = 1 check_interval_sec = 1 diff --git a/templates/terraform/examples/region_health_check_tcp_full.tf.erb b/templates/terraform/examples/region_health_check_tcp_full.tf.erb index f426609e9659..a620715d1fc6 100644 --- a/templates/terraform/examples/region_health_check_tcp_full.tf.erb +++ b/templates/terraform/examples/region_health_check_tcp_full.tf.erb @@ -1,6 +1,6 @@ resource "google_compute_region_health_check" "tcp-region-health-check" { - provider = "google-beta" - name = "<%= ctx[:vars]['health_check_name'] %>" + provider = google-beta + name = "<%= ctx[:vars]['health_check_name'] %>" description = "Health check via tcp" timeout_sec = 1 @@ -9,10 +9,10 @@ resource "google_compute_region_health_check" "tcp-region-health-check" { unhealthy_threshold = 5 tcp_health_check { - port_name = "health-check-port" + port_name = "health-check-port" port_specification = "USE_NAMED_PORT" - request = "ARE YOU HEALTHY?" - proxy_header = "NONE" - response = "I AM HEALTHY" + request = "ARE YOU HEALTHY?" + proxy_header = "NONE" + response = "I AM HEALTHY" } } diff --git a/templates/terraform/examples/region_ssl_certificate_basic.tf.erb b/templates/terraform/examples/region_ssl_certificate_basic.tf.erb index ef6900463c32..1864dec3441d 100644 --- a/templates/terraform/examples/region_ssl_certificate_basic.tf.erb +++ b/templates/terraform/examples/region_ssl_certificate_basic.tf.erb @@ -1,13 +1,12 @@ resource "google_compute_region_ssl_certificate" "default" { - provider = "google-beta" - region = "us-central1" + provider = google-beta + region = "us-central1" name_prefix = "my-certificate-" description = "a description" - private_key = "${file("path/to/private.key")}" - certificate = "${file("path/to/certificate.crt")}" + private_key = file("path/to/private.key") + certificate = file("path/to/certificate.crt") lifecycle { create_before_destroy = true } } - diff --git a/templates/terraform/examples/region_ssl_certificate_random_provider.tf.erb b/templates/terraform/examples/region_ssl_certificate_random_provider.tf.erb index 9ba60068f168..f731253b8c38 100644 --- a/templates/terraform/examples/region_ssl_certificate_random_provider.tf.erb +++ b/templates/terraform/examples/region_ssl_certificate_random_provider.tf.erb @@ -1,12 +1,13 @@ # You may also want to control name generation explicitly: resource "google_compute_region_ssl_certificate" "default" { - provider = "google-beta" - region = "us-central1" + provider = google-beta + region = "us-central1" + # The name will contain 8 random hex digits, # e.g. "my-certificate-48ab27cd2a" - name = "${random_id.certificate.hex}" - private_key = "${file("path/to/private.key")}" - certificate = "${file("path/to/certificate.crt")}" + name = random_id.certificate.hex + private_key = file("path/to/private.key") + certificate = file("path/to/certificate.crt") lifecycle { create_before_destroy = true @@ -19,8 +20,7 @@ resource "random_id" "certificate" { # For security, do not expose raw certificate values in the output keepers = { - private_key = "${base64sha256(file("path/to/private.key"))}" - certificate = "${base64sha256(file("path/to/certificate.crt"))}" + private_key = filebase64sha256("path/to/private.key") + certificate = filebase64sha256("path/to/certificate.crt") } } - diff --git a/templates/terraform/examples/region_ssl_certificate_target_https_proxies.tf.erb b/templates/terraform/examples/region_ssl_certificate_target_https_proxies.tf.erb index 42bd2cb01560..fc4f8e3fb371 100644 --- a/templates/terraform/examples/region_ssl_certificate_target_https_proxies.tf.erb +++ b/templates/terraform/examples/region_ssl_certificate_target_https_proxies.tf.erb @@ -9,11 +9,11 @@ // name with name_prefix, or use random_id resource. Example: resource "google_compute_region_ssl_certificate" "default" { - provider = "google-beta" - region = "us-central1" + provider = google-beta + region = "us-central1" name_prefix = "my-certificate-" - private_key = "${file("path/to/private.key")}" - certificate = "${file("path/to/certificate.crt")}" + private_key = file("path/to/private.key") + certificate = file("path/to/certificate.crt") lifecycle { create_before_destroy = true @@ -21,20 +21,20 @@ resource "google_compute_region_ssl_certificate" "default" { } resource "google_compute_region_target_https_proxy" "default" { - provider = "google-beta" - region = "us-central1" + provider = google-beta + region = "us-central1" name = "<%= ctx[:vars]['region_target_https_proxy_name'] %>" - url_map = "${google_compute_region_url_map.default.self_link}" - ssl_certificates = ["${google_compute_region_ssl_certificate.default.self_link}"] + url_map = google_compute_region_url_map.default.self_link + ssl_certificates = [google_compute_region_ssl_certificate.default.self_link] } resource "google_compute_region_url_map" "default" { - provider = "google-beta" - region = "us-central1" + provider = google-beta + region = "us-central1" name = "<%= ctx[:vars]['region_url_map_name'] %>" description = "a description" - default_service = "${google_compute_region_backend_service.default.self_link}" + default_service = google_compute_region_backend_service.default.self_link host_rule { hosts = ["mysite.com"] @@ -43,29 +43,29 @@ resource "google_compute_region_url_map" "default" { path_matcher { name = "allpaths" - default_service = "${google_compute_region_backend_service.default.self_link}" + default_service = google_compute_region_backend_service.default.self_link path_rule { paths = ["/*"] - service = "${google_compute_region_backend_service.default.self_link}" + service = google_compute_region_backend_service.default.self_link } } } resource "google_compute_region_backend_service" "default" { - provider = "google-beta" - region = "us-central1" + provider = google-beta + region = "us-central1" name = "<%= ctx[:vars]['region_backend_service_name'] %>" protocol = "HTTP" timeout_sec = 10 - health_checks = ["${google_compute_region_health_check.default.self_link}"] + health_checks = [google_compute_region_health_check.default.self_link] } resource "google_compute_region_health_check" "default" { - provider = "google-beta" - region = "us-central1" - name = "<%= ctx[:vars]['region_health_check_name'] %>" + provider = google-beta + region = "us-central1" + name = "<%= ctx[:vars]['region_health_check_name'] %>" http_health_check { } } diff --git a/templates/terraform/examples/region_target_http_proxy_basic.tf.erb b/templates/terraform/examples/region_target_http_proxy_basic.tf.erb index a7aff5dbca27..feae132a5bf2 100644 --- a/templates/terraform/examples/region_target_http_proxy_basic.tf.erb +++ b/templates/terraform/examples/region_target_http_proxy_basic.tf.erb @@ -1,17 +1,17 @@ resource "google_compute_region_target_http_proxy" "default" { - provider = "google-beta" + provider = google-beta - region = "us-central1" - name = "<%= ctx[:vars]['region_target_http_proxy_name'] %>" - url_map = "${google_compute_region_url_map.default.self_link}" + region = "us-central1" + name = "<%= ctx[:vars]['region_target_http_proxy_name'] %>" + url_map = google_compute_region_url_map.default.self_link } resource "google_compute_region_url_map" "default" { - provider = "google-beta" + provider = google-beta region = "us-central1" name = "<%= ctx[:vars]['region_url_map_name'] %>" - default_service = "${google_compute_region_backend_service.default.self_link}" + default_service = google_compute_region_backend_service.default.self_link host_rule { hosts = ["mysite.com"] @@ -20,28 +20,28 @@ resource "google_compute_region_url_map" "default" { path_matcher { name = "allpaths" - default_service = "${google_compute_region_backend_service.default.self_link}" + default_service = google_compute_region_backend_service.default.self_link path_rule { paths = ["/*"] - service = "${google_compute_region_backend_service.default.self_link}" + service = google_compute_region_backend_service.default.self_link } } } resource "google_compute_region_backend_service" "default" { - provider = "google-beta" + provider = google-beta region = "us-central1" name = "<%= ctx[:vars]['region_backend_service_name'] %>" protocol = "HTTP" timeout_sec = 10 - health_checks = ["${google_compute_region_health_check.default.self_link}"] + health_checks = [google_compute_region_health_check.default.self_link] } resource "google_compute_region_health_check" "default" { - provider = "google-beta" + provider = google-beta region = "us-central1" name = "<%= ctx[:vars]['region_health_check_name'] %>" diff --git a/templates/terraform/examples/region_target_https_proxy_basic.tf.erb b/templates/terraform/examples/region_target_https_proxy_basic.tf.erb index f7564f49c4fd..37ae6dbbff87 100644 --- a/templates/terraform/examples/region_target_https_proxy_basic.tf.erb +++ b/templates/terraform/examples/region_target_https_proxy_basic.tf.erb @@ -1,29 +1,29 @@ resource "google_compute_region_target_https_proxy" "default" { - provider = "google-beta" + provider = google-beta region = "us-central1" name = "<%= ctx[:vars]['region_target_https_proxy_name'] %>" - url_map = "${google_compute_region_url_map.default.self_link}" - ssl_certificates = ["${google_compute_region_ssl_certificate.default.self_link}"] + url_map = google_compute_region_url_map.default.self_link + ssl_certificates = [google_compute_region_ssl_certificate.default.self_link] } resource "google_compute_region_ssl_certificate" "default" { - provider = "google-beta" + provider = google-beta region = "us-central1" name = "<%= ctx[:vars]['region_ssl_certificate_name'] %>" - private_key = "${file("path/to/private.key")}" - certificate = "${file("path/to/certificate.crt")}" + private_key = file("path/to/private.key") + certificate = file("path/to/certificate.crt") } resource "google_compute_region_url_map" "default" { - provider = "google-beta" + provider = google-beta region = "us-central1" name = "<%= ctx[:vars]['region_url_map_name'] %>" description = "a description" - default_service = "${google_compute_region_backend_service.default.self_link}" + default_service = google_compute_region_backend_service.default.self_link host_rule { hosts = ["mysite.com"] @@ -32,31 +32,31 @@ resource "google_compute_region_url_map" "default" { path_matcher { name = "allpaths" - default_service = "${google_compute_region_backend_service.default.self_link}" + default_service = google_compute_region_backend_service.default.self_link path_rule { paths = ["/*"] - service = "${google_compute_region_backend_service.default.self_link}" + service = google_compute_region_backend_service.default.self_link } } } resource "google_compute_region_backend_service" "default" { - provider = "google-beta" + provider = google-beta region = "us-central1" name = "<%= ctx[:vars]['region_backend_service_name'] %>" protocol = "HTTP" timeout_sec = 10 - health_checks = ["${google_compute_region_health_check.default.self_link}"] + health_checks = [google_compute_region_health_check.default.self_link] } resource "google_compute_region_health_check" "default" { - provider = "google-beta" + provider = google-beta - region = "us-central1" - name = "<%= ctx[:vars]['region_health_check_name'] %>" + region = "us-central1" + name = "<%= ctx[:vars]['region_health_check_name'] %>" http_health_check { } } diff --git a/templates/terraform/examples/region_url_map_basic.tf.erb b/templates/terraform/examples/region_url_map_basic.tf.erb index 09f4a16f9070..f819aaaa8dd3 100644 --- a/templates/terraform/examples/region_url_map_basic.tf.erb +++ b/templates/terraform/examples/region_url_map_basic.tf.erb @@ -1,12 +1,12 @@ resource "google_compute_region_url_map" "<%= ctx[:primary_resource_id] %>" { - provider = "google-beta" + provider = google-beta - region = "us-central1" + region = "us-central1" name = "<%= ctx[:vars]['region_url_map_name'] %>" description = "a description" - default_service = "${google_compute_region_backend_service.home.self_link}" + default_service = google_compute_region_backend_service.home.self_link host_rule { hosts = ["mysite.com"] @@ -15,59 +15,59 @@ resource "google_compute_region_url_map" "<%= ctx[:primary_resource_id] %>" { path_matcher { name = "allpaths" - default_service = "${google_compute_region_backend_service.home.self_link}" + default_service = google_compute_region_backend_service.home.self_link path_rule { paths = ["/home"] - service = "${google_compute_region_backend_service.home.self_link}" + service = google_compute_region_backend_service.home.self_link } path_rule { paths = ["/login"] - service = "${google_compute_region_backend_service.login.self_link}" + service = google_compute_region_backend_service.login.self_link } } test { - service = "${google_compute_region_backend_service.home.self_link}" + service = google_compute_region_backend_service.home.self_link host = "hi.com" path = "/home" } } resource "google_compute_region_backend_service" "login" { - provider = "google-beta" + provider = google-beta - region = "us-central1" + region = "us-central1" name = "<%= ctx[:vars]['login_region_backend_service_name'] %>" protocol = "HTTP" timeout_sec = 10 - health_checks = ["${google_compute_region_health_check.default.self_link}"] + health_checks = [google_compute_region_health_check.default.self_link] } resource "google_compute_region_backend_service" "home" { - provider = "google-beta" + provider = google-beta - region = "us-central1" + region = "us-central1" name = "<%= ctx[:vars]['home_region_backend_service_name'] %>" protocol = "HTTP" timeout_sec = 10 - health_checks = ["${google_compute_region_health_check.default.self_link}"] + health_checks = [google_compute_region_health_check.default.self_link] } resource "google_compute_region_health_check" "default" { - provider = "google-beta" + provider = google-beta - region = "us-central1" + region = "us-central1" name = "<%= ctx[:vars]['region_health_check_name'] %>" check_interval_sec = 1 timeout_sec = 1 - http_health_check { + http_health_check { port = 80 request_path = "/" } diff --git a/templates/terraform/examples/reservation_basic.tf.erb b/templates/terraform/examples/reservation_basic.tf.erb index 60fe86a4cefe..7163c95458cf 100644 --- a/templates/terraform/examples/reservation_basic.tf.erb +++ b/templates/terraform/examples/reservation_basic.tf.erb @@ -6,7 +6,7 @@ resource "google_compute_reservation" "<%= ctx[:primary_resource_id] %>" { count = 1 instance_properties { min_cpu_platform = "Intel Cascade Lake" - machine_type = "n2-standard-2" + machine_type = "n2-standard-2" } } } diff --git a/templates/terraform/examples/resource_manager_lien.tf.erb b/templates/terraform/examples/resource_manager_lien.tf.erb index ee1c1f6ef483..fedab4764e14 100644 --- a/templates/terraform/examples/resource_manager_lien.tf.erb +++ b/templates/terraform/examples/resource_manager_lien.tf.erb @@ -1,12 +1,11 @@ resource "google_resource_manager_lien" "<%= ctx[:primary_resource_id] %>" { - parent = "projects/${google_project.project.number}" + parent = "projects/${google_project.project.number}" restrictions = ["resourcemanager.projects.delete"] - origin = "machine-readable-explanation" - reason = "This project is an important environment" + origin = "machine-readable-explanation" + reason = "This project is an important environment" } resource "google_project" "project" { project_id = "<%= ctx[:vars]["project_id"] %>" - name = "A very important project!" + name = "A very important project!" } - diff --git a/templates/terraform/examples/resource_policy_basic.tf.erb b/templates/terraform/examples/resource_policy_basic.tf.erb index e3b2fa0b5038..1aadc57370b3 100644 --- a/templates/terraform/examples/resource_policy_basic.tf.erb +++ b/templates/terraform/examples/resource_policy_basic.tf.erb @@ -1,11 +1,11 @@ resource "google_compute_resource_policy" "foo" { - name = "<%= ctx[:vars]['name'] %>" + name = "<%= ctx[:vars]['name'] %>" region = "us-central1" snapshot_schedule_policy { schedule { daily_schedule { days_in_cycle = 1 - start_time = "04:00" + start_time = "04:00" } } } diff --git a/templates/terraform/examples/resource_policy_full.tf.erb b/templates/terraform/examples/resource_policy_full.tf.erb index b7de3477b841..d699543ed8c0 100644 --- a/templates/terraform/examples/resource_policy_full.tf.erb +++ b/templates/terraform/examples/resource_policy_full.tf.erb @@ -1,15 +1,15 @@ resource "google_compute_resource_policy" "bar" { - name = "<%= ctx[:vars]['name'] %>" + name = "<%= ctx[:vars]['name'] %>" region = "us-central1" snapshot_schedule_policy { schedule { hourly_schedule { hours_in_cycle = 20 - start_time = "23:00" + start_time = "23:00" } } retention_policy { - max_retention_days = 10 + max_retention_days = 10 on_source_disk_delete = "KEEP_AUTO_SNAPSHOTS" } snapshot_properties { @@ -17,7 +17,7 @@ resource "google_compute_resource_policy" "bar" { my_label = "value" } storage_locations = ["us"] - guest_flush = true + guest_flush = true } } } diff --git a/templates/terraform/examples/route_basic.tf.erb b/templates/terraform/examples/route_basic.tf.erb index 57cbc39776ca..feb6b11d206c 100644 --- a/templates/terraform/examples/route_basic.tf.erb +++ b/templates/terraform/examples/route_basic.tf.erb @@ -1,7 +1,7 @@ resource "google_compute_route" "default" { name = "<%= ctx[:vars]['route_name'] %>" dest_range = "15.0.0.0/24" - network = "${google_compute_network.default.name}" + network = google_compute_network.default.name next_hop_ip = "10.132.1.5" priority = 100 } diff --git a/templates/terraform/examples/route_ilb_beta.tf.erb b/templates/terraform/examples/route_ilb_beta.tf.erb index ffd8fb5dfb25..20e43d700386 100644 --- a/templates/terraform/examples/route_ilb_beta.tf.erb +++ b/templates/terraform/examples/route_ilb_beta.tf.erb @@ -1,19 +1,19 @@ resource "google_compute_network" "default" { - provider = "google-beta" + provider = google-beta name = "<%= ctx[:vars]['network_name'] %>" auto_create_subnetworks = false } resource "google_compute_subnetwork" "default" { - provider = "google-beta" + provider = google-beta name = "<%= ctx[:vars]['subnet_name'] %>" ip_cidr_range = "10.0.1.0/24" region = "us-central1" - network = "${google_compute_network.default.self_link}" + network = google_compute_network.default.self_link } resource "google_compute_health_check" "hc" { - provider = "google-beta" + provider = google-beta name = "<%= ctx[:vars]['health_check_name'] %>" check_interval_sec = 1 timeout_sec = 1 @@ -24,29 +24,29 @@ resource "google_compute_health_check" "hc" { } resource "google_compute_region_backend_service" "backend" { - provider = "google-beta" - name = "<%= ctx[:vars]['backend_name'] %>" - region = "us-central1" - health_checks = ["${google_compute_health_check.hc.self_link}"] + provider = google-beta + name = "<%= ctx[:vars]['backend_name'] %>" + region = "us-central1" + health_checks = [google_compute_health_check.hc.self_link] } resource "google_compute_forwarding_rule" "default" { - provider = "google-beta" - name = "<%= ctx[:vars]['forwarding_rule_name'] %>" - region = "us-central1" + provider = google-beta + name = "<%= ctx[:vars]['forwarding_rule_name'] %>" + region = "us-central1" load_balancing_scheme = "INTERNAL" - backend_service = "${google_compute_region_backend_service.backend.self_link}" + backend_service = google_compute_region_backend_service.backend.self_link all_ports = true - network = "${google_compute_network.default.name}" - subnetwork = "${google_compute_subnetwork.default.name}" + network = google_compute_network.default.name + subnetwork = google_compute_subnetwork.default.name } resource "google_compute_route" "<%= ctx[:primary_resource_id] %>" { - provider = "google-beta" + provider = google-beta name = "<%= ctx[:vars]['route_name'] %>" dest_range = "0.0.0.0/0" - network = "${google_compute_network.default.name}" - next_hop_ilb = "${google_compute_forwarding_rule.default.self_link}" + network = google_compute_network.default.name + next_hop_ilb = google_compute_forwarding_rule.default.self_link priority = 2000 } diff --git a/templates/terraform/examples/router_basic.tf.erb b/templates/terraform/examples/router_basic.tf.erb index 790ca316b981..efdb7182a370 100644 --- a/templates/terraform/examples/router_basic.tf.erb +++ b/templates/terraform/examples/router_basic.tf.erb @@ -1,6 +1,6 @@ resource "google_compute_router" "foobar" { name = "<%= ctx[:vars]['router_name'] %>" - network = "${google_compute_network.foobar.name}" + network = google_compute_network.foobar.name bgp { asn = 64514 advertise_mode = "CUSTOM" @@ -15,7 +15,6 @@ resource "google_compute_router" "foobar" { } resource "google_compute_network" "foobar" { - name = "<%= ctx[:vars]['network_name'] %>" + name = "<%= ctx[:vars]['network_name'] %>" auto_create_subnetworks = false } - diff --git a/templates/terraform/examples/router_nat_basic.tf.erb b/templates/terraform/examples/router_nat_basic.tf.erb index 9944170c5b67..8dfb43925135 100644 --- a/templates/terraform/examples/router_nat_basic.tf.erb +++ b/templates/terraform/examples/router_nat_basic.tf.erb @@ -1,33 +1,33 @@ resource "google_compute_network" "net" { - name = "<%= ctx[:vars]['network_name'] %>" + name = "<%= ctx[:vars]['network_name'] %>" } resource "google_compute_subnetwork" "subnet" { - name = "<%= ctx[:vars]['subnet_name'] %>" - network = google_compute_network.net.self_link - ip_cidr_range = "10.0.0.0/16" - region = "us-central1" + name = "<%= ctx[:vars]['subnet_name'] %>" + network = google_compute_network.net.self_link + ip_cidr_range = "10.0.0.0/16" + region = "us-central1" } -resource "google_compute_router" "router"{ - name = "<%= ctx[:vars]['router_name'] %>" - region = google_compute_subnetwork.subnet.region - network = google_compute_network.net.self_link +resource "google_compute_router" "router" { + name = "<%= ctx[:vars]['router_name'] %>" + region = google_compute_subnetwork.subnet.region + network = google_compute_network.net.self_link - bgp { - asn = 64514 - } + bgp { + asn = 64514 + } } resource "google_compute_router_nat" "<%= ctx[:primary_resource_id] %>" { - name = "<%= ctx[:vars]['nat_name'] %>" - router = google_compute_router.router.name - region = google_compute_router.router.region - nat_ip_allocate_option = "AUTO_ONLY" - source_subnetwork_ip_ranges_to_nat = "ALL_SUBNETWORKS_ALL_IP_RANGES" - - log_config { - enable = true - filter = "ERRORS_ONLY" - } -} \ No newline at end of file + name = "<%= ctx[:vars]['nat_name'] %>" + router = google_compute_router.router.name + region = google_compute_router.router.region + nat_ip_allocate_option = "AUTO_ONLY" + source_subnetwork_ip_ranges_to_nat = "ALL_SUBNETWORKS_ALL_IP_RANGES" + + log_config { + enable = true + filter = "ERRORS_ONLY" + } +} diff --git a/templates/terraform/examples/router_nat_manual_ips.tf.erb b/templates/terraform/examples/router_nat_manual_ips.tf.erb index bbe0c38b4d60..231ee13a102c 100644 --- a/templates/terraform/examples/router_nat_manual_ips.tf.erb +++ b/templates/terraform/examples/router_nat_manual_ips.tf.erb @@ -1,37 +1,37 @@ resource "google_compute_network" "net" { - name = "<%= ctx[:vars]['network_name'] %>" + name = "<%= ctx[:vars]['network_name'] %>" } resource "google_compute_subnetwork" "subnet" { - name = "<%= ctx[:vars]['subnet_name'] %>" - network = google_compute_network.net.self_link - ip_cidr_range = "10.0.0.0/16" - region = "us-central1" + name = "<%= ctx[:vars]['subnet_name'] %>" + network = google_compute_network.net.self_link + ip_cidr_range = "10.0.0.0/16" + region = "us-central1" } -resource "google_compute_router" "router"{ - name = "<%= ctx[:vars]['router_name'] %>" - region = google_compute_subnetwork.subnet.region - network = google_compute_network.net.self_link +resource "google_compute_router" "router" { + name = "<%= ctx[:vars]['router_name'] %>" + region = google_compute_subnetwork.subnet.region + network = google_compute_network.net.self_link } resource "google_compute_address" "address" { - count = 2 - name = "<%= ctx[:vars]['address_name'] %>-${count.index}" - region = google_compute_subnetwork.subnet.region + count = 2 + name = "<%= ctx[:vars]['address_name'] %>-${count.index}" + region = google_compute_subnetwork.subnet.region } resource "google_compute_router_nat" "<%= ctx[:primary_resource_id] %>" { - name = "<%= ctx[:vars]['nat_name'] %>" - router = google_compute_router.router.name - region = google_compute_router.router.region - - nat_ip_allocate_option = "MANUAL_ONLY" - nat_ips = google_compute_address.address[*].self_link - - source_subnetwork_ip_ranges_to_nat = "LIST_OF_SUBNETWORKS" - subnetwork { - name = google_compute_subnetwork.default.self_link - source_ip_ranges_to_nat = ["ALL_IP_RANGES"] - } + name = "<%= ctx[:vars]['nat_name'] %>" + router = google_compute_router.router.name + region = google_compute_router.router.region + + nat_ip_allocate_option = "MANUAL_ONLY" + nat_ips = google_compute_address.address.*.self_link + + source_subnetwork_ip_ranges_to_nat = "LIST_OF_SUBNETWORKS" + subnetwork { + name = google_compute_subnetwork.default.self_link + source_ip_ranges_to_nat = ["ALL_IP_RANGES"] + } } diff --git a/templates/terraform/examples/runtimeconfig_config_basic.tf.erb b/templates/terraform/examples/runtimeconfig_config_basic.tf.erb index 19562f1e6008..9d79e77dc4cc 100644 --- a/templates/terraform/examples/runtimeconfig_config_basic.tf.erb +++ b/templates/terraform/examples/runtimeconfig_config_basic.tf.erb @@ -1,4 +1,4 @@ resource "google_runtimeconfig_config" "<%= ctx[:primary_resource_id] %>" { - name = "<%= ctx[:vars]['config_name'] %>" - description = "Runtime configuration values for my service" + name = "<%= ctx[:vars]['config_name'] %>" + description = "Runtime configuration values for my service" } diff --git a/templates/terraform/examples/scan_config_basic.tf.erb b/templates/terraform/examples/scan_config_basic.tf.erb index 9512e67e314e..f74505bec26d 100644 --- a/templates/terraform/examples/scan_config_basic.tf.erb +++ b/templates/terraform/examples/scan_config_basic.tf.erb @@ -1,10 +1,10 @@ resource "google_compute_address" "scanner_static_ip" { - provider = "google-beta" + provider = google-beta name = "<%= ctx[:vars]['address_name'] %>" } resource "google_security_scanner_scan_config" "<%= ctx[:primary_resource_id] %>" { - provider = "google-beta" + provider = google-beta display_name = "<%= ctx[:vars]['scan_config_name'] %>" starting_urls = ["http://${google_compute_address.scanner_static_ip.address}"] target_platforms = ["COMPUTE"] @@ -13,4 +13,4 @@ resource "google_security_scanner_scan_config" "<%= ctx[:primary_resource_id] %> provider "google-beta" { region = "us-central1" zone = "us-central1-a" -} \ No newline at end of file +} diff --git a/templates/terraform/examples/scc_source_basic.tf.erb b/templates/terraform/examples/scc_source_basic.tf.erb index 19ff19afad89..d8bcd1092509 100644 --- a/templates/terraform/examples/scc_source_basic.tf.erb +++ b/templates/terraform/examples/scc_source_basic.tf.erb @@ -1,5 +1,5 @@ resource "google_scc_source" "<%= ctx[:primary_resource_id] %>" { display_name = "<%= ctx[:vars]['source_display_name'] %>" organization = "<%= ctx[:test_env_vars]['org_id'] %>" - description = "My custom Cloud Security Command Center Finding Source" + description = "My custom Cloud Security Command Center Finding Source" } diff --git a/templates/terraform/examples/scheduled_query.tf.erb b/templates/terraform/examples/scheduled_query.tf.erb index eeb76cd4f97b..2c5ae0b1c57d 100644 --- a/templates/terraform/examples/scheduled_query.tf.erb +++ b/templates/terraform/examples/scheduled_query.tf.erb @@ -1,32 +1,31 @@ -data "google_project" "project" {} +data "google_project" "project" { +} resource "google_project_iam_member" "permissions" { - role = "roles/iam.serviceAccountShortTermTokenMinter" + role = "roles/iam.serviceAccountShortTermTokenMinter" member = "serviceAccount:service-${data.google_project.project.number}@gcp-sa-bigquerydatatransfer.iam.gserviceaccount.com" } resource "google_bigquery_data_transfer_config" "<%= ctx[:primary_resource_id] %>" { - depends_on = [google_project_iam_member.permissions] - display_name = "<%= ctx[:vars]['display_name'] %>" - location = "asia-northeast1" - data_source_id = "scheduled_query" - schedule = "first sunday of quarter 00:00" - destination_dataset_id = "${google_bigquery_dataset.my_dataset.dataset_id}" + display_name = "<%= ctx[:vars]['display_name'] %>" + location = "asia-northeast1" + data_source_id = "scheduled_query" + schedule = "first sunday of quarter 00:00" + destination_dataset_id = google_bigquery_dataset.my_dataset.dataset_id params = { destination_table_name_template = "my-table" - write_disposition = "WRITE_APPEND" - query = "SELECT name FROM tabl WHERE x = 'y'" + write_disposition = "WRITE_APPEND" + query = "SELECT name FROM tabl WHERE x = 'y'" } } resource "google_bigquery_dataset" "my_dataset" { - depends_on = [google_project_iam_member.permissions] - dataset_id = "<%= ctx[:vars]['dataset_id'].delete("-") %>" + dataset_id = "<%= ctx[:vars]['dataset_id'].delete("-") %>" friendly_name = "foo" - description = "bar" - location = "asia-northeast1" + description = "bar" + location = "asia-northeast1" } diff --git a/templates/terraform/examples/scheduler_job_app_engine.tf.erb b/templates/terraform/examples/scheduler_job_app_engine.tf.erb index a0a2b2fa7020..3d598b99b451 100644 --- a/templates/terraform/examples/scheduler_job_app_engine.tf.erb +++ b/templates/terraform/examples/scheduler_job_app_engine.tf.erb @@ -1,15 +1,15 @@ resource "google_cloud_scheduler_job" "job" { - name = "<%= ctx[:vars]['job_name'] %>" - schedule = "*/4 * * * *" + name = "<%= ctx[:vars]['job_name'] %>" + schedule = "*/4 * * * *" description = "test app engine job" - time_zone = "Europe/London" + time_zone = "Europe/London" app_engine_http_target { http_method = "POST" app_engine_routing { - service = "web" - version = "prod" + service = "web" + version = "prod" instance = "my-instance-001" } diff --git a/templates/terraform/examples/scheduler_job_http.tf.erb b/templates/terraform/examples/scheduler_job_http.tf.erb index 88a31a4a3beb..22ee9fdc0b75 100644 --- a/templates/terraform/examples/scheduler_job_http.tf.erb +++ b/templates/terraform/examples/scheduler_job_http.tf.erb @@ -1,12 +1,11 @@ resource "google_cloud_scheduler_job" "job" { - name = "<%= ctx[:vars]['job_name'] %>" + name = "<%= ctx[:vars]['job_name'] %>" description = "test http job" - schedule = "*/8 * * * *" - time_zone = "America/New_York" + schedule = "*/8 * * * *" + time_zone = "America/New_York" http_target { http_method = "POST" - uri = "https://example.com/ping" + uri = "https://example.com/ping" } } - diff --git a/templates/terraform/examples/scheduler_job_oauth.tf.erb b/templates/terraform/examples/scheduler_job_oauth.tf.erb index db557042860e..0f6b9d5b881d 100644 --- a/templates/terraform/examples/scheduler_job_oauth.tf.erb +++ b/templates/terraform/examples/scheduler_job_oauth.tf.erb @@ -1,18 +1,18 @@ -data "google_compute_default_service_account" "default" { } +data "google_compute_default_service_account" "default" { +} resource "google_cloud_scheduler_job" "job" { - name = "<%= ctx[:vars]['job_name'] %>" + name = "<%= ctx[:vars]['job_name'] %>" description = "test http job" - schedule = "*/8 * * * *" - time_zone = "America/New_York" + schedule = "*/8 * * * *" + time_zone = "America/New_York" http_target { http_method = "GET" - uri = "https://cloudscheduler.googleapis.com/v1/projects/<%= ctx[:test_env_vars]['project_name'] %>/locations/<%= ctx[:test_env_vars]['region'] %>/jobs" + uri = "https://cloudscheduler.googleapis.com/v1/projects/<%= ctx[:test_env_vars]['project_name'] %>/locations/<%= ctx[:test_env_vars]['region'] %>/jobs" oauth_token { - service_account_email = "${data.google_compute_default_service_account.default.email}" + service_account_email = data.google_compute_default_service_account.default.email } } } - diff --git a/templates/terraform/examples/scheduler_job_oidc.tf.erb b/templates/terraform/examples/scheduler_job_oidc.tf.erb index 5169b7de4251..bb252a585da6 100644 --- a/templates/terraform/examples/scheduler_job_oidc.tf.erb +++ b/templates/terraform/examples/scheduler_job_oidc.tf.erb @@ -1,18 +1,18 @@ -data "google_compute_default_service_account" "default" { } +data "google_compute_default_service_account" "default" { +} resource "google_cloud_scheduler_job" "job" { - name = "<%= ctx[:vars]['job_name'] %>" + name = "<%= ctx[:vars]['job_name'] %>" description = "test http job" - schedule = "*/8 * * * *" - time_zone = "America/New_York" + schedule = "*/8 * * * *" + time_zone = "America/New_York" http_target { http_method = "GET" - uri = "https://example.com/ping" + uri = "https://example.com/ping" oidc_token { - service_account_email = "${data.google_compute_default_service_account.default.email}" + service_account_email = data.google_compute_default_service_account.default.email } } } - diff --git a/templates/terraform/examples/scheduler_job_pubsub.tf.erb b/templates/terraform/examples/scheduler_job_pubsub.tf.erb index b0602e4f9e1f..1d6d100cf98c 100644 --- a/templates/terraform/examples/scheduler_job_pubsub.tf.erb +++ b/templates/terraform/examples/scheduler_job_pubsub.tf.erb @@ -3,13 +3,12 @@ resource "google_pubsub_topic" "topic" { } resource "google_cloud_scheduler_job" "job" { - name = "<%= ctx[:vars]['job_name'] %>" + name = "<%= ctx[:vars]['job_name'] %>" description = "test job" - schedule = "*/2 * * * *" + schedule = "*/2 * * * *" pubsub_target { - topic_name = "${google_pubsub_topic.topic.id}" - data = "${base64encode("test")}" + topic_name = google_pubsub_topic.topic.id + data = base64encode("test") } } - diff --git a/templates/terraform/examples/snapshot_basic.tf.erb b/templates/terraform/examples/snapshot_basic.tf.erb index ab3e6804f1c5..f0e931afe4d3 100644 --- a/templates/terraform/examples/snapshot_basic.tf.erb +++ b/templates/terraform/examples/snapshot_basic.tf.erb @@ -1,22 +1,21 @@ resource "google_compute_snapshot" "<%= ctx[:primary_resource_id] %>" { - name = "<%= ctx[:vars]['snapshot_name'] %>" - source_disk = "${google_compute_disk.persistent.name}" - zone = "us-central1-a" - labels = { - my_label = "value" - } + name = "<%= ctx[:vars]['snapshot_name'] %>" + source_disk = google_compute_disk.persistent.name + zone = "us-central1-a" + labels = { + my_label = "value" + } } data "google_compute_image" "debian" { - family = "debian-9" - project = "debian-cloud" + family = "debian-9" + project = "debian-cloud" } resource "google_compute_disk" "persistent" { - name = "<%= ctx[:vars]['disk_name'] %>" - image = "${data.google_compute_image.debian.self_link}" - size = 10 - type = "pd-ssd" - zone = "us-central1-a" + name = "<%= ctx[:vars]['disk_name'] %>" + image = data.google_compute_image.debian.self_link + size = 10 + type = "pd-ssd" + zone = "us-central1-a" } - diff --git a/templates/terraform/examples/spanner_database_basic.tf.erb b/templates/terraform/examples/spanner_database_basic.tf.erb index 73d90caf801a..a68752f8ef2b 100644 --- a/templates/terraform/examples/spanner_database_basic.tf.erb +++ b/templates/terraform/examples/spanner_database_basic.tf.erb @@ -4,10 +4,10 @@ resource "google_spanner_instance" "main" { } resource "google_spanner_database" "database" { - instance = "${google_spanner_instance.main.name}" - name = "<%= ctx[:vars]['database_name'] %>" - ddl = [ + instance = google_spanner_instance.main.name + name = "<%= ctx[:vars]['database_name'] %>" + ddl = [ "CREATE TABLE t1 (t1 INT64 NOT NULL,) PRIMARY KEY(t1)", - "CREATE TABLE t2 (t2 INT64 NOT NULL,) PRIMARY KEY(t2)" + "CREATE TABLE t2 (t2 INT64 NOT NULL,) PRIMARY KEY(t2)", ] } diff --git a/templates/terraform/examples/spanner_instance_basic.tf.erb b/templates/terraform/examples/spanner_instance_basic.tf.erb index de2d41635c2c..02bd2715d9a9 100644 --- a/templates/terraform/examples/spanner_instance_basic.tf.erb +++ b/templates/terraform/examples/spanner_instance_basic.tf.erb @@ -1,7 +1,7 @@ resource "google_spanner_instance" "example" { - config = "regional-us-central1" - display_name = "Test Spanner Instance" - num_nodes = 2 + config = "regional-us-central1" + display_name = "Test Spanner Instance" + num_nodes = 2 labels = { "foo" = "bar" } diff --git a/templates/terraform/examples/sql_database_basic.tf.erb b/templates/terraform/examples/sql_database_basic.tf.erb index fad36f7266a1..05ecb7333839 100644 --- a/templates/terraform/examples/sql_database_basic.tf.erb +++ b/templates/terraform/examples/sql_database_basic.tf.erb @@ -1,12 +1,12 @@ resource "google_sql_database" "<%= ctx[:primary_resource_id] %>" { - name = "<%= ctx[:vars]['database_name'] %>" - instance = "${google_sql_database_instance.instance.name}" + name = "<%= ctx[:vars]['database_name'] %>" + instance = google_sql_database_instance.instance.name } resource "google_sql_database_instance" "instance" { - name = "<%= ctx[:vars]['database_instance_name'] %>" - region = "us-central" - settings { - tier = "D0" - } + name = "<%= ctx[:vars]['database_instance_name'] %>" + region = "us-central" + settings { + tier = "D0" + } } diff --git a/templates/terraform/examples/ssl_certificate_basic.tf.erb b/templates/terraform/examples/ssl_certificate_basic.tf.erb index 8c0a68bd6156..f8adfac700ef 100644 --- a/templates/terraform/examples/ssl_certificate_basic.tf.erb +++ b/templates/terraform/examples/ssl_certificate_basic.tf.erb @@ -1,8 +1,8 @@ resource "google_compute_ssl_certificate" "default" { name_prefix = "my-certificate-" description = "a description" - private_key = "${file("path/to/private.key")}" - certificate = "${file("path/to/certificate.crt")}" + private_key = file("path/to/private.key") + certificate = file("path/to/certificate.crt") lifecycle { create_before_destroy = true diff --git a/templates/terraform/examples/ssl_certificate_random_provider.tf.erb b/templates/terraform/examples/ssl_certificate_random_provider.tf.erb index fb80966b3fb1..22447105f033 100644 --- a/templates/terraform/examples/ssl_certificate_random_provider.tf.erb +++ b/templates/terraform/examples/ssl_certificate_random_provider.tf.erb @@ -2,9 +2,9 @@ resource "google_compute_ssl_certificate" "default" { # The name will contain 8 random hex digits, # e.g. "my-certificate-48ab27cd2a" - name = "${random_id.certificate.hex}" - private_key = "${file("path/to/private.key")}" - certificate = "${file("path/to/certificate.crt")}" + name = random_id.certificate.hex + private_key = file("path/to/private.key") + certificate = file("path/to/certificate.crt") lifecycle { create_before_destroy = true @@ -17,7 +17,7 @@ resource "random_id" "certificate" { # For security, do not expose raw certificate values in the output keepers = { - private_key = "${base64sha256(file("path/to/private.key"))}" - certificate = "${base64sha256(file("path/to/certificate.crt"))}" + private_key = filebase64sha256("path/to/private.key") + certificate = filebase64sha256("path/to/certificate.crt") } } diff --git a/templates/terraform/examples/ssl_certificate_target_https_proxies.tf.erb b/templates/terraform/examples/ssl_certificate_target_https_proxies.tf.erb index b96947008bb2..85f0644444dd 100644 --- a/templates/terraform/examples/ssl_certificate_target_https_proxies.tf.erb +++ b/templates/terraform/examples/ssl_certificate_target_https_proxies.tf.erb @@ -10,8 +10,8 @@ resource "google_compute_ssl_certificate" "default" { name_prefix = "my-certificate-" - private_key = "${file("path/to/private.key")}" - certificate = "${file("path/to/certificate.crt")}" + private_key = file("path/to/private.key") + certificate = file("path/to/certificate.crt") lifecycle { create_before_destroy = true @@ -20,15 +20,15 @@ resource "google_compute_ssl_certificate" "default" { resource "google_compute_target_https_proxy" "default" { name = "<%= ctx[:vars]['target_https_proxy_name'] %>" - url_map = "${google_compute_url_map.default.self_link}" - ssl_certificates = ["${google_compute_ssl_certificate.default.self_link}"] + url_map = google_compute_url_map.default.self_link + ssl_certificates = [google_compute_ssl_certificate.default.self_link] } resource "google_compute_url_map" "default" { name = "<%= ctx[:vars]['url_map_name'] %>" description = "a description" - default_service = "${google_compute_backend_service.default.self_link}" + default_service = google_compute_backend_service.default.self_link host_rule { hosts = ["mysite.com"] @@ -37,11 +37,11 @@ resource "google_compute_url_map" "default" { path_matcher { name = "allpaths" - default_service = "${google_compute_backend_service.default.self_link}" + default_service = google_compute_backend_service.default.self_link path_rule { paths = ["/*"] - service = "${google_compute_backend_service.default.self_link}" + service = google_compute_backend_service.default.self_link } } } @@ -52,7 +52,7 @@ resource "google_compute_backend_service" "default" { protocol = "HTTP" timeout_sec = 10 - health_checks = ["${google_compute_http_health_check.default.self_link}"] + health_checks = [google_compute_http_health_check.default.self_link] } resource "google_compute_http_health_check" "default" { diff --git a/templates/terraform/examples/storage_bucket_access_control_public_bucket.tf.erb b/templates/terraform/examples/storage_bucket_access_control_public_bucket.tf.erb index c8034958a9a2..6d6892f7b0af 100644 --- a/templates/terraform/examples/storage_bucket_access_control_public_bucket.tf.erb +++ b/templates/terraform/examples/storage_bucket_access_control_public_bucket.tf.erb @@ -5,5 +5,5 @@ resource "google_storage_bucket_access_control" "<%= ctx[:primary_resource_id] % } resource "google_storage_bucket" "bucket" { - name = "<%= ctx[:vars]['bucket_name'] %>" + name = "<%= ctx[:vars]['bucket_name'] %>" } diff --git a/templates/terraform/examples/storage_default_object_access_control_public.tf.erb b/templates/terraform/examples/storage_default_object_access_control_public.tf.erb index bd83d319ec5c..289cd496dd56 100644 --- a/templates/terraform/examples/storage_default_object_access_control_public.tf.erb +++ b/templates/terraform/examples/storage_default_object_access_control_public.tf.erb @@ -1,9 +1,9 @@ resource "google_storage_default_object_access_control" "<%= ctx[:primary_resource_id] %>" { - bucket = "${google_storage_bucket.bucket.name}" + bucket = google_storage_bucket.bucket.name role = "READER" entity = "allUsers" } resource "google_storage_bucket" "bucket" { - name = "<%= ctx[:vars]['bucket_name'] %>" + name = "<%= ctx[:vars]['bucket_name'] %>" } diff --git a/templates/terraform/examples/storage_object_access_control_public_object.tf.erb b/templates/terraform/examples/storage_object_access_control_public_object.tf.erb index c7474ef47447..e5aa84360af1 100644 --- a/templates/terraform/examples/storage_object_access_control_public_object.tf.erb +++ b/templates/terraform/examples/storage_object_access_control_public_object.tf.erb @@ -1,16 +1,16 @@ resource "google_storage_object_access_control" "<%= ctx[:primary_resource_id] %>" { - object = "${google_storage_bucket_object.object.output_name}" - bucket = "${google_storage_bucket.bucket.name}" + object = google_storage_bucket_object.object.output_name + bucket = google_storage_bucket.bucket.name role = "READER" entity = "allUsers" } resource "google_storage_bucket" "bucket" { - name = "<%= ctx[:vars]['bucket_name'] %>" + name = "<%= ctx[:vars]['bucket_name'] %>" } - resource "google_storage_bucket_object" "object" { - name = "<%= ctx[:vars]['object_name'] %>" - bucket = "${google_storage_bucket.bucket.name}" - source = "../static/img/header-logo.png" +resource "google_storage_bucket_object" "object" { + name = "<%= ctx[:vars]['object_name'] %>" + bucket = google_storage_bucket.bucket.name + source = "../static/img/header-logo.png" } diff --git a/templates/terraform/examples/subnetwork_basic.tf.erb b/templates/terraform/examples/subnetwork_basic.tf.erb index 949fb47d6d56..4cd85ab1e126 100644 --- a/templates/terraform/examples/subnetwork_basic.tf.erb +++ b/templates/terraform/examples/subnetwork_basic.tf.erb @@ -2,7 +2,7 @@ resource "google_compute_subnetwork" "network-with-private-secondary-ip-ranges" name = "<%= ctx[:vars]['subnetwork_name'] %>" ip_cidr_range = "10.2.0.0/16" region = "us-central1" - network = "${google_compute_network.custom-test.self_link}" + network = google_compute_network.custom-test.self_link secondary_ip_range { range_name = "tf-test-secondary-range-update1" ip_cidr_range = "192.168.10.0/24" @@ -13,4 +13,3 @@ resource "google_compute_network" "custom-test" { name = "<%= ctx[:vars]['network_name'] %>" auto_create_subnetworks = false } - diff --git a/templates/terraform/examples/subnetwork_internal_l7lb.tf.erb b/templates/terraform/examples/subnetwork_internal_l7lb.tf.erb index 1a78571a5b5c..12bf8b878ecb 100644 --- a/templates/terraform/examples/subnetwork_internal_l7lb.tf.erb +++ b/templates/terraform/examples/subnetwork_internal_l7lb.tf.erb @@ -1,16 +1,16 @@ resource "google_compute_subnetwork" "network-for-l7lb" { - provider = "google-beta" + provider = google-beta name = "<%= ctx[:vars]['subnetwork_name'] %>" ip_cidr_range = "10.0.0.0/22" region = "us-central1" purpose = "INTERNAL_HTTPS_LOAD_BALANCER" role = "ACTIVE" - network = "${google_compute_network.custom-test.self_link}" + network = google_compute_network.custom-test.self_link } resource "google_compute_network" "custom-test" { - provider = "google-beta" + provider = google-beta name = "<%= ctx[:vars]['network_name'] %>" auto_create_subnetworks = false diff --git a/templates/terraform/examples/subnetwork_logging_config_beta.tf.erb b/templates/terraform/examples/subnetwork_logging_config_beta.tf.erb index bb963436d850..8d228a5da47e 100644 --- a/templates/terraform/examples/subnetwork_logging_config_beta.tf.erb +++ b/templates/terraform/examples/subnetwork_logging_config_beta.tf.erb @@ -1,25 +1,25 @@ resource "google_compute_subnetwork" "subnet-with-logging" { - provider = "google-beta" + provider = google-beta name = "<%= ctx[:vars]['subnetwork_name'] %>" ip_cidr_range = "10.2.0.0/16" region = "us-central1" - network = "${google_compute_network.custom-test.self_link}" + network = google_compute_network.custom-test.self_link enable_flow_logs = true log_config { aggregation_interval = "INTERVAL_10_MIN" - flow_sampling = 0.5 - metadata = "INCLUDE_ALL_METADATA" + flow_sampling = 0.5 + metadata = "INCLUDE_ALL_METADATA" } } resource "google_compute_network" "custom-test" { - provider = "google-beta" + provider = google-beta name = "<%= ctx[:vars]['network_name'] %>" auto_create_subnetworks = false } -provider "google-beta"{ +provider "google-beta" { region = "us-central1" zone = "us-central1-a" } diff --git a/templates/terraform/examples/target_http_proxy_basic.tf.erb b/templates/terraform/examples/target_http_proxy_basic.tf.erb index 6a74902b38bc..a3e099b98fca 100644 --- a/templates/terraform/examples/target_http_proxy_basic.tf.erb +++ b/templates/terraform/examples/target_http_proxy_basic.tf.erb @@ -1,11 +1,11 @@ resource "google_compute_target_http_proxy" "default" { - name = "<%= ctx[:vars]['target_http_proxy_name'] %>" - url_map = "${google_compute_url_map.default.self_link}" + name = "<%= ctx[:vars]['target_http_proxy_name'] %>" + url_map = google_compute_url_map.default.self_link } resource "google_compute_url_map" "default" { - name = "<%= ctx[:vars]['url_map_name'] %>" - default_service = "${google_compute_backend_service.default.self_link}" + name = "<%= ctx[:vars]['url_map_name'] %>" + default_service = google_compute_backend_service.default.self_link host_rule { hosts = ["mysite.com"] @@ -14,11 +14,11 @@ resource "google_compute_url_map" "default" { path_matcher { name = "allpaths" - default_service = "${google_compute_backend_service.default.self_link}" + default_service = google_compute_backend_service.default.self_link path_rule { paths = ["/*"] - service = "${google_compute_backend_service.default.self_link}" + service = google_compute_backend_service.default.self_link } } } @@ -29,7 +29,7 @@ resource "google_compute_backend_service" "default" { protocol = "HTTP" timeout_sec = 10 - health_checks = ["${google_compute_http_health_check.default.self_link}"] + health_checks = [google_compute_http_health_check.default.self_link] } resource "google_compute_http_health_check" "default" { diff --git a/templates/terraform/examples/target_https_proxy_basic.tf.erb b/templates/terraform/examples/target_https_proxy_basic.tf.erb index c572d72b0d06..d8de469b10c1 100644 --- a/templates/terraform/examples/target_https_proxy_basic.tf.erb +++ b/templates/terraform/examples/target_https_proxy_basic.tf.erb @@ -1,20 +1,20 @@ resource "google_compute_target_https_proxy" "default" { name = "<%= ctx[:vars]['target_https_proxy_name'] %>" - url_map = "${google_compute_url_map.default.self_link}" - ssl_certificates = ["${google_compute_ssl_certificate.default.self_link}"] + url_map = google_compute_url_map.default.self_link + ssl_certificates = [google_compute_ssl_certificate.default.self_link] } resource "google_compute_ssl_certificate" "default" { name = "<%= ctx[:vars]['ssl_certificate_name'] %>" - private_key = "${file("path/to/private.key")}" - certificate = "${file("path/to/certificate.crt")}" + private_key = file("path/to/private.key") + certificate = file("path/to/certificate.crt") } resource "google_compute_url_map" "default" { name = "<%= ctx[:vars]['url_map_name'] %>" description = "a description" - default_service = "${google_compute_backend_service.default.self_link}" + default_service = google_compute_backend_service.default.self_link host_rule { hosts = ["mysite.com"] @@ -23,11 +23,11 @@ resource "google_compute_url_map" "default" { path_matcher { name = "allpaths" - default_service = "${google_compute_backend_service.default.self_link}" + default_service = google_compute_backend_service.default.self_link path_rule { paths = ["/*"] - service = "${google_compute_backend_service.default.self_link}" + service = google_compute_backend_service.default.self_link } } } @@ -38,7 +38,7 @@ resource "google_compute_backend_service" "default" { protocol = "HTTP" timeout_sec = 10 - health_checks = ["${google_compute_http_health_check.default.self_link}"] + health_checks = [google_compute_http_health_check.default.self_link] } resource "google_compute_http_health_check" "default" { diff --git a/templates/terraform/examples/target_instance_basic.tf.erb b/templates/terraform/examples/target_instance_basic.tf.erb index 748ca8b1b3f6..c1ea4e2daacb 100644 --- a/templates/terraform/examples/target_instance_basic.tf.erb +++ b/templates/terraform/examples/target_instance_basic.tf.erb @@ -1,6 +1,6 @@ resource "google_compute_target_instance" "<%= ctx[:primary_resource_id] %>" { - name = "<%= ctx[:vars]['target_name'] %>" - instance = "${google_compute_instance.target-vm.self_link}" + name = "<%= ctx[:vars]['target_name'] %>" + instance = google_compute_instance.target-vm.self_link } data "google_compute_image" "vmimage" { @@ -14,8 +14,8 @@ resource "google_compute_instance" "target-vm" { zone = "us-central1-a" boot_disk { - initialize_params{ - image = "${data.google_compute_image.vmimage.self_link}" + initialize_params { + image = data.google_compute_image.vmimage.self_link } } diff --git a/templates/terraform/examples/target_ssl_proxy_basic.tf.erb b/templates/terraform/examples/target_ssl_proxy_basic.tf.erb index b1f0ee912b48..cd1207a9cc69 100644 --- a/templates/terraform/examples/target_ssl_proxy_basic.tf.erb +++ b/templates/terraform/examples/target_ssl_proxy_basic.tf.erb @@ -1,19 +1,19 @@ resource "google_compute_target_ssl_proxy" "default" { name = "<%= ctx[:vars]['target_ssl_proxy_name'] %>" - backend_service = "${google_compute_backend_service.default.self_link}" - ssl_certificates = ["${google_compute_ssl_certificate.default.self_link}"] + backend_service = google_compute_backend_service.default.self_link + ssl_certificates = [google_compute_ssl_certificate.default.self_link] } resource "google_compute_ssl_certificate" "default" { name = "<%= ctx[:vars]['ssl_certificate_name'] %>" - private_key = "${file("path/to/private.key")}" - certificate = "${file("path/to/certificate.crt")}" + private_key = file("path/to/private.key") + certificate = file("path/to/certificate.crt") } resource "google_compute_backend_service" "default" { name = "<%= ctx[:vars]['backend_service_name'] %>" protocol = "SSL" - health_checks = ["${google_compute_health_check.default.self_link}"] + health_checks = [google_compute_health_check.default.self_link] } resource "google_compute_health_check" "default" { diff --git a/templates/terraform/examples/target_tcp_proxy_basic.tf.erb b/templates/terraform/examples/target_tcp_proxy_basic.tf.erb index 25976e9a269b..fd9c04fc5346 100644 --- a/templates/terraform/examples/target_tcp_proxy_basic.tf.erb +++ b/templates/terraform/examples/target_tcp_proxy_basic.tf.erb @@ -1,14 +1,14 @@ resource "google_compute_target_tcp_proxy" "default" { name = "<%= ctx[:vars]['target_tcp_proxy_name'] %>" - backend_service = "${google_compute_backend_service.default.self_link}" + backend_service = google_compute_backend_service.default.self_link } resource "google_compute_backend_service" "default" { - name = "<%= ctx[:vars]['backend_service_name'] %>" - protocol = "TCP" - timeout_sec = 10 + name = "<%= ctx[:vars]['backend_service_name'] %>" + protocol = "TCP" + timeout_sec = 10 - health_checks = ["${google_compute_health_check.default.self_link}"] + health_checks = [google_compute_health_check.default.self_link] } resource "google_compute_health_check" "default" { diff --git a/templates/terraform/examples/target_vpn_gateway_basic.tf.erb b/templates/terraform/examples/target_vpn_gateway_basic.tf.erb index e8ef348e184b..824ce65f7772 100644 --- a/templates/terraform/examples/target_vpn_gateway_basic.tf.erb +++ b/templates/terraform/examples/target_vpn_gateway_basic.tf.erb @@ -1,37 +1,37 @@ resource "google_compute_vpn_gateway" "target_gateway" { name = "<%= ctx[:vars]['target_vpn_gateway_name'] %>" - network = "${google_compute_network.network1.self_link}" + network = google_compute_network.network1.self_link } resource "google_compute_network" "network1" { - name = "<%= ctx[:vars]['network_name'] %>" + name = "<%= ctx[:vars]['network_name'] %>" } resource "google_compute_address" "vpn_static_ip" { - name = "<%= ctx[:vars]['address_name'] %>" + name = "<%= ctx[:vars]['address_name'] %>" } resource "google_compute_forwarding_rule" "fr_esp" { name = "<%= ctx[:vars]['esp_forwarding_rule_name'] %>" ip_protocol = "ESP" - ip_address = "${google_compute_address.vpn_static_ip.address}" - target = "${google_compute_vpn_gateway.target_gateway.self_link}" + ip_address = google_compute_address.vpn_static_ip.address + target = google_compute_vpn_gateway.target_gateway.self_link } resource "google_compute_forwarding_rule" "fr_udp500" { name = "<%= ctx[:vars]['udp500_forwarding_rule_name'] %>" ip_protocol = "UDP" port_range = "500" - ip_address = "${google_compute_address.vpn_static_ip.address}" - target = "${google_compute_vpn_gateway.target_gateway.self_link}" + ip_address = google_compute_address.vpn_static_ip.address + target = google_compute_vpn_gateway.target_gateway.self_link } resource "google_compute_forwarding_rule" "fr_udp4500" { name = "<%= ctx[:vars]['udp4500_forwarding_rule_name'] %>" ip_protocol = "UDP" port_range = "4500" - ip_address = "${google_compute_address.vpn_static_ip.address}" - target = "${google_compute_vpn_gateway.target_gateway.self_link}" + ip_address = google_compute_address.vpn_static_ip.address + target = google_compute_vpn_gateway.target_gateway.self_link } resource "google_compute_vpn_tunnel" "tunnel1" { @@ -39,20 +39,20 @@ resource "google_compute_vpn_tunnel" "tunnel1" { peer_ip = "15.0.0.120" shared_secret = "a secret message" - target_vpn_gateway = "${google_compute_vpn_gateway.target_gateway.self_link}" + target_vpn_gateway = google_compute_vpn_gateway.target_gateway.self_link depends_on = [ - "google_compute_forwarding_rule.fr_esp", - "google_compute_forwarding_rule.fr_udp500", - "google_compute_forwarding_rule.fr_udp4500", + google_compute_forwarding_rule.fr_esp, + google_compute_forwarding_rule.fr_udp500, + google_compute_forwarding_rule.fr_udp4500, ] } resource "google_compute_route" "route1" { name = "<%= ctx[:vars]['route_name'] %>" - network = "${google_compute_network.network1.name}" + network = google_compute_network.network1.name dest_range = "15.0.0.0/24" priority = 1000 - next_hop_vpn_tunnel = "${google_compute_vpn_tunnel.tunnel1.self_link}" + next_hop_vpn_tunnel = google_compute_vpn_tunnel.tunnel1.self_link } 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 + } } diff --git a/templates/terraform/examples/uptime_check_config_http.tf.erb b/templates/terraform/examples/uptime_check_config_http.tf.erb index 90210378f047..4c10c16a974b 100644 --- a/templates/terraform/examples/uptime_check_config_http.tf.erb +++ b/templates/terraform/examples/uptime_check_config_http.tf.erb @@ -1,6 +1,6 @@ resource "google_monitoring_uptime_check_config" "<%= ctx[:primary_resource_id] %>" { display_name = "<%= ctx[:vars]["display_name"] %>" - timeout = "60s" + timeout = "60s" http_check { path = "/some-path" @@ -11,11 +11,12 @@ resource "google_monitoring_uptime_check_config" "<%= ctx[:primary_resource_id] type = "uptime_url" labels = { project_id = "<%= ctx[:test_env_vars]["project_id"] %>" - host = "192.168.1.1" + host = "192.168.1.1" } } content_matchers { content = "example" } -} \ No newline at end of file +} + diff --git a/templates/terraform/examples/uptime_check_tcp.tf.erb b/templates/terraform/examples/uptime_check_tcp.tf.erb index 46e3ebf7097b..c86059090301 100644 --- a/templates/terraform/examples/uptime_check_tcp.tf.erb +++ b/templates/terraform/examples/uptime_check_tcp.tf.erb @@ -1,6 +1,6 @@ resource "google_monitoring_uptime_check_config" "<%= ctx[:primary_resource_id] %>" { display_name = "<%= ctx[:vars]["display_name"] %>" - timeout = "60s" + timeout = "60s" tcp_check { port = 888 @@ -8,12 +8,11 @@ resource "google_monitoring_uptime_check_config" "<%= ctx[:primary_resource_id] resource_group { resource_type = "INSTANCE" - group_id = "${google_monitoring_group.check.name}" + group_id = google_monitoring_group.check.name } } - resource "google_monitoring_group" "check" { display_name = "<%= ctx[:vars]["group_display_name"] %>" - filter = "resource.metadata.name=has_substring(\"foo\")" -} \ No newline at end of file + filter = "resource.metadata.name=has_substring(\"foo\")" +} diff --git a/templates/terraform/examples/url_map_basic.tf.erb b/templates/terraform/examples/url_map_basic.tf.erb index 973aaed32755..80146f35e2e7 100644 --- a/templates/terraform/examples/url_map_basic.tf.erb +++ b/templates/terraform/examples/url_map_basic.tf.erb @@ -2,7 +2,7 @@ resource "google_compute_url_map" "<%= ctx[:primary_resource_id] %>" { name = "<%= ctx[:vars]['url_map_name'] %>" description = "a description" - default_service = "${google_compute_backend_service.home.self_link}" + default_service = google_compute_backend_service.home.self_link host_rule { hosts = ["mysite.com"] @@ -11,26 +11,26 @@ resource "google_compute_url_map" "<%= ctx[:primary_resource_id] %>" { path_matcher { name = "allpaths" - default_service = "${google_compute_backend_service.home.self_link}" + default_service = google_compute_backend_service.home.self_link path_rule { paths = ["/home"] - service = "${google_compute_backend_service.home.self_link}" + service = google_compute_backend_service.home.self_link } path_rule { paths = ["/login"] - service = "${google_compute_backend_service.login.self_link}" + service = google_compute_backend_service.login.self_link } path_rule { paths = ["/static"] - service = "${google_compute_backend_bucket.static.self_link}" + service = google_compute_backend_bucket.static.self_link } } test { - service = "${google_compute_backend_service.home.self_link}" + service = google_compute_backend_service.home.self_link host = "hi.com" path = "/home" } @@ -42,7 +42,7 @@ resource "google_compute_backend_service" "login" { protocol = "HTTP" timeout_sec = 10 - health_checks = ["${google_compute_http_health_check.default.self_link}"] + health_checks = [google_compute_http_health_check.default.self_link] } resource "google_compute_backend_service" "home" { @@ -51,7 +51,7 @@ resource "google_compute_backend_service" "home" { protocol = "HTTP" timeout_sec = 10 - health_checks = ["${google_compute_http_health_check.default.self_link}"] + health_checks = [google_compute_http_health_check.default.self_link] } resource "google_compute_http_health_check" "default" { @@ -63,7 +63,7 @@ resource "google_compute_http_health_check" "default" { resource "google_compute_backend_bucket" "static" { name = "<%= ctx[:vars]['backend_bucket_name'] %>" - bucket_name = "${google_storage_bucket.static.name}" + bucket_name = google_storage_bucket.static.name enable_cdn = true } diff --git a/templates/terraform/examples/vpc_access_connector.tf.erb b/templates/terraform/examples/vpc_access_connector.tf.erb index 9ef9215dfef5..7b380abfe3d0 100644 --- a/templates/terraform/examples/vpc_access_connector.tf.erb +++ b/templates/terraform/examples/vpc_access_connector.tf.erb @@ -1,8 +1,9 @@ -provider "google-beta" {} +provider "google-beta" { +} resource "google_vpc_access_connector" "connector" { name = "<%= ctx[:vars]['name'] %>" - provider = "google-beta" + provider = google-beta region = "us-central1" ip_cidr_range = "10.8.0.0/28" network = "default" diff --git a/templates/terraform/examples/vpn_tunnel_basic.tf.erb b/templates/terraform/examples/vpn_tunnel_basic.tf.erb index 25e23ebb8c3a..4991d0d0234b 100644 --- a/templates/terraform/examples/vpn_tunnel_basic.tf.erb +++ b/templates/terraform/examples/vpn_tunnel_basic.tf.erb @@ -3,56 +3,56 @@ resource "google_compute_vpn_tunnel" "tunnel1" { peer_ip = "15.0.0.120" shared_secret = "a secret message" - target_vpn_gateway = "${google_compute_vpn_gateway.target_gateway.self_link}" + target_vpn_gateway = google_compute_vpn_gateway.target_gateway.self_link depends_on = [ - "google_compute_forwarding_rule.fr_esp", - "google_compute_forwarding_rule.fr_udp500", - "google_compute_forwarding_rule.fr_udp4500", + google_compute_forwarding_rule.fr_esp, + google_compute_forwarding_rule.fr_udp500, + google_compute_forwarding_rule.fr_udp4500, ] } resource "google_compute_vpn_gateway" "target_gateway" { name = "<%= ctx[:vars]['target_vpn_gateway_name'] %>" - network = "${google_compute_network.network1.self_link}" + network = google_compute_network.network1.self_link } resource "google_compute_network" "network1" { - name = "<%= ctx[:vars]['network_name'] %>" + name = "<%= ctx[:vars]['network_name'] %>" } resource "google_compute_address" "vpn_static_ip" { - name = "<%= ctx[:vars]['address_name'] %>" + name = "<%= ctx[:vars]['address_name'] %>" } resource "google_compute_forwarding_rule" "fr_esp" { name = "<%= ctx[:vars]['esp_forwarding_rule_name'] %>" ip_protocol = "ESP" - ip_address = "${google_compute_address.vpn_static_ip.address}" - target = "${google_compute_vpn_gateway.target_gateway.self_link}" + ip_address = google_compute_address.vpn_static_ip.address + target = google_compute_vpn_gateway.target_gateway.self_link } resource "google_compute_forwarding_rule" "fr_udp500" { name = "<%= ctx[:vars]['udp500_forwarding_rule_name'] %>" ip_protocol = "UDP" port_range = "500" - ip_address = "${google_compute_address.vpn_static_ip.address}" - target = "${google_compute_vpn_gateway.target_gateway.self_link}" + ip_address = google_compute_address.vpn_static_ip.address + target = google_compute_vpn_gateway.target_gateway.self_link } resource "google_compute_forwarding_rule" "fr_udp4500" { name = "<%= ctx[:vars]['udp4500_forwarding_rule_name'] %>" ip_protocol = "UDP" port_range = "4500" - ip_address = "${google_compute_address.vpn_static_ip.address}" - target = "${google_compute_vpn_gateway.target_gateway.self_link}" + ip_address = google_compute_address.vpn_static_ip.address + target = google_compute_vpn_gateway.target_gateway.self_link } resource "google_compute_route" "route1" { name = "<%= ctx[:vars]['route_name'] %>" - network = "${google_compute_network.network1.name}" + network = google_compute_network.network1.name dest_range = "15.0.0.0/24" priority = 1000 - next_hop_vpn_tunnel = "${google_compute_vpn_tunnel.tunnel1.self_link}" + next_hop_vpn_tunnel = google_compute_vpn_tunnel.tunnel1.self_link } diff --git a/templates/terraform/examples/vpn_tunnel_beta.tf.erb b/templates/terraform/examples/vpn_tunnel_beta.tf.erb index 4553262e209d..a363eb6b5da0 100644 --- a/templates/terraform/examples/vpn_tunnel_beta.tf.erb +++ b/templates/terraform/examples/vpn_tunnel_beta.tf.erb @@ -1,15 +1,15 @@ resource "google_compute_vpn_tunnel" "tunnel1" { - provider = "google-beta" + provider = google-beta name = "<%= ctx[:vars]['vpn_tunnel_name'] %>" peer_ip = "15.0.0.120" shared_secret = "a secret message" - target_vpn_gateway = "${google_compute_vpn_gateway.target_gateway.self_link}" + target_vpn_gateway = google_compute_vpn_gateway.target_gateway.self_link depends_on = [ - "google_compute_forwarding_rule.fr_esp", - "google_compute_forwarding_rule.fr_udp500", - "google_compute_forwarding_rule.fr_udp4500", + google_compute_forwarding_rule.fr_esp, + google_compute_forwarding_rule.fr_udp500, + google_compute_forwarding_rule.fr_udp4500, ] labels = { @@ -18,58 +18,58 @@ resource "google_compute_vpn_tunnel" "tunnel1" { } resource "google_compute_vpn_gateway" "target_gateway" { - provider = "google-beta" - name = "<%= ctx[:vars]['target_vpn_gateway_name'] %>" - network = "${google_compute_network.network1.self_link}" + provider = google-beta + name = "<%= ctx[:vars]['target_vpn_gateway_name'] %>" + network = google_compute_network.network1.self_link } resource "google_compute_network" "network1" { - provider = "google-beta" - name = "<%= ctx[:vars]['network_name'] %>" + provider = google-beta + name = "<%= ctx[:vars]['network_name'] %>" } resource "google_compute_address" "vpn_static_ip" { - provider = "google-beta" - name = "<%= ctx[:vars]['address_name'] %>" + provider = google-beta + name = "<%= ctx[:vars]['address_name'] %>" } resource "google_compute_forwarding_rule" "fr_esp" { - provider = "google-beta" + provider = google-beta name = "<%= ctx[:vars]['esp_forwarding_rule_name'] %>" ip_protocol = "ESP" - ip_address = "${google_compute_address.vpn_static_ip.address}" - target = "${google_compute_vpn_gateway.target_gateway.self_link}" + ip_address = google_compute_address.vpn_static_ip.address + target = google_compute_vpn_gateway.target_gateway.self_link } resource "google_compute_forwarding_rule" "fr_udp500" { - provider = "google-beta" + provider = google-beta name = "<%= ctx[:vars]['udp500_forwarding_rule_name'] %>" ip_protocol = "UDP" port_range = "500" - ip_address = "${google_compute_address.vpn_static_ip.address}" - target = "${google_compute_vpn_gateway.target_gateway.self_link}" + ip_address = google_compute_address.vpn_static_ip.address + target = google_compute_vpn_gateway.target_gateway.self_link } resource "google_compute_forwarding_rule" "fr_udp4500" { - provider = "google-beta" + provider = google-beta name = "<%= ctx[:vars]['udp4500_forwarding_rule_name'] %>" ip_protocol = "UDP" port_range = "4500" - ip_address = "${google_compute_address.vpn_static_ip.address}" - target = "${google_compute_vpn_gateway.target_gateway.self_link}" + ip_address = google_compute_address.vpn_static_ip.address + target = google_compute_vpn_gateway.target_gateway.self_link } resource "google_compute_route" "route1" { - provider = "google-beta" + provider = google-beta name = "<%= ctx[:vars]['route_name'] %>" - network = "${google_compute_network.network1.name}" + network = google_compute_network.network1.name dest_range = "15.0.0.0/24" priority = 1000 - next_hop_vpn_tunnel = "${google_compute_vpn_tunnel.tunnel1.self_link}" + next_hop_vpn_tunnel = google_compute_vpn_tunnel.tunnel1.self_link } -provider "google-beta"{ +provider "google-beta" { region = "us-central1" zone = "us-central1-a" }