Manage AutoMQ BYOC environments and Kafka resources (instances, topics, users, ACLs, mirroring) with Terraform.
- Install the provider plugin via the Terraform Registry (
automq/automq). - Collect your AutoMQ BYOC endpoint plus Service Account Access Key credentials from the AutoMQ console.
- Configure the provider:
terraform {
required_providers {
automq = {
source = "automq/automq"
version = "~> 0.1"
}
}
}
provider "automq" {
automq_byoc_endpoint = var.automq_byoc_endpoint
automq_byoc_access_key_id = var.automq_byoc_access_key_id
automq_byoc_secret_key = var.automq_byoc_secret_key
}Tip: set
AUTOMQ_BYOC_ENDPOINT,AUTOMQ_BYOC_ACCESS_KEY_ID, andAUTOMQ_BYOC_SECRET_KEYenvironment variables to avoid hard-coding credentials.
Reusable configuration samples live under examples/. Highlights:
examples/provider– minimal provider configuration.examples/quick-start/aws– end-to-end instance provisioning, with TLS automation for BYOC on AWS.examples/resources/*– focused snippets that align with each resource schema (instance, link, mirror group/topic, ACL, etc.).
Use these as references or copy them into your own configuration, updating IDs/secrets as needed.
- Clone the repository
- Enter the repository directory
- Build the provider using the Go
installcommand:
go installThis provider uses Go modules. Please see the Go documentation for the most up to date information about using Go modules.
To add a new dependency github.com/author/dependency to your Terraform provider:
go get github.com/author/dependency
go mod tidyThen commit the changes to go.mod and go.sum.
Fill this in for each provider
If you wish to work on the provider, you'll first need Go installed on your machine (see Requirements above).
To compile the provider, run go install. This will build the provider and put the provider binary in the $GOPATH/bin directory.
To generate or update documentation, run go generate.
In order to run the full suite of Acceptance tests, run make testacc.
Note: Acceptance tests create real resources, and often cost money to run.
make testacc