From 5c016fc529b330d27efa50f8d4e746c39f5bc6fa Mon Sep 17 00:00:00 2001 From: The Magician Date: Fri, 19 Feb 2021 13:27:37 -0800 Subject: [PATCH] send_empty_values flag added for guest_flush (#4502) (#2975) Signed-off-by: Modular Magician --- .changelog/4502.txt | 3 +++ google-beta/resource_compute_resource_policy.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 .changelog/4502.txt diff --git a/.changelog/4502.txt b/.changelog/4502.txt new file mode 100644 index 0000000000..c4a92c8ae6 --- /dev/null +++ b/.changelog/4502.txt @@ -0,0 +1,3 @@ +```release-note:bug + compute : fixed a bug where `guest_flush` could not be set to false for the resource `google_compute_resource_policy` +``` diff --git a/google-beta/resource_compute_resource_policy.go b/google-beta/resource_compute_resource_policy.go index 9c1099d236..b45a621e53 100644 --- a/google-beta/resource_compute_resource_policy.go +++ b/google-beta/resource_compute_resource_policy.go @@ -1032,7 +1032,7 @@ func expandComputeResourcePolicySnapshotSchedulePolicySnapshotProperties(v inter transformedGuestFlush, err := expandComputeResourcePolicySnapshotSchedulePolicySnapshotPropertiesGuestFlush(original["guest_flush"], d, config) if err != nil { return nil, err - } else if val := reflect.ValueOf(transformedGuestFlush); val.IsValid() && !isEmptyValue(val) { + } else { transformed["guestFlush"] = transformedGuestFlush }