I can’t seem to figure out why terraform import returns a 404 Not Found for a genesyscloud_custom_integrations_custom_integration resource when the ID is verified as correct via the REST API.
Context:
We are migrating our Data Action orchestration configs to Terraform state. I have a custom integration (ID: a1b2c3d4-e5f6-7890-abcd-ef1234567890) that is actively used by Data Actions. I confirmed the resource exists and is accessible via the Genesys Cloud Admin UI and via a direct GET request to /api/v2/custom-integrations/custom-integrations/a1b2c3d4-e5f6-7890-abcd-ef1234567890 using my service account token. The response is 200 OK with full JSON payload.
However, when I run:
terraform import genesyscloud_custom_integrations_custom_integration.my_integration a1b2c3d4-e5f6-7890-abcd-ef1234567890
The provider logs show:
2023-10-25T14:30:00.000+09:00 [ERROR] provider: error importing custom_integration: 404 Not Found
I have checked the following:
- The service account has
admin:custom_integrationpermissions. - The
genesyscloud_custom_integrations_custom_integrationresource block in my.tffile matches the structure of the API response. - There are no typos in the ID.
I suspect the import function in the provider might be hitting a different endpoint or failing to handle the nested custom_integration vs custom_integration_type distinction correctly. Or perhaps the ID format requires a prefix that I am missing.
Question:
How does the genesyscloud Terraform provider resolve the ID during import for custom integrations? Is there a known issue with importing resources that have active dependencies (like Data Actions)? I need to get this into state to manage the JSON payload mapping for our Data Actions via code.