Terraform Modules and Providers Cheat Sheet/CLI config provider mirror snippet

Configure provider installation behavior in CLI config file.

Section: Providers

CLI config provider mirror snippet

hcl
hcl
provider_installation {
  filesystem_mirror {
    path    = "/usr/share/terraform/providers"
    include = ["registry.terraform.io/hashicorp/*"]
  }
  direct {}
}
Explanation

Configure provider installation behavior in CLI config file.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Providers
Mirror providers locally
Download required providers into a local mirror directory.
OpenIn sheetbashsame section
Generate provider lock info for platform
Update the dependency lock file with checksums for target platforms.
OpenIn sheetbashsame section
Required providers snippet
Pin Terraform version and provider source/version constraints.
OpenIn sheethclsame section
Install/update remote modules
Download and update remote module sources.
OpenIn sheetbash1 tag match
README module example pattern
Example of documenting reusable module outputs clearly.
OpenIn sheethcl1 tag match
Moved block snippet
Use moved blocks to preserve state during resource renames in configuration.
OpenIn sheethcl1 tag match