Skip to content

Commit

Permalink
Updated disruption budget to use API-correct percent key instead of p… (
Browse files Browse the repository at this point in the history
hashicorp#4148)

Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician committed Oct 27, 2020
1 parent c100d6c commit b1ff47c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .changelog/4148.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
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
```
4 changes: 2 additions & 2 deletions google/resource_os_config_patch_deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -2008,7 +2008,7 @@ func flattenOSConfigPatchDeploymentRolloutDisruptionBudget(v interface{}, d *sch
transformed["fixed"] =
flattenOSConfigPatchDeploymentRolloutDisruptionBudgetFixed(original["fixed"], d, config)
transformed["percentage"] =
flattenOSConfigPatchDeploymentRolloutDisruptionBudgetPercentage(original["percentage"], d, config)
flattenOSConfigPatchDeploymentRolloutDisruptionBudgetPercentage(original["percent"], d, config)
return []interface{}{transformed}
}
func flattenOSConfigPatchDeploymentRolloutDisruptionBudgetFixed(v interface{}, d *schema.ResourceData, config *Config) interface{} {
Expand Down Expand Up @@ -3242,7 +3242,7 @@ func expandOSConfigPatchDeploymentRolloutDisruptionBudget(v interface{}, d Terra
if err != nil {
return nil, err
} else if val := reflect.ValueOf(transformedPercentage); val.IsValid() && !isEmptyValue(val) {
transformed["percentage"] = transformedPercentage
transformed["percent"] = transformedPercentage
}

return transformed, nil
Expand Down

0 comments on commit b1ff47c

Please sign in to comment.