Commit 53304c0
committed
fix(cloudrunv2): Resolve persistent diff on WorkerPool scaling_mode
The `google_cloud_run_v2_worker_pool` resource showed a perpetual diff
on the `scaling.scaling_mode` field. When the `scaling` block was
configured (e.g., with `manual_instance_count`) but `scaling_mode` was
omitted, Terraform would try to remove the `scaling_mode` attribute
on subsequent plans.
This occurred because the Cloud Run API defaults `scaling_mode` to "MANUAL"
if not specified, but the Terraform resource schema did not account for
this server-side default.
This commit adds `default_from_api: true` to the `scaling.scaling_mode`
field in the magic-modules YAML definition. This informs the provider
that the API may return a default value for this field, preventing
Terraform from detecting a diff when the API provides the "MANUAL" value
that isn't explicitly in the configuration.1 parent 04f00cb commit 53304c0
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
| 297 | + | |
297 | 298 | | |
298 | 299 | | |
299 | 300 | | |
| |||
0 commit comments