diff --git a/products/compute/terraform.yaml b/products/compute/terraform.yaml index 4d4f18846665..cdbd202e7e62 100644 --- a/products/compute/terraform.yaml +++ b/products/compute/terraform.yaml @@ -801,7 +801,7 @@ overrides: !ruby/object:Overrides::ResourceOverrides ignore_read: true custom_code: !ruby/object:Provider::Terraform::CustomCode pre_delete: templates/terraform/pre_delete/compute_network_endpoint.go.erb - decoder: templates/terraform/decoders/compute_network_endpoint.go.erb + decoder: templates/terraform/decoders/unwrap_resource.go.erb encoder: templates/terraform/encoders/compute_network_endpoint.go.erb NetworkEndpointGroup: !ruby/object:Overrides::Terraform::ResourceOverride examples: diff --git a/templates/terraform/decoders/compute_network_endpoint.go.erb b/templates/terraform/decoders/unwrap_resource.go.erb similarity index 93% rename from templates/terraform/decoders/compute_network_endpoint.go.erb rename to templates/terraform/decoders/unwrap_resource.go.erb index 20fe5d4526e8..92bb21dccb35 100644 --- a/templates/terraform/decoders/compute_network_endpoint.go.erb +++ b/templates/terraform/decoders/unwrap_resource.go.erb @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -%> -v, ok := res["networkEndpoint"] +v, ok := res["<%= object.name.camelize(:lower) %>"] if !ok || v == nil { return res, nil }