All Tools View Categories About Contact Privacy

Terraform providers.tf Generator

Scaffold required_providers and provider blocks for any provider.

Runs entirely in your browser - nothing is uploaded and no cloud connection is made.
Your generated providers.tf will appear here.
0
Lines
0
Words
0
Characters

About Terraform providers.tf Generator

Providers connect Terraform to the outside world: clouds, SaaS platforms and internal services. A correct providers.tf is the first file almost every project needs, and it is also one of the most frequently copy pasted incorrectly. The providers.tf Generator scaffolds a terraform block with a required_providers map and one provider block per provider, using the exact source and version constraints Terraform expects, so your first terraform init resolves cleanly. A wrong source string or a missing version constraint is the most common cause of confusing provider errors, and this tool removes that risk. When a source is misspelled, Terraform may silently try to install from the public registry instead of your intended private one, which is a real security and reliability hazard. Pinning versions also protects you from surprise breaking changes when a provider publishes a new minor release.

Add as many providers as your project needs, give each a name, a fully qualified source and an optional version constraint, and optionally set a required_version for Terraform itself. You can also set a region per provider when the provider takes one. The result is valid HCL you can drop straight into a repository. Everything is assembled in your browser, with no upload and no network call, so even a provider for a private registry stays on your machine. Because the output is plain HCL, you can review it in a pull request exactly like any other code change. The generator keeps the structure small and predictable, which makes it a good teaching artifact for engineers learning how Terraform discovers and pins providers. It is also handy when bootstrapping a new module that needs to declare its provider requirements up front.

Features

  • required_providers - a correct source and version pin per provider, written exactly as Terraform expects.
  • Any provider - aws, google, azurerm, kubernetes, random and custom sources.
  • Per provider region - optional region attribute when relevant.
  • required_version - pin the Terraform CLI version globally.
  • Dynamic rows - add or remove provider rows without losing data.
  • Validation - names must be valid identifiers, sources required, no duplicates.
  • Ordered output - a single terraform block with all providers listed together.
  • Copy, download, print - export providers.tf in three ways.
  • Live stats - see provider count, line and character totals.
  • Browser only - fully client side and private.
  • Sample loader - prefill a realistic multi provider example in one click.
  • Reset safely - clear the form and start again without side effects.

How to Use

  1. Set required_version - optionally pin the Terraform CLI, e.g. >= 1.5.0, to keep every machine aligned.
  2. Add a provider row - click Add provider for each one you need.
  3. Fill the fields - name, source, version and an optional region.
  4. Repeat as needed - add aws, google, azurerm, random or a custom source.
  5. Remove rows - delete any row you no longer want before generating.
  6. Generate - review the rendered HCL and the live stats panel.
  7. Check the stats - confirm the provider count and line total look right before exporting.
  8. Export it - copy, download providers.tf or print it.
  9. Commit - drop the file into your repo and run terraform init.

Examples

AWS only: name=aws, source="hashicorp/aws", version="~> 5.0", region="us-east-1" yields a provider "aws" block plus a required_providers entry. Multi cloud: add google with source="hashicorp/google" and region="us-central1" to get both an aws and a google provider in one file. No version: leaving version and region blank still emits a valid provider block with no extra attributes, which is handy for local experiments. Private source: enter a custom registry source to scaffold a provider from an internal registry. CLI pin: setting required_version to >= 1.5.0 guards the whole project against old Terraform behaviour. The stats panel shows how many provider blocks and how many lines the file contains before you save it.

Benefits

  • Valid HCL - correct provider block and required_providers syntax, generated the same way every time.
  • Pinned versions - reproducible provider resolution across machines and CI runners.
  • Flexible - any provider source, public or private, with or without a region.
  • Private - runs fully in the browser, with no upload and no telemetry.
  • Fast onboarding - new projects start from a correct file in seconds.
  • Consistent - the same shape every time, easy to review and diff in pull requests.
  • Educational - the stats panel makes the file anatomy obvious to learners.
  • Safe - validation catches duplicate names and missing sources before you generate.

Frequently Asked Questions

What does this tool generate?
It writes a providers.tf with a terraform required_providers block plus one provider block per provider you define (region optional).
Which providers are supported?
Any provider: aws, google (GCP), azurerm, kubernetes, random, and custom sources. Enter the source and an optional version constraint.
How is source written?
Use the fully-qualified source such as "hashicorp/aws" or "hashicorp/google". The version is an HCL constraint like ~> 5.0.
Is a region required?
No. Leave region blank to emit a provider block with no region; otherwise region = "..." is added.
Does this upload anything?
No. Everything is assembled in your browser and nothing leaves your machine.
Can I download the result?
Yes. Copy providers.tf, download it, or print it.