Terraform Registry
You can configure the Speakeasy Generation Action to publish a generated Terraform provider. Speakeasy Terraform provider generation does not support operating in monorepo mode, as you need to create a separate repository for the Terraform provider with the appropriate name format. To publish the generated Terraform provider, you need to do the following:
- The repository you make for the Terraform provider must:
- Be given the name
terraform-provider-{NAME}
, whereNAME
is lowercase. - Be public.
- Be given the name
- Sign your Terraform provider releases with a signing key. Create and export a signing key following the instructions in the GitHub documentation for generating a new GPG key (opens in a new tab). Generate your GPG key using either the RSA or DSA algorithm.
- Take note of the following values:
- The GPG private key.
- The GPG passphrase.
- The GPG public key.
- Add the ASCII-armored public key to the Terraform registry.
- Your GPG private key and GPG passphrase will be configured automatically if entered into the Speakeasy CLI. Ensure that the following secrets are available to your repository:
- The GPG private key,
terraform_gpg_secret_key
. - The GPG passphrase,
terraform_gpg_passphrase
.
- The GPG private key,
- The first time you publish a Terraform provider generated using the Speakeasy Generation Action, you need to manually add it to the Terraform Registry. Subsequent updates will be published automatically. To begin this process, follow the Terraform registry instructions (opens in a new tab) and agree to any Terraform terms and conditions. Note that you will need to be an organizational admin to complete this step.
- Add the following file to your
.github/workflows
directory to indicate create releases for your Terraform provider using GoReleaser. If all the above steps have been completed the HashiCorpy registry will automatically pick up new changes.
- Finally, create a GoReleaser (opens in a new tab) file in the root of your repository:
Whenever you generate and merge a new PR for your Terraform provider, it will be automatically versioned and released to the Hashicorp Registry.