Using a CICD pipeline (Jenkins -> Terraform -> MyPureCloud client), we are unable to change or remove a column in a datatable - datatable was created successfully using CICD, but cannot be changed because of the following error:
│ Error: Failed to update datatable test-cicd-datatable: API Error: 400 - Field '[REDACTED len=4]' is missing from the proposed schema
Example similar to the one in the documentation here: Terraform Registry
Data table gets created successfully, but if we change name/title or remove a properties element, we get the error above.
In the Plan section, the change is identified successfully:
However, it then errors out:
module.architect_datatable.genesyscloud_architect_datatable.test-cicd-datatable: Modifying... [id=e46e67d9-3ba2-41d6-afdc-270feaaa51f7]
╷
│ Error: Failed to update datatable test-cicd-datatable: API Error: 400 - Field '[REDACTED len=4]' is missing from the proposed schema (a74b7090-675d-492b-a691-c83a1fd7483f)
│
│ with module.architect_datatable.genesyscloud_architect_datatable.test-cicd-datatable,
│ on modules/architect_datatable/home-datatable-test-cicd-datatable.tf line 1, in resource "genesyscloud_architect_datatable" "test-cicd-datatable":
│ 1: resource "genesyscloud_architect_datatable" "test-cicd-datatable" {
When you add field label information, Genesys Cloud automatically populates the API Field ID , letting you know what field to use if you add data via the API.
After you save the data table, you cannot delete a custom field. You must either create a duplicate table with the fields and rows you want to keep, or simply ignore the field in the original data table.
After you create a data table, you cannot change the API value of custom fields. You can only change the labels.
Once published:
you can add a column
you can't remove a column (you can't remove a properties from a datatable ressource in terraform).
you can only change the label (title) of a column, but not its name.
This has not changed.
This is a constraint on architect data table (in Genesys Cloud).
It is not related to terraform and terraform versions.
The constraint has always been there (I have always seen this since I started on Genesys Cloud several years ago).
The ticket you are referencing is about something else.
"...when a Datatable column is added, terraform indicates that the whole Datatable will be deleted and re-created (losing all the data and getting a new GUID in the process)..."
Apparently it was about an issue with terraform when adding a column (which was deleting and recreating the table).
It does not appear to do so anymore - you can add columns - the datatable and its data are preserved.