Options for using custom provider

From everything I’ve read, the only options for using a custom (in-house) provider is to…

  • Manually place the provider binary on the local filesystem in ~/.terraform.d/plugins (or other local mirror directory) prior to running terraform.

  • Keep the provider binary alongside the main terraform configuration code in a directory named .terraform/plugins/<arch>.

  • Use git submodules to include the binary from the separate provider repo in the terraform code repo.

Ideally we would like to maintain our custom provider and it’s binaries in a separate private git repository, and have our terraform code (i.e. main.tf) use that git repository as the source location for the provider.

This would mean we only have to configure the terraform code, and maintain the custom provider - we would not need a separate step to download binaries locally, or configure CLI options on each workstation\pipeline.

Is there a way I can use a private git repository as the source for a provider binary, or do we need a Private Provider Registry?

I know Terraform Cloud offers a Private Module Registry, but does it offer a Private Provider Registry? The Provider Registry Protocol is documented, so it seems strange to me that Terraform Cloud does not offer it.

I did find citizen, which appears to be an open source Private Terraform Provider Registry.

Is this my only option for a Private Provider Registry (unless we build or own)?

If my assessments are correct, do we know if Terraform Cloud will offer a Private Provider registry in a near-future release, or will Terraform include the ability to reference provider binaries from a git repository the same way you can a module?

Thanks in advance for any help!

Hello, and welcome!!

The Terraform Cloud Private Module Registry doesn’t yet support providers as the public Registry does, but I’m pleased to report it’s on our roadmap and you can expect to see it in the near-future! Stay tuned.

1 Like