Skip to content

Commit 70b6472

Browse files
Fixed not being able to update preview status in SecurityPolicyRule and RegionSecurityPolicyRule (#13360)
1 parent 476221c commit 70b6472

File tree

4 files changed

+32
-14
lines changed

4 files changed

+32
-14
lines changed

mmv1/products/compute/RegionSecurityPolicyRule.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,7 @@ properties:
484484
description: |
485485
If set to true, the specified action is not enforced.
486486
min_version: 'beta'
487+
send_empty_value: true
487488
- name: 'networkMatch'
488489
type: NestedObject
489490
description: |

mmv1/products/compute/SecurityPolicyRule.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -484,3 +484,4 @@ properties:
484484
type: Boolean
485485
description: |
486486
If set to true, the specified action is not enforced.
487+
send_empty_value: true

mmv1/third_party/terraform/services/compute/resource_compute_region_security_policy_rule_test.go.tmpl

+21-13
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,27 @@ func TestAccComputeRegionSecurityPolicyRule_regionSecurityPolicyRuleBasicUpdate(
2424
{
2525
Config: testAccComputeRegionSecurityPolicyRule_regionSecurityPolicyRulePreUpdate(context),
2626
},
27-
{
28-
ResourceName: "google_compute_region_security_policy_rule.policy_rule",
29-
ImportState: true,
30-
ImportStateVerify: true,
31-
},
32-
{
33-
Config: testAccComputeRegionSecurityPolicyRule_regionSecurityPolicyRulePostUpdate(context),
34-
},
35-
{
36-
ResourceName: "google_compute_region_security_policy_rule.policy_rule",
37-
ImportState: true,
38-
ImportStateVerify: true,
39-
},
27+
{
28+
ResourceName: "google_compute_region_security_policy_rule.policy_rule",
29+
ImportState: true,
30+
ImportStateVerify: true,
31+
},
32+
{
33+
Config: testAccComputeRegionSecurityPolicyRule_regionSecurityPolicyRulePostUpdate(context),
34+
},
35+
{
36+
ResourceName: "google_compute_region_security_policy_rule.policy_rule",
37+
ImportState: true,
38+
ImportStateVerify: true,
39+
},
40+
{
41+
Config: testAccComputeRegionSecurityPolicyRule_regionSecurityPolicyRulePreUpdate(context),
42+
},
43+
{
44+
ResourceName: "google_compute_region_security_policy_rule.policy_rule",
45+
ImportState: true,
46+
ImportStateVerify: true,
47+
},
4048
},
4149
})
4250
}

mmv1/third_party/terraform/services/compute/resource_compute_security_policy_rule_test.go.tmpl

+9-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func TestAccComputeSecurityPolicyRule_basicUpdate(t *testing.T) {
2727
{
2828
ResourceName: "google_compute_security_policy_rule.policy_rule",
2929
ImportState: true,
30-
ImportStateVerify: true,
30+
ImportStateVerify: true,
3131
},
3232
{
3333
Config: testAccComputeSecurityPolicyRule_postBasicUpdate(context),
@@ -37,6 +37,14 @@ func TestAccComputeSecurityPolicyRule_basicUpdate(t *testing.T) {
3737
ImportState: true,
3838
ImportStateVerify: true,
3939
},
40+
{
41+
Config: testAccComputeSecurityPolicyRule_preBasicUpdate(context),
42+
},
43+
{
44+
ResourceName: "google_compute_security_policy_rule.policy_rule",
45+
ImportState: true,
46+
ImportStateVerify: true,
47+
},
4048
},
4149
})
4250
}

0 commit comments

Comments
 (0)