Skip to content

Commit 442e57e

Browse files
authored
Merge pull request #4 from appwrite/CLO-4192-prefix-resources-with-specific-category
feat: prefix resources with category, change database to tablesdb, add tablesdb_row
2 parents 06ff2b3 + 8c5917f commit 442e57e

93 files changed

Lines changed: 2078 additions & 680 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -43,48 +43,51 @@ If an environment variable is provided, then the option does not need to be set
4343

4444
## Resources
4545

46-
| Resource | Description |
47-
|-------------------------------|--------------------|
48-
| `appwrite_database` | Database |
49-
| `appwrite_table` | Database table |
50-
| `appwrite_column` | Table column |
51-
| `appwrite_index` | Table index |
52-
| `appwrite_bucket` | Storage bucket |
53-
| `appwrite_messaging_provider` | Messaging provider |
54-
| `appwrite_messaging_topic` | Messaging topic |
55-
| `appwrite_user` | User |
56-
| `appwrite_team` | Team |
46+
| Resource | Description |
47+
|-----------------------------------|------------------------|
48+
| `appwrite_tablesdb` | Database |
49+
| `appwrite_tablesdb_table` | Database table |
50+
| `appwrite_tablesdb_column` | Table column |
51+
| `appwrite_tablesdb_index` | Table index |
52+
| `appwrite_tablesdb_row` | Table row |
53+
| `appwrite_storage_bucket` | Storage bucket |
54+
| `appwrite_backup_policy` | Backup policy |
55+
| `appwrite_messaging_provider` | Messaging provider |
56+
| `appwrite_messaging_topic` | Messaging topic |
57+
| `appwrite_auth_user` | User |
58+
| `appwrite_auth_team` | Team |
59+
5760

5861
## Data Sources
5962

60-
| Data Source | Description |
61-
|---------------------|---------------------------------|
62-
| `appwrite_database` | Look up a database by identifier |
63+
| Data Source | Description |
64+
|---------------------|----------------------------------|
65+
| `appwrite_tablesdb` | Look up a tablesdb by identifier |
6366

6467
## Example
6568

6669
```hcl
67-
resource "appwrite_database" "main" {
70+
resource "appwrite_tablesdb" "main" {
6871
id = "main"
6972
name = "main"
7073
}
7174
72-
resource "appwrite_table" "users" {
73-
database_id = appwrite_database.main.id
75+
resource "appwrite_tablesdb_table" "users" {
76+
database_id = appwrite_tablesdb.main.id
7477
id = "users"
7578
name = "users"
7679
}
7780
78-
resource "appwrite_column" "name" {
79-
database_id = appwrite_database.main.id
80-
table_id = appwrite_table.users.id
81+
resource "appwrite_tablesdb_column" "name" {
82+
database_id = appwrite_tablesdb.main.id
83+
table_id = appwrite_tablesdb_table.users.id
8184
key = "name"
8285
type = "varchar"
8386
size = 255
8487
required = true
8588
}
8689
87-
resource "appwrite_bucket" "images" {
90+
resource "appwrite_storage_bucket" "images" {
8891
id = "images"
8992
name = "images"
9093
maximum_file_size = 10485760
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
---
2-
page_title: "appwrite_database Data Source"
2+
page_title: "appwrite_tablesdb Data Source"
33
description: |-
44
Fetches an Appwrite database by ID.
55
---
66

7-
# appwrite_database (Data Source)
7+
# appwrite_tablesdb (Data Source)
88

99
Fetches an Appwrite database by ID.
1010

1111
## Example Usage
1212

1313
```terraform
14-
data "appwrite_database" "main" {
14+
data "appwrite_tablesdb" "main" {
1515
id = "main"
1616
}
1717
1818
output "database_name" {
19-
value = data.appwrite_database.main.name
19+
value = data.appwrite_tablesdb.main.name
2020
}
2121
```
2222

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,27 @@
11
---
2-
page_title: "appwrite_team Resource"
2+
page_title: "appwrite_auth_team Resource"
33
description: |-
44
Manages an Appwrite team.
55
---
66

7-
# appwrite_team (Resource)
7+
# appwrite_auth_team (Resource)
88

99
Manages an Appwrite team.
1010

1111
## Example Usage
1212

1313
```terraform
14-
resource "appwrite_team" "engineering" {
15-
id = "engineering"
14+
resource "appwrite_auth_user" "john" {
15+
name = "John Doe"
16+
email = "john@example.com"
17+
password = var.user_password
18+
}
19+
20+
resource "appwrite_auth_team" "engineering" {
1621
name = "Engineering"
1722
}
1823
19-
resource "appwrite_team" "marketing" {
20-
id = "marketing"
24+
resource "appwrite_auth_team" "marketing" {
2125
name = "Marketing"
2226
roles = ["owner", "editor"]
2327
}
@@ -28,11 +32,11 @@ resource "appwrite_team" "marketing" {
2832

2933
### Required
3034

31-
- `id` (String) The team ID.
3235
- `name` (String) The team name.
3336

3437
### Optional
3538

39+
- `id` (String) The team ID.
3640
- `roles` (List of String) Roles for new team members. Defaults to ["owner"].
3741

3842
### Read-Only
@@ -45,5 +49,10 @@ resource "appwrite_team" "marketing" {
4549
Import is supported using the following syntax:
4650

4751
```shell
48-
terraform import appwrite_team.engineering engineering
52+
terraform import appwrite_auth_team.engineering <team-id>
4953
```
54+
55+
## See Also
56+
57+
- [appwrite_auth_user](auth_user.md) - Manage users
58+
- [appwrite_messaging_topic](messaging_topic.md) - Manage messaging topics with team subscriptions
Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,27 @@
11
---
2-
page_title: "appwrite_user Resource"
2+
page_title: "appwrite_auth_user Resource"
33
description: |-
44
Manages an Appwrite user.
55
---
66

7-
# appwrite_user (Resource)
7+
# appwrite_auth_user (Resource)
88

99
Manages an Appwrite user.
1010

1111
## Example Usage
1212

1313
```terraform
14-
resource "appwrite_user" "john" {
15-
id = "john"
14+
resource "appwrite_auth_team" "engineering" {
15+
name = "Engineering"
16+
}
17+
18+
resource "appwrite_auth_user" "john" {
1619
name = "John Doe"
1720
email = "john@example.com"
1821
password = var.user_password
1922
}
2023
21-
resource "appwrite_user" "admin" {
22-
id = "admin"
24+
resource "appwrite_auth_user" "admin" {
2325
name = "Admin"
2426
email = "admin@example.com"
2527
password = var.admin_password
@@ -30,14 +32,11 @@ resource "appwrite_user" "admin" {
3032
<!-- schema generated by tfplugindocs -->
3133
## Schema
3234

33-
### Required
34-
35-
- `id` (String) The user ID.
36-
3735
### Optional
3836

3937
- `email` (String) The user email address.
4038
- `email_verification` (Boolean) Whether the user email is verified.
39+
- `id` (String) The user ID.
4140
- `labels` (List of String) User labels.
4241
- `name` (String) The user name.
4342
- `password` (String, Sensitive) The user password. Write-only, not returned by the API.
@@ -55,5 +54,10 @@ resource "appwrite_user" "admin" {
5554
Import is supported using the following syntax:
5655

5756
```shell
58-
terraform import appwrite_user.john john
57+
terraform import appwrite_auth_user.john <user-id>
5958
```
59+
60+
## See Also
61+
62+
- [appwrite_auth_team](auth_team.md) - Manage teams
63+
- [appwrite_messaging_topic](messaging_topic.md) - Manage messaging topics with user subscriptions

docs/resources/backup_policy.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
page_title: "appwrite_backup_policy Resource"
3+
description: |-
4+
Manages an Appwrite backup policy.
5+
---
6+
7+
# appwrite_backup_policy (Resource)
8+
9+
Manages an Appwrite backup policy.
10+
11+
## Example Usage
12+
13+
```terraform
14+
# Daily backup of all databases with 7 day retention
15+
resource "appwrite_backup_policy" "daily" {
16+
name = "Daily Database Backup"
17+
services = ["databases"]
18+
retention = 7
19+
schedule = "0 2 * * *"
20+
}
21+
22+
# Backup a specific database
23+
resource "appwrite_tablesdb" "main" {
24+
name = "main"
25+
}
26+
27+
resource "appwrite_backup_policy" "production" {
28+
name = "Production Database Backup"
29+
services = ["databases"]
30+
resource_id = appwrite_tablesdb.main.id
31+
retention = 14
32+
schedule = "0 */6 * * *"
33+
}
34+
```
35+
36+
<!-- schema generated by tfplugindocs -->
37+
## Schema
38+
39+
### Required
40+
41+
- `retention` (Number) How many days to keep the backup before automatic deletion.
42+
- `schedule` (String) Backup schedule in CRON format.
43+
- `services` (List of String) The services to back up. For example: databases.
44+
45+
### Optional
46+
47+
- `enabled` (Boolean) Whether the policy is enabled. Defaults to true.
48+
- `id` (String) The backup policy ID.
49+
- `name` (String) The backup policy name.
50+
- `resource_id` (String) The resource ID to back up. Set to back up a single database instead of all databases.
51+
52+
### Read-Only
53+
54+
- `created_at` (String) The policy creation timestamp in ISO 8601 format.
55+
- `updated_at` (String) The policy last update timestamp in ISO 8601 format.
56+
57+
## Import
58+
59+
Import is supported using the following syntax:
60+
61+
```shell
62+
terraform import appwrite_backup_policy.daily <policy-id>
63+
```
64+
65+
## See Also
66+
67+
- [appwrite_tablesdb](tablesdb.md) - Manage databases

docs/resources/index.md

Lines changed: 0 additions & 61 deletions
This file was deleted.

0 commit comments

Comments
 (0)