Skip to content

Commit d2c3941

Browse files
Updated disruption budget to use API-correct percent key instead of p… (#4148) (#2644)
Signed-off-by: Modular Magician <[email protected]>
1 parent 9f64b92 commit d2c3941

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.changelog/4148.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:bug
2+
osconfig: fixed an issue where the `rollout.disruption_budget.percentage` field in `google_os_config_patch_deployment` did not correspond to a field in the API
3+
```

google-beta/resource_os_config_patch_deployment.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2008,7 +2008,7 @@ func flattenOSConfigPatchDeploymentRolloutDisruptionBudget(v interface{}, d *sch
20082008
transformed["fixed"] =
20092009
flattenOSConfigPatchDeploymentRolloutDisruptionBudgetFixed(original["fixed"], d, config)
20102010
transformed["percentage"] =
2011-
flattenOSConfigPatchDeploymentRolloutDisruptionBudgetPercentage(original["percentage"], d, config)
2011+
flattenOSConfigPatchDeploymentRolloutDisruptionBudgetPercentage(original["percent"], d, config)
20122012
return []interface{}{transformed}
20132013
}
20142014
func flattenOSConfigPatchDeploymentRolloutDisruptionBudgetFixed(v interface{}, d *schema.ResourceData, config *Config) interface{} {
@@ -3242,7 +3242,7 @@ func expandOSConfigPatchDeploymentRolloutDisruptionBudget(v interface{}, d Terra
32423242
if err != nil {
32433243
return nil, err
32443244
} else if val := reflect.ValueOf(transformedPercentage); val.IsValid() && !isEmptyValue(val) {
3245-
transformed["percentage"] = transformedPercentage
3245+
transformed["percent"] = transformedPercentage
32463246
}
32473247

32483248
return transformed, nil

0 commit comments

Comments
 (0)