For the complete documentation index, see llms.txt. This page is also available as Markdown.
Using Providers
Providers can be added to your organization's registry from the public Terraform registry in the UI, or through the API for private providers.
Add a public provider in the UI
Open Registry, click Search public registry, select the Providers tab and search. Official and partner providers are listed first.
Select a result to open its provider page. It shows the tier, downloads, and a usage snippet pointing at your registry. The latest release is preselected; pick another version if you need one.
Click Add to Terrakube.
A public provider page
If the provider is already in your registry, the button takes you to its page instead. Versions can later be deprecated or removed.
Add a provider with the API
Use the API for private providers or to script the import.
Lets add the random provider version 3.0.1 to terrakube, we can get the information that we need from the following endpoints:
Create the provider inside the organization:
Create the provider version
Create the provider implementation
You can change the URL from the above paramaters and use a URL that you control, I was using the terraform registry url for example purposes
Now in your terraform code you can have something like this:
And when running terraform init you will see something like:
GET https://registry.terraform.io/v1/providers/hashicorp/random/versions
GET https://registry.terraform.io/v1/providers/hashicorp/random/3.0.1/download/linux/amd64
terraform {
required_providers {
random = {
source = "terrakube-reg.minikube.net/simple/random"
version = "3.0.1"
}
}
}
user@pop-os:~/git/simple-terraform$ terraform init
Initializing the backend...
Initializing modules...
Initializing provider plugins...
- Finding terrakube-reg.minikube.net/simple/random versions matching "3.0.1"...
- Finding latest version of hashicorp/null...
- Finding latest version of hashicorp/time...
- Finding latest version of hashicorp/random...
- Installing hashicorp/null v3.2.2...
- Installed hashicorp/null v3.2.2 (signed by HashiCorp)
- Installing hashicorp/time v0.12.0...
- Installed hashicorp/time v0.12.0 (signed by HashiCorp)
- Installing hashicorp/random v3.6.2...
- Installed hashicorp/random v3.6.2 (signed by HashiCorp)
- Installing terrakube-reg.minikube.net/simple/random v3.0.1...
- Installed terrakube-reg.minikube.net/simple/random v3.0.1 (signed by HashiCorp)
Terraform has created a lock file .terraform.lock.hcl to record the provider
selections it made above. Include this file in your version control repository
so that Terraform can guarantee to make the same selections by default when
you run "terraform init" in the future.
Terraform has been successfully initialized!
You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.
If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.