Hi, I am trying out the new terraform provider for appwrite that was introduced a few weeks back. As a first step I wanted to import our existing databases into a terraform state. When I try to import columns of type "string" terraform detects a change and plans a recreation of the column.
I had an example here but the message got too long and I wasn't allowed to post. This is the example https://pastebin.com/XXjCFNVW
So the api tells me the column type is string but terraform interprets type = "string" as a change requiring recreation. For now I am testing in a dev environment but later when I import in prod recreating the column is not an option. Am I misunderstanding something here? I have tried all "similar" types (varchar, text, longtext, mediumtext) just to see if it would have an effect but all lead to the same outcome.
Example from the pastebin above:
curl -XGET -H 'X-Appwrite-Project: my-project-id' -H 'X-Appwrite-Key: my-appwrite-key' 'https://my-appwrite-host.org/v1/tablesdb/my_db/tables/my_table/columns/user_id'
returns
{
"key": "user_id",
"type": "string",
"status": "available",
"error": "",
"required": true,
"array": false,
"$createdAt": "2025-10-29T14:19:10.427+00:00",
"$updatedAt": "2025-10-29T14:19:10.457+00:00",
"size": 128,
"default": null,
"encrypt": false
}
But trying to import this into terraform state like
resource "appwrite_tablesdb_column" "my_db_my_table_user_id" {
database_id = appwrite_tablesdb.my_db.id
table_id = appwrite_tablesdb_table.my_db_my_table.id
type = "string"
key = "user_id"
array = false
default = null
encrypt = false
required = true
size = 128
}
import {
to = appwrite_tablesdb_column.my_db_my_table_user_id
id = "my_db/my_table/user_id"
}
Returns the following change in the terraform plan
# appwrite_tablesdb_column.my_db_my_table_user_id must be replaced
# (imported from "my_db/my_table/user_id")
# Warning: this will destroy the imported resource
-/+ resource "appwrite_tablesdb_column" "my_db_my_table_user_id" {
array = false
~ created_at = "2025-10-29T14:19:10.427+00:00" -> (known after apply)
database_id = "my_db"
encrypt = false
key = "user_id"
~ project_id = "my-project-id" -> (known after apply)
required = true
size = 128
table_id = "my_table"
+ type = "string" # forces replacement
~ updated_at = "2025-10-29T14:19:10.457+00:00" -> (known after apply)
}
Recommended threads
- Self-hosted 1.9.0 — what's the canonical...
Self-hosted 1.9.0 — canonical way for functions to call the API on the same host? Setup: Go functions on self-hosted 1.9.0. Public domain via traefik, valid LE...
- Payment problems
Its really beginning to frustrate me, last month I was on Pro plan on Appwrite cloud, I chose the option to downgrade next month(this one) to Free plan, and tha...
- Export issue
I just hit my free appwrite limit (500k reads) I'm willing to switch to local db but I can't export the db data from console. I'm getting: 402 Database reads l...