From a5aee180aacb24e25f6615d7a198480c0a87a26a Mon Sep 17 00:00:00 2001 From: Modular Magician Date: Wed, 16 Dec 2020 03:42:35 +0000 Subject: [PATCH] ForceOverride as ignore read as it does not appear in response (#4304) * ForceOverride as ignore read as it does not appear in response * Update ignore to work on the flattener * Remove beta Signed-off-by: Modular Magician --- .changelog/4304.txt | 3 +++ google/resource_cloud_run_domain_mapping.go | 3 ++- google/resource_cloud_run_domain_mapping_generated_test.go | 3 --- website/docs/r/cloud_run_domain_mapping.html.markdown | 3 --- 4 files changed, 5 insertions(+), 7 deletions(-) create mode 100644 .changelog/4304.txt diff --git a/.changelog/4304.txt b/.changelog/4304.txt new file mode 100644 index 00000000000..f7311eedf29 --- /dev/null +++ b/.changelog/4304.txt @@ -0,0 +1,3 @@ +```release-note:bug +cloudrun: fixed a permanent diff on `google_cloud_run_domain_mapping` `spec.force_override` field +``` diff --git a/google/resource_cloud_run_domain_mapping.go b/google/resource_cloud_run_domain_mapping.go index e23ee28c400..c913d23986b 100644 --- a/google/resource_cloud_run_domain_mapping.go +++ b/google/resource_cloud_run_domain_mapping.go @@ -625,7 +625,8 @@ func flattenCloudRunDomainMappingSpec(v interface{}, d *schema.ResourceData, con return []interface{}{transformed} } func flattenCloudRunDomainMappingSpecForceOverride(v interface{}, d *schema.ResourceData, config *Config) interface{} { - return v + // We want to ignore read on this field, but cannot because it is nested + return d.Get("spec.0.force_override") } func flattenCloudRunDomainMappingSpecRouteName(v interface{}, d *schema.ResourceData, config *Config) interface{} { diff --git a/google/resource_cloud_run_domain_mapping_generated_test.go b/google/resource_cloud_run_domain_mapping_generated_test.go index 87a94f60ad0..876c9712a16 100644 --- a/google/resource_cloud_run_domain_mapping_generated_test.go +++ b/google/resource_cloud_run_domain_mapping_generated_test.go @@ -78,9 +78,6 @@ resource "google_cloud_run_domain_mapping" "default" { metadata { namespace = "%{namespace}" - annotations = { - "run.googleapis.com/launch-stage" = "BETA" - } } spec { diff --git a/website/docs/r/cloud_run_domain_mapping.html.markdown b/website/docs/r/cloud_run_domain_mapping.html.markdown index 9b1fceb5c8b..80a7ec934b2 100644 --- a/website/docs/r/cloud_run_domain_mapping.html.markdown +++ b/website/docs/r/cloud_run_domain_mapping.html.markdown @@ -64,9 +64,6 @@ resource "google_cloud_run_domain_mapping" "default" { metadata { namespace = "my-project-name" - annotations = { - "run.googleapis.com/launch-stage" = "BETA" - } } spec {