IaC Bazaar

Install modules with terraform init

Every Terraform/OpenTofu module on IaC Bazaar is installable directly by terraform and tofu via the standard module registry protocol - no tarball downloads, no vendoring. Reference the module in a source address, pin a version, run init. Ansible roles are not served here (the protocol is Terraform/OpenTofu-only); download those from your account.

The module address

www.iac-bazaar.com/iac-bazaar/<slug>/<system>

Quick start - free modules

Free modules need no credentials - anonymous download is allowed. Add the module block, pin the version, init:

main.tf
module "s3_bucket" {
  source  = "www.iac-bazaar.com/iac-bazaar/aws-s3-bucket/aws"
  version = "1.0.0"

  bucket_name = "my-hardened-bucket"
}
Then
terraform init   # or: tofu init

Paid modules

Three steps, once per machine:

  1. Purchase the module (or hold a subscription that covers it) - the registry enforces the same entitlements as the download button.
  2. Create a registry token at /account/tokens. Tokens look like iacb_<40 hex> and are shown once - only a hash is stored, so copy it when it appears.
  3. Configure credentials - either of the two options below. Both work for terraform and tofu.

Option A - CLI config file

Add a credentials block to ~/.terraformrc (Windows: %APPDATA%/terraform.rc; OpenTofu: ~/.tofurc):

credentials "www.iac-bazaar.com" {
  token = "iacb_..."
}

Option B - environment variable

Terraform and tofu both read a per-host token from an env var named after the hostname, where dots become underscores and dashes become double underscores - so www.iac-bazaar.com becomes TF_TOKEN_www_iac__bazaar_com:

export TF_TOKEN_www_iac__bazaar_com="iacb_..."

In CI

The env-var form is made for CI - store the token as a secret and expose it to the job. GitHub Actions, for example:

.github/workflows/plan.yml (excerpt)
jobs:
  plan:
    runs-on: ubuntu-latest
    env:
      TF_TOKEN_www_iac__bazaar_com: ${{ secrets.IAC_BAZAAR_TOKEN }}
    steps:
      - uses: actions/checkout@v4
      - run: terraform init
      - run: terraform plan

Behaviour notes