Skip to content

Commit

Permalink
ForceOverride as ignore read as it does not appear in response (#4304) (
Browse files Browse the repository at this point in the history
#8026)

* 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 <[email protected]>
  • Loading branch information
modular-magician authored Dec 16, 2020
1 parent b774178 commit 9705ef2
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .changelog/4304.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
cloudrun: fixed a permanent diff on `google_cloud_run_domain_mapping` `spec.force_override` field
```
3 changes: 2 additions & 1 deletion google/resource_cloud_run_domain_mapping.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{} {
Expand Down
3 changes: 0 additions & 3 deletions google/resource_cloud_run_domain_mapping_generated_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,6 @@ resource "google_cloud_run_domain_mapping" "default" {
metadata {
namespace = "%{namespace}"
annotations = {
"run.googleapis.com/launch-stage" = "BETA"
}
}
spec {
Expand Down
3 changes: 0 additions & 3 deletions website/docs/r/cloud_run_domain_mapping.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@ resource "google_cloud_run_domain_mapping" "default" {
metadata {
namespace = "my-project-name"
annotations = {
"run.googleapis.com/launch-stage" = "BETA"
}
}
spec {
Expand Down

0 comments on commit 9705ef2

Please sign in to comment.