Skip to content

examples: add user-and-acls example - #346

Open
sago2k8 wants to merge 1 commit into
mainfrom
examples/user-and-acls
Open

examples: add user-and-acls example#346
sago2k8 wants to merge 1 commit into
mainfrom
examples/user-and-acls

Conversation

@sago2k8

@sago2k8 sago2k8 commented May 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds a focused example at examples/user-and-acls/ that provisions a SASL/SCRAM user and a typical consumer-style ACL bundle (CLUSTER, TOPIC, GROUP — 9 ACLs via for_each over operation lists) against an existing Redpanda Cloud cluster.
  • Deliberately does not bootstrap the resource group, network, or cluster — that path is covered by examples/redpanda-role. The new example assumes the cluster already exists and is referenced via var.cluster_api_url.
  • README spells out the service-account-with-Admin-role prerequisite, the env-var credential flow, how to fetch the dataplane URL from the Control Plane API, and pointers to the Cloud RBAC docs. Includes outputs, cleanup, and a "Customizing the ACL set" section keyed on the locals operation lists.
  • Pins providers explicitly (redpanda-data/redpanda, hashicorp/random) so it runs cleanly in air-gapped / mirror environments. Pins required_version >= 1.11 because the example uses the write-only password_wo attribute.

This grew out of a customer case where the failure surface was unclear; the example exists so customers and support can validate the user/ACL provisioning path against any cluster in one terraform apply.

Test plan

  • terraform init && terraform validate from inside examples/user-and-acls/
  • terraform apply against a non-prod cluster with a REDPANDA_CLIENT_ID/REDPANDA_CLIENT_SECRET for a service account that has the Admin role — confirms the 1 user + 9 ACLs land
  • terraform destroy cleans up without leftover resources
  • Re-read the README end-to-end with fresh eyes; confirm links resolve and prereqs are sufficient for someone new to the provider

Adds a focused, customer-shareable example that provisions a SASL/SCRAM
user and a typical consumer-style ACL bundle (CLUSTER, TOPIC, GROUP)
against an existing Redpanda Cloud cluster.

The example deliberately does not bootstrap the resource group,
network, or cluster -- see examples/redpanda-role for that path. The
README spells out the service-account-with-Admin-role prerequisite and
links to the Cloud RBAC docs.
@sago2k8
sago2k8 force-pushed the examples/user-and-acls branch from c13aa74 to 23e23e3 Compare May 21, 2026 21:28
@gene-redpanda

Copy link
Copy Markdown
Member

Needs to be added to a template so that it can be referenced in the generated docs. The example as currently implemented is a bare directory

@gene-redpanda gene-redpanda left a comment

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.

See comment re: adding example to a template

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants