Skip to content

Latest commit

 

History

History
76 lines (57 loc) · 3.07 KB

FAQ.md

File metadata and controls

76 lines (57 loc) · 3.07 KB

Frequently Asked Questions (FAQ)

How do I install Terraform Inventory?

Option 1: Direct Binary Download (No Go Required)

  1. 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
  2. Extract the binary and move it to /usr/local/bin and update the terraform var terraform_provider_path accordingly:

    unzip terraform-inventory_v0.10_linux_amd64.zip
    sudo mv terraform-inventory /usr/local/bin/
  3. Verify installation by checking the version:

    terraform-inventory -version

Option 2: Install Using Go

  1. Install Go following the official Go installation instructions or by using the package manager of your OS.

  2. Install terraform-inventory from latest commit from master (or main):

    go install github.com/adammck/terraform-inventory@master
  3. Ensure $(go env GOPATH)/bin is in your PATH:

    • Add to ~/.bashrc or ~/.profile and reload:
      export PATH=$PATH:$(go env GOPATH)/bin
      source ~/.bashrc
  4. 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."

How to use CherryServers Terraform provider when it is not available in Terraform Registry:

  1. 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-cherryservers file 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.tf File: Define the provider in the main.tf file as follows:

      terraform {
        required_providers {
          cherryservers = {
            source  = "terraform.local/local/cherryservers"
            version = "1.0.0"
          }
        }
      }
  2. Initialize Terraform: Run the following command to initialize Terraform with the new provider:

    terraform init