From 59b2d9655a0c2c861240a41e9ca50da07b564d37 Mon Sep 17 00:00:00 2001 From: Riley Karson Date: Tue, 27 Aug 2019 11:04:19 -0700 Subject: [PATCH] Ignore region resourcerefs --- build/kcc/servicemappings/compute.yaml | 8 -------- templates/kcc/product/service_mapping.yaml.erb | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/build/kcc/servicemappings/compute.yaml b/build/kcc/servicemappings/compute.yaml index aaa4a5371a91..5f65db9cb212 100644 --- a/build/kcc/servicemappings/compute.yaml +++ b/build/kcc/servicemappings/compute.yaml @@ -48,10 +48,6 @@ spec: name: name idTemplate: "projects/{{project}}/regions/{{region}}/backendServices/{{name}}" resourceReferences: - - key: regionRef - tfField: region - kind: Region - required: false - name: google_compute_backend_service_signed_url_key kind: ComputeBackendServiceSignedUrlKey metadataMapping: @@ -265,10 +261,6 @@ spec: tfField: network kind: Network required: true - - key: regionRef - tfField: region - kind: Region - required: false - name: google_compute_target_http_proxy kind: ComputeTargetHttpProxy metadataMapping: diff --git a/templates/kcc/product/service_mapping.yaml.erb b/templates/kcc/product/service_mapping.yaml.erb index be3f35ab8f44..7663814c42e3 100644 --- a/templates/kcc/product/service_mapping.yaml.erb +++ b/templates/kcc/product/service_mapping.yaml.erb @@ -58,7 +58,7 @@ spec: unless references.empty? -%> resourceReferences: -<%- references.each do |property| -%> +<%- references.reject { |p| p.name == 'region' }.each do |property| -%> - key: <%= property.name.camelize(:lower) %>Ref tfField: <%= property.name %> kind: <%= property.resource %>