Config Files · 1 file

Sample Terraform File

Terraform describes infrastructure in HCL (.tf) files: providers, variables, resources and outputs. Our sample is realistic and valid for its tool, with fake hosts and secrets.

Terraform · 840 B

Terraform configuration (HCL)

Terraform HCL with a provider, variables, an S3-style bucket, a versioning resource, locals and outputs. All hosts, keys and secrets are fake.

CC0 · free for any use · Verified by an independent tool · Report a problem

main.tf — first linesTerraform
# Sample Terraform configuration — samplefiles.com
terraform {
  required_version = ">= 1.6"
  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "~> 5.0"
    }
  }
}

provider "aws" {
  region = var.region
}

variable "region" {
  type    = string
  default = "us-east-1"
}

variable "environment" {
  type        = string
  description = "Deployment environment name"
  default     = "staging"
}

File details

Size
840 B (840 bytes)
MIME type
text/plain
SHA-256
93eec448bd4ced2b93940b94fcba235fc0ee711fd080acdb1eca1c958d932939
MD5
67468ea266bd1f8545a43cdc79d6d884

Download from the command line

curl -L -o main.tf https://files.samplefiles.com/config/terraform/main.tf

Or check the download in your browser with the checksum calculator.