generated from terraform-ibm-modules/terraform-ibm-module-template
-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Description
Summary
The current workaround for restapi provider issue #319 uses ignore_all_server_changes = true which has a limitation: out-of-band changes to CSPM configuration will not be detected by Terraform.
Current Behavior
With ignore_all_server_changes = true:
- Terraform ignores all differences between config and API response
- This includes both server-added fields AND server-modified fields
- If someone changes
enable_cspmvia the console/CLI/API, Terraform won't detect the drift
This means the CSPM configuration must be fully managed by Terraform - any out-of-band changes will be invisible.
Solution
The restapi provider v3.0.0-rc1 includes ignore_server_additions which provides a better solution:
| Attribute | Ignores server-added fields | Detects out-of-band changes |
|---|---|---|
ignore_all_server_changes = true (current) |
Yes | No |
ignore_server_additions = true (v3) |
Yes | Yes |
Action Required
Once restapi provider v3.0.0 is stable:
- Update provider version constraint to
>= 3.0.0 - Replace
ignore_all_server_changes = truewithignore_server_additions = true
resource "restapi_object" "cspm" {
# ...
# Replace this:
# ignore_all_server_changes = true
# With this:
ignore_server_additions = true
}Related
- PR fix: resolve restapi_object drift on every terraform apply #388 - Original fix for drift issue
- restapi provider PR #336 - Added
ignore_server_additions - restapi provider v3.0.0-rc1 - Release containing the fix
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels