From 6846f60ea4cdfd6d63e69cdb0025f0ec25d0fb52 Mon Sep 17 00:00:00 2001 From: Cameron Thornton Date: Tue, 3 Aug 2021 16:29:51 -0500 Subject: [PATCH] add vpc_auto_create sample (#5023) --- mmv1/products/compute/terraform.yaml | 2 ++ .../terraform/examples/network_custom_mtu.tf.erb | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/mmv1/products/compute/terraform.yaml b/mmv1/products/compute/terraform.yaml index f85f68d5d430..a1a68e2bc996 100644 --- a/mmv1/products/compute/terraform.yaml +++ b/mmv1/products/compute/terraform.yaml @@ -1194,6 +1194,8 @@ overrides: !ruby/object:Overrides::ResourceOverrides primary_resource_id: "vpc_network" vars: network_name: "vpc-network" + test_env_vars: + project: :PROJECT_NAME virtual_fields: - !ruby/object:Api::Type::Boolean name: 'delete_default_routes_on_create' diff --git a/mmv1/templates/terraform/examples/network_custom_mtu.tf.erb b/mmv1/templates/terraform/examples/network_custom_mtu.tf.erb index fcf61e77b9f4..a9250f3e645b 100644 --- a/mmv1/templates/terraform/examples/network_custom_mtu.tf.erb +++ b/mmv1/templates/terraform/examples/network_custom_mtu.tf.erb @@ -1,4 +1,8 @@ +# [START vpc_auto_create] resource "google_compute_network" "<%= ctx[:primary_resource_id] %>" { - name = "<%= ctx[:vars]['network_name'] %>" - mtu = 1500 + project = "<%= ctx[:test_env_vars]["project"] %>" + name = "<%= ctx[:vars]['network_name'] %>" + auto_create_subnetworks = true + mtu = 1460 } +# [END vpc_auto_create] \ No newline at end of file