Interact with Temporal Cloud resources.
registry.terraform.io/providers/temporalio/temporalcloud
- Terraform >= 1.0
- Go >= 1.19
- Temporal SDK >= 1.26.0
- Clone the repository
- Enter the repository directory
- Build the provider using the Go
install
command:
go install
docs/ are defined in code (see MarkdownDescription
) and are generated by:
go install
# edit code
# format and generate docs
gofmt -s -w .
go generate ./...
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.
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
This 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 tidy
Then commit the changes to go.mod
and go.sum
.
In order to test your code you need an api key for temporal cloud. Docs on how to generate this is here: https://github.com/temporalio/tcld/tree/release/apikeys#api-key-management-preview
Then you need to make the provider binary available to terraform
itself.
go build -o terraform-provider-temporalcloud
mkdir -p ~/.terraform.d/plugins/temporal.io/provider-temporalcloud/temporalcloud/1.0.0/darwin_arm64/
mv terraform-provider-temporalcloud ~/.terraform.d/plugins/temporal.io/provider-temporalcloud/temporalcloud/1.0.0/darwin_arm64
Finally, your terraform configuration files need to know about this provider.
provider "temporalcloud" {
api_key = "<API_KEY>"
}
terraform {
required_providers {
temporalcloud = {
version = "~> 1.0.0"
source = "temporal.io/provider-temporalcloud/temporalcloud"
}
}
}
Now you can start testing your provider with terraform
!