-
Notifications
You must be signed in to change notification settings - Fork 318
Expand file tree
/
Copy path+page.markdoc
More file actions
98 lines (83 loc) · 5.38 KB
/
+page.markdoc
File metadata and controls
98 lines (83 loc) · 5.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
---
layout: article
title: Terraform provider
description: Manage Appwrite infrastructure as code with the official Terraform provider. Works with Appwrite Cloud and Community Edition.
---
The [Terraform provider for Appwrite](https://github.com/appwrite/terraform-provider-appwrite) lets you declare project resources - databases, tables, storage buckets, functions, sites, auth, messaging, webhooks, and backup policies - in `.tf` files and apply those changes through [HashiCorp Terraform](https://www.terraform.io/). It is the official way to automate Appwrite project configuration alongside the rest of your stack.
# Resources and data sources {% #resources-and-data-sources %}
| Kind | Name | Description |
|------|------|-------------|
| Resource | `appwrite_tablesdb` | Database |
| Resource | `appwrite_tablesdb_table` | Table within a database |
| Resource | `appwrite_tablesdb_column` | Column on a table |
| Resource | `appwrite_tablesdb_index` | Index on a table |
| Resource | `appwrite_tablesdb_row` | Row in a table |
| Resource | `appwrite_storage_bucket` | Storage bucket |
| Resource | `appwrite_storage_file` | File in a bucket |
| Resource | `appwrite_function` | Serverless function |
| Resource | `appwrite_function_variable` | Function environment variable |
| Resource | `appwrite_site` | Hosted site |
| Resource | `appwrite_site_variable` | Site environment variable |
| Resource | `appwrite_auth_user` | User |
| Resource | `appwrite_auth_team` | Team |
| Resource | `appwrite_messaging_provider` | Messaging provider (email, SMS, push) |
| Resource | `appwrite_messaging_topic` | Messaging topic |
| Resource | `appwrite_messaging_subscriber` | Messaging subscriber |
| Resource | `appwrite_webhook` | Webhook |
| Resource | `appwrite_backup_policy` | Backup policy |
| Data source | `appwrite_tablesdb` | Look up a database by ID |
{% info title="Looking for self-hosting?" %}
This section is about **Appwrite resources inside a project** (for example databases and tables) using Terraform. If you want to install or operate the Appwrite server itself (Docker, configuration, TLS, scaling), go to the [self-hosting documentation](/docs/advanced/self-hosting) instead.
{% /info %}
# What is Terraform? {% #what-is-terraform %}
[Terraform](https://www.terraform.io/) is an infrastructure-as-code tool. You write **configuration** in a declarative language (HCL) that describes what should exist; Terraform figures out **how** to create or update it.
If you are new to the idea:
- **Provider** - A plugin that teaches Terraform how to talk to a specific API (here, Appwrite).
- **Resource** - Something Terraform should create and manage (for example an Appwrite database or table).
- **State** - Terraform remembers what it already created so the next run can update or destroy only what changed.
- **Plan / apply** - You run `terraform plan` to preview changes, then `terraform apply` to execute them.
You still use the [Appwrite Console](https://cloud.appwrite.io) and SDKs for day-to-day app development; the provider is for **repeatable, version-controlled** setup of project resources across environments.
# Official repository and registry {% #official-repository-and-registry %}
Source code, issues, and contribution guidelines:
{% cards %}
{% cards_item href="https://github.com/appwrite/terraform-provider-appwrite" title="GitHub" icon="web-icon-github" %}
`appwrite/terraform-provider-appwrite` - source and issues.
{% /cards_item %}
{% cards_item href="https://registry.terraform.io/providers/appwrite/appwrite/latest/docs" title="Terraform Registry" icon="web-icon-terraform" %}
`appwrite/appwrite` - install, versions, generated schemas.
{% /cards_item %}
{% /cards %}
The provider works with **Appwrite Cloud** and **Community Edition** (self-hosted Appwrite). You point it at your API endpoint and authenticate with a project API key.
# Next steps {% #next-steps %}
{% cards %}
{% cards_item href="/docs/tooling/terraform/provider" title="Configuration" %}
Install the provider, set endpoints, and use environment variables for credentials.
{% /cards_item %}
{% cards_item href="/docs/tooling/terraform/resources/databases" title="Databases" %}
Manage databases, tables, columns, indexes, and rows.
{% /cards_item %}
{% cards_item href="/docs/tooling/terraform/resources/storage" title="Storage" %}
Configure storage buckets and managed file uploads.
{% /cards_item %}
{% cards_item href="/docs/tooling/terraform/resources/functions" title="Functions" %}
Deploy serverless functions with runtimes, schedules, and event triggers.
{% /cards_item %}
{% cards_item href="/docs/tooling/terraform/resources/sites" title="Sites" %}
Host frontends with framework presets and build configuration.
{% /cards_item %}
{% cards_item href="/docs/tooling/terraform/resources/auth" title="Auth" %}
Manage users and teams.
{% /cards_item %}
{% cards_item href="/docs/tooling/terraform/resources/messaging" title="Messaging" %}
Define messaging providers, topics, and subscribers.
{% /cards_item %}
{% cards_item href="/docs/tooling/terraform/resources/webhooks" title="Webhooks" %}
Configure event-driven HTTP callbacks.
{% /cards_item %}
{% cards_item href="/docs/tooling/terraform/resources/backup-policies" title="Backup policies" %}
Schedule backups with retention policies.
{% /cards_item %}
{% cards_item href="/docs/tooling/terraform/data-sources" title="Data sources" %}
Look up existing databases by ID for use in other resources.
{% /cards_item %}
{% /cards %}