-
Notifications
You must be signed in to change notification settings - Fork 43
Using Release Candidates of the Provider
hmlanigan edited this page Oct 8, 2024
·
1 revision
An early release of the provider is an 0.y.z
release that is not present in the Terraform Registry. To use an early release it must be downloaded from GitHub and installed manually.
These instructions describe setting up a file system mirror for the Juju Terraform Provider. This allows Terraform to resolve the provider locally rather than from the Terraform Registry.
Other methods are available – please refer to Terraform documentation.
- Create a directory for the Juju provider releases:
mkdir -p /usr/share/terraform/providers/juju
- Use the following command to create a cli configuration file that instructs Terraform to use the directory as a mirror for the provider:
cat << EOF > ~/.terraformrc
provider_installation {
filesystem_mirror {
path = "/usr/share/terraform/providers/juju"
include = ["registry.terraform.io/canonical/juju"]
}
direct {
exclude = ["registry.terraform.io/canonical/juju"]
}
}
EOF
- Download the distribution for your platform from the available releases
- Place the zip archive under
/usr/share/terraform/providers/juju
- Declare the provider in your Terraform configuration ensuring you set the correct
version
, for example:
terraform {
required_providers {
juju = {
source = "canonical/juju"
version = "0.0.1"
}
}
}
- Initialise the current working directory containing your Terraform configuration files:
terraform init
Further early releases only need to placing in /usr/share/terraform/providers/juju
, but when doing so, ensure you update the provider version
in your Terraform projects.