-
Download the latest binary for your OS from the terraform-inventory releases page.
- For Linux x64, you might use:
wget https://github.com/adammck/terraform-inventory/releases/download/v0.10/terraform-inventory_v0.10_linux_amd64.zip
- For Linux x64, you might use:
-
Extract the binary and move it to
/usr/local/binand update the terraform varterraform_provider_pathaccordingly:unzip terraform-inventory_v0.10_linux_amd64.zip sudo mv terraform-inventory /usr/local/bin/
-
Verify installation by checking the version:
terraform-inventory -version
-
Install Go following the official Go installation instructions or by using the package manager of your OS.
-
Install
terraform-inventoryfrom latest commit frommaster(or main):go install github.com/adammck/terraform-inventory@master
-
Ensure
$(go env GOPATH)/binis in your PATH:- Add to
~/.bashrcor~/.profileand reload:export PATH=$PATH:$(go env GOPATH)/bin source ~/.bashrc
- Add to
-
Verify installation by checking the version:
terraform-inventory -version
Choose the option that best fits your setup needs. The direct download method is quicker if Go isn't required for other purposes, while installing via Go might be preferable for those already using Go for development.
"Note on Customization: You can specify a custom path for terraform-inventory by updating the terraform_inventory_path Terraform variable as needed."
-
Setup CherryServers Provider for Terraform: When the provider is not available on the Terraform Registry: CherryServers provider because it is not being actively updated, you'll need to install it manually by following these steps:
-
Download CherryServers Provider: Navigate to the CherryServers Download Page and download the file named
terraform-provider-cherryservers. -
Place the File: Move the downloaded
terraform-provider-cherryserversfile to the following directory structure (this is for Linux users):~/.terraform.d/plugins/terraform.local/local/cherryservers/1.0.0/linux_amd64/ -
Define the Provider in the
main.tfFile: Define the provider in themain.tffile as follows:terraform { required_providers { cherryservers = { source = "terraform.local/local/cherryservers" version = "1.0.0" } } }
-
-
Initialize Terraform: Run the following command to initialize Terraform with the new provider:
terraform init