From 26895c94ce9d72e81adee2447b451e19f44db048 Mon Sep 17 00:00:00 2001 From: Sam Levenick Date: Tue, 29 Oct 2019 14:05:36 -0700 Subject: [PATCH] Remove encoder, can be done as send_empty_value on autoCreateSubnetworks (#2559) --- products/compute/terraform.yaml | 2 +- templates/terraform/encoders/network.erb | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) delete mode 100644 templates/terraform/encoders/network.erb diff --git a/products/compute/terraform.yaml b/products/compute/terraform.yaml index c13dfe1f3574..e235ddd315ae 100644 --- a/products/compute/terraform.yaml +++ b/products/compute/terraform.yaml @@ -920,6 +920,7 @@ overrides: !ruby/object:Overrides::ResourceOverrides exclude: true autoCreateSubnetworks: !ruby/object:Overrides::Terraform::PropertyOverride default_value: True + send_empty_value: true # autoCreateSubnetworks defaults to true, so we need to disable it explicitly conflicts: [] routingConfig: !ruby/object:Overrides::Terraform::PropertyOverride @@ -935,7 +936,6 @@ overrides: !ruby/object:Overrides::ResourceOverrides default_from_api: true custom_code: !ruby/object:Provider::Terraform::CustomCode post_create: templates/terraform/post_create/compute_network_delete_default_route.erb - encoder: templates/terraform/encoders/network.erb extra_schema_entry: templates/terraform/extra_schema_entry/network.erb NetworkEndpoint: !ruby/object:Overrides::Terraform::ResourceOverride id_format: "{{project}}/{{zone}}/{{network_endpoint_group}}/{{instance}}/{{ip_address}}/{{port}}" diff --git a/templates/terraform/encoders/network.erb b/templates/terraform/encoders/network.erb deleted file mode 100644 index 74f3566a0e7e..000000000000 --- a/templates/terraform/encoders/network.erb +++ /dev/null @@ -1,3 +0,0 @@ -obj["autoCreateSubnetworks"] = d.Get("auto_create_subnetworks") - -return obj, nil