Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@
**** xref:deploy:deployment-option/cloud/configure-private-service-connect-in-cloud-ui.adoc[]
**** xref:deploy:deployment-option/cloud/gcp-private-service-connect.adoc[]
*** xref:deploy:deployment-option/cloud/monitor-cloud.adoc[]
*** xref:deploy:deployment-option/cloud/remote-read-replicas.adoc[]
*** xref:deploy:deployment-option/cloud/managed-connectors/index.adoc[Managed Connectors]
**** xref:deploy:deployment-option/cloud/managed-connectors/converters-and-serialization.adoc[Converters and serialization]
**** xref:deploy:deployment-option/cloud/managed-connectors/monitor-connectors.adoc[Monitor Connectors]
Expand All @@ -117,6 +116,8 @@
**** xref:deploy:deployment-option/cloud/managed-connectors/create-mysql-source-connector.adoc[MySQL (Debezium) Source Connector]
**** xref:deploy:deployment-option/cloud/managed-connectors/create-postgresql-connector.adoc[PostgreSQL (Debezium) Source Connector]
**** xref:deploy:deployment-option/cloud/managed-connectors/create-snowflake-connector.adoc[Snowflake Sink Connector]
*** xref:deploy:deployment-option/cloud/remote-read-replicas.adoc[]
*** xref:deploy:deployment-option/cloud/terraform-provider.adoc[]
*** xref:deploy:deployment-option/cloud/api/index.adoc[Cloud API]
**** xref:deploy:deployment-option/cloud/api/cloud-api-quickstart.adoc[API Quickstart]
**** xref:deploy:deployment-option/cloud/api/cloud-api-overview.adoc[Cloud API Overview]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
= Redpanda Terraform Provider
:description: Learn how to use the Redpanda Terraform provider to create and manage resources in Redpanda Cloud.
:page-cloud: true
:page-beta: true

The https://registry.terraform.io/providers/redpanda-data/redpanda/latest[Redpanda Terraform provider^] interfaces with the Cloud API, so you can define your Redpanda infrastructure in Terraform configuration files. You can use the Terraform provider to create and manage the following resources in Redpanda Cloud:

* ACLs
* Clusters
* Networks
* Resource groups
* Topics
* Users

== Prerequisites

Install Terraform following the https://learn.hashicorp.com/tutorials/terraform/install-cli[Terraform documentation^].

== Limitations

*?? TO REVIEWERS: Can you please confirm that the provider is supported on Serverless and Azure? And what functionality is supported in Cloud API but not provider, like Connectors?*
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Serverless was recently added, Azure should also be supported if the Cloud API supports it. I will leave the final call to @gene-redpanda since he worked on a PR to bring feature parity between Cloud API and the TF provider

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Serverless yes, Azure I did not see in the product doc. I'll see if we can get that in there too.


== Use the provider

. To install the Redpanda provider, copy and paste the following code into your Terraform configuration file:
+
```
terraform {
required_providers {
redpanda = {
source = "redpanda-data/redpanda"
version = "~> 0.5.1"
}
}
}
```

. Initialize Terraform:
+
```
terraform init
```

. For the provider to authenticate against Redpanda Cloud, enter your `client_id` and `client_secret` credentials in your Terraform configuration file or set them as environment variables:
+
[tabs]
======
Static credentials::
+
--

```
provider "redpanda" {
client_id = "<client_id>"
client_secret = "<client_secret>"
}
```

--
Environment variables::
+
--

```
REDPANDA_CLIENT_ID=<client_id>
REDPANDA_CLIENT_SECRET=<client_secret>
```

--
======

. For sample configurations, see the https://registry.terraform.io/providers/redpanda-data/redpanda/latest/docs[Redpanda Terraform provider docs^]. *NOTE TO REVIEWERS: This linked doc needs update for beta*

=== Use the provider to create a new cluster

For an example of how to use the provider to create a new cluster, see https://github.com/redpanda-data/terraform-provider-redpanda/blob/main/examples/cluster/aws/main.tf[this example^].

=== Use the provider to manage an existing cluster

To manage resources in existing Redpanda Cloud clusters, you must reference the existing cluster using the cluster ID (Redpanda ID). The following example creates a topic in a cluster with ID `foo-bar-baz`. The `redpanda_topic` resource contains a field `cluster_api_url` that references the `data.redpanda_cluster.test.cluster_api_url` data resource.

```
data "redpanda_cluster" "test" {
id = "foo-bar-baz"
}

resource "redpanda_topic" "test" {
name = "myTopicName"
partition_count = 3
replication_factor = 3
cluster_api_url = data.redpanda_cluster.test.cluster_api_url
}
```

=== Additional examples

To see more ways to use the provider, see the https://github.com/redpanda-data/terraform-provider-redpanda/tree/main/examples[Redpanda Terraform provider examples^].
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@

This page lists new features added in Redpanda Cloud.

== July 2024

=== Redpanda Terraform Provider for Redpanda Cloud

The xref:deploy:deployment-option/cloud/terraform-provider.adoc[Redpanda Terraform provider] lets you can create and manage resources in Redpanda Cloud, such as clusters, topics, users, ACLs, networks, and resource groups.

== June 2024

=== Remote read replica topics on BYOC: beta
Expand Down