Skip to content

Commit afd5f4b

Browse files
modular-magicianzli82016
authored andcommitted
New generated code for MM PR 14057.
Signed-off-by: Modular Magician <[email protected]>
1 parent 20298a1 commit afd5f4b

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

google-beta/services/compute/resource_compute_instance.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ func IpCidrRangeDiffSuppress(k, old, new string, d *schema.ResourceData) bool {
5252
}
5353

5454
func DisksForceAttachDiffSuppress(_, old, new string, _ *schema.ResourceData) bool {
55+
if (new == "false" && old == "") || (new == "" && old == "false") {
56+
return true
57+
}
58+
5559
if new == old {
5660
return true
5761
}

google-beta/services/compute/resource_compute_instance_test.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,16 @@ func TestDisksForceAttachDiffSuppress(t *testing.T) {
120120
New: "false",
121121
ExpectDiffSuppress: true,
122122
},
123+
"force_attach changed false from empty": {
124+
Old: "",
125+
New: "false",
126+
ExpectDiffSuppress: true,
127+
},
128+
"force_attach changed empty from false": {
129+
Old: "false",
130+
New: "",
131+
ExpectDiffSuppress: true,
132+
},
123133
}
124134

125135
for tn, tc := range cases {

0 commit comments

Comments
 (0)