Skip to content

Update to restapi provider v3 to use ignore_server_additions #390

@jor2

Description

@jor2

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_cspm via 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:

  1. Update provider version constraint to >= 3.0.0
  2. Replace ignore_all_server_changes = true with ignore_server_additions = true
resource "restapi_object" "cspm" {
  # ...
  
  # Replace this:
  # ignore_all_server_changes = true
  
  # With this:
  ignore_server_additions = true
}

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions