CX as Code provider failing on integration action updates

cx-as-code is ignoring changes to genesyscloud_integration_action resources. The terraform plan says no changes, but the config differs from the org. Manual updates via /api/v2/integrations/actions/{actionId} work fine, but the provider won’t pick up the drift. It’s breaking our deployment pipeline.

resource "genesyscloud_integration_action" "test_action" {
 name = "Update Customer"
 integration {
 id = "12345-abcde"
 }
 # Changes here aren't detected
}
1 Like

this sounds like the provider is checking the published version instead of the draft. for what it’s worth, try hitting GET /api/v2/integrations/actions/{actionId}/draft to see if the drift is actually sitting in the draft state.

if the draft is updated but the provider doesn’t see it, you might have to manually push the draft to production before the plan picks up the change. ymmv but that’s a known quirk with some of the integration resources.

2 Likes

Fun one today. Why is the provider missing this? It’s because the draft state doesn’t automatically sync back to the main resource.

Cause: Drift is stuck in the draft version of the action.
Solution: Use PATCH /api/v2/integrations/actions/{actionId}/draft to force the update and then publish it manually.