From b42a3ad309104c05e4e1be4fa028ba8e6ab11d6f Mon Sep 17 00:00:00 2001 From: mffap Date: Tue, 11 Jun 2024 13:01:10 +0200 Subject: [PATCH] docs(manage): update terraform provider (#8102) # Which Problems Are Solved Terraform provider docs without introcution and "here" links were hard to search for. # How the Problems Are Solved Updated docs page # Additional Changes changed the slug for more clarity and added a redirect --- docs/docs/guides/manage/terraform-provider.md | 37 +++++++++++++++++++ docs/docs/guides/manage/terraform/basics.md | 28 -------------- docs/docs/self-hosting/deploy/compose.mdx | 2 +- docs/docs/self-hosting/deploy/linux.mdx | 2 +- docs/docs/self-hosting/deploy/macos.mdx | 2 +- docs/docs/self-hosting/manage/production.md | 2 +- docs/sidebars.js | 6 +-- docs/vercel.json | 1 + 8 files changed, 43 insertions(+), 37 deletions(-) create mode 100644 docs/docs/guides/manage/terraform-provider.md delete mode 100644 docs/docs/guides/manage/terraform/basics.md diff --git a/docs/docs/guides/manage/terraform-provider.md b/docs/docs/guides/manage/terraform-provider.md new file mode 100644 index 000000000..75f18d46f --- /dev/null +++ b/docs/docs/guides/manage/terraform-provider.md @@ -0,0 +1,37 @@ +--- +title: ZITADEL Terraform Provider +sidebar_label: Terraform Provider +--- + +The [ZITADEL Terraform Provider](https://registry.terraform.io/providers/zitadel/zitadel/latest/docs) is a tool that allows you to manage ZITADEL resources through Terraform. +In other words, it lets you define and provision infrastructure for ZITADEL using Terraform configuration files. + +This Terraform provider acts as a bridge, allowing you to manage various aspects of your ZITADEL instance directly through the [ZITADEL API](/docs/apis/introduction), using Terraform's declarative configuration language. +It can be used to create, update, and delete ZITADEL resources, as well as to manage the relationships between those resources. + +## Before you start + +Make sure you create the following resources in ZITADEL and have [Terraform installed](https://learn.hashicorp.com/tutorials/terraform/install-cli): + +- [A ZITADEL Instance](../start/quickstart) +- [A service user](/docs/guides/integrate/service-users/authenticate-service-users) with [enough authorization](/docs/guides/manage/console/managers) to manage the desired resources + +## Manage ZITADEL resources through terraform + +The full documentation and examples are available on the [Terraform registry](https://registry.terraform.io/providers/zitadel/zitadel/latest/docs). + +To provide a small guide to where to start: + +1. Create a folder where all the terraform files reside. +2. Configure the provider to use the right domain, port and token, with for example a `main.tf`file [as shown in the example](https://registry.terraform.io/providers/zitadel/zitadel/latest/docs). +3. Add a `zitadel_org` resource to the `main.tf` file, to create and manage a new organization in the instance, [as shown in the example](https://registry.terraform.io/providers/zitadel/zitadel/latest/docs/resources/org). +4. Add any resources to the organization in the `main.tf` file, [as example a human user](https://registry.terraform.io/providers/zitadel/zitadel/latest/docs/resources/human_user). +5. (Optional) Use Terraform in the directory with the command `terraform plan`, to see which resources would be created and how. +6. Apply the changes and start managing your resources with terraform with `terraform apply`. +7. (Optional) Delete your created resources with `terraform destroy` to clean-up. + +## References + +- [Deploy ZITADEL in your infrastructure](/docs/self-hosting/deploy/overview) +- [ZITADEL CLI](/docs/self-hosting/manage/cli/overview) +- [Configuration Options in ZITADEL](/docs/self-hosting/manage/configure) diff --git a/docs/docs/guides/manage/terraform/basics.md b/docs/docs/guides/manage/terraform/basics.md deleted file mode 100644 index d4678efe7..000000000 --- a/docs/docs/guides/manage/terraform/basics.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: ZITADEL Terraform Provider -sidebar_label: Terraform Provider ---- - -It covers how to: - -- Manage ZITADEL resources through the ZITADEL Terraform provider - -Prerequisites: - -- A ZITADEL Instance, if not present follow [this guide](../../start/quickstart) -- A user with enough authorization to manage the desired resources, if not present follow [this guide](/docs/guides/integrate/service-users/authenticate-service-users) -- Installed Terraform, if not present follow [this guide](https://learn.hashicorp.com/tutorials/terraform/install-cli) - -## Manage ZITADEL resources through terraform - -The full documentation and examples are available [here](https://registry.terraform.io/providers/zitadel/zitadel/latest/docs). - -To provide a small guide to where to start: - -1. Create a folder where all the terraform files reside. -2. Configure the provider to use the right domain, port and token, with for example a `main.tf`file [as shown in the example](https://registry.terraform.io/providers/zitadel/zitadel/latest/docs). -3. Add a `zitadel_org` resource to the `main.tf` file, to create and manage a new organization in the instance, [as shown in the example](https://registry.terraform.io/providers/zitadel/zitadel/latest/docs/resources/org). -4. Add any resources to the organization in the `main.tf` file, [as example a human user](https://registry.terraform.io/providers/zitadel/zitadel/latest/docs/resources/human_user). -5. (Optional) Use Terraform in the directory with the command `terraform plan`, to see which resources would be created and how. -6. Apply the changes and start managing your resources with terraform with `terraform apply`. -7. (Optional) Delete your created resources with `terraform destroy` to clean-up. diff --git a/docs/docs/self-hosting/deploy/compose.mdx b/docs/docs/self-hosting/deploy/compose.mdx index 9b3f4f977..525637d5c 100644 --- a/docs/docs/self-hosting/deploy/compose.mdx +++ b/docs/docs/self-hosting/deploy/compose.mdx @@ -56,7 +56,7 @@ docker compose up --detach mv ./machinekey/zitadel-admin-sa.json $HOME/zitadel-admin-sa.json ``` -This key can be used to provision resources with for example [Terraform](/docs/guides/manage/terraform/basics.md). +This key can be used to provision resources with for example [Terraform](/docs/guides/manage/terraform-provider). diff --git a/docs/docs/self-hosting/deploy/linux.mdx b/docs/docs/self-hosting/deploy/linux.mdx index b12204eb4..9b6e7a4fe 100644 --- a/docs/docs/self-hosting/deploy/linux.mdx +++ b/docs/docs/self-hosting/deploy/linux.mdx @@ -59,7 +59,7 @@ ZITADEL_DATABASE_POSTGRES_HOST=localhost ZITADEL_DATABASE_POSTGRES_PORT=5432 ZIT mv /tmp/zitadel-admin-sa.json $HOME/zitadel-admin-sa.json ``` -This key can be used to provision resources with for example [Terraform](/docs/guides/manage/terraform/basics.md). +This key can be used to provision resources with for example [Terraform](/docs/guides/manage/terraform-provider). diff --git a/docs/docs/self-hosting/deploy/macos.mdx b/docs/docs/self-hosting/deploy/macos.mdx index 423293d29..3f0ef01bd 100644 --- a/docs/docs/self-hosting/deploy/macos.mdx +++ b/docs/docs/self-hosting/deploy/macos.mdx @@ -61,7 +61,7 @@ ZITADEL_DATABASE_POSTGRES_HOST=localhost ZITADEL_DATABASE_POSTGRES_PORT=5432 ZIT mv /tmp/zitadel-admin-sa.json $HOME/zitadel-admin-sa.json ``` -This key can be used to provision resources with for example [Terraform](/docs/guides/manage/terraform/basics.md). +This key can be used to provision resources with for example [Terraform](/docs/guides/manage/terraform-provider). diff --git a/docs/docs/self-hosting/manage/production.md b/docs/docs/self-hosting/manage/production.md index b516b2548..51c6a787a 100644 --- a/docs/docs/self-hosting/manage/production.md +++ b/docs/docs/self-hosting/manage/production.md @@ -207,7 +207,7 @@ DefaultInstance: - If you don't want to use the DefaultInstance configuration for the first instance that ZITADEL automatically creates for you during the [setup phase](/self-hosting/manage/configure#database-initialization), you can provide a FirstInstance YAML section using the --steps argument. - Learn how to configure ZITADEL via the [Console user interface](/guides/manage/console/overview). - Probably, you also want to [apply your custom branding](/guides/manage/customize/branding), [hook into certain events](/guides/manage/customize/behavior), [customize texts](/guides/manage/customize/texts) or [add metadata to your users](/guides/manage/customize/user-metadata). -- If you want to automatically create ZITADEL resources, you can use the [ZITADEL Terraform Provider](/guides/manage/terraform/basics). +- If you want to automatically create ZITADEL resources, you can use the [ZITADEL Terraform Provider](/guides/manage/terraform-provider). ## Limits and Quotas diff --git a/docs/sidebars.js b/docs/sidebars.js index d14243163..39f3d314d 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -154,11 +154,6 @@ module.exports = { "guides/manage/customize/restrictions", ], }, - { - type: "category", - label: "Terraform", - items: ["guides/manage/terraform/basics"], - }, { type: "category", label: "Users", @@ -168,6 +163,7 @@ module.exports = { "guides/manage/customize/user-schema", ], }, + "guides/manage/terraform-provider" ], }, { diff --git a/docs/vercel.json b/docs/vercel.json index df08ad33a..a36082ece 100644 --- a/docs/vercel.json +++ b/docs/vercel.json @@ -39,6 +39,7 @@ { "source": "/docs/guides/integrate/event-api", "destination": "/docs/guides/integrate/zitadel-apis/event-api", "permanent": true }, { "source": "/docs/examples/call-zitadel-api/go", "destination": "/docs/guides/integrate/zitadel-apis/example-zitadel-api-with-go", "permanent": true }, { "source": "/docs/examples/call-zitadel-api/dot-net", "destination": "/docs/guides/integrate/zitadel-apis/example-zitadel-api-with-dot-net", "permanent": true }, + { "source": "/docs/guides/manage/terraform/basics", "destination": "/docs/guides/manage/terraform-provider", "permanent": true }, { "source": "/docs/guides/integrate/identity-providers", "destination": "/docs/guides/integrate/identity-providers/introduction", "permanent": true } ] }