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
# 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
Download from the command line
curl -L -o main.tf https://files.samplefiles.com/config/terraform/main.tfwget https://files.samplefiles.com/config/terraform/main.tfhttps://files.samplefiles.com/config/terraform/main.tfprintf '%s %s\n' 93eec448bd4ced2b93940b94fcba235fc0ee711fd080acdb1eca1c958d932939 main.tf | shasum -a 256 -cOr check the download in your browser with the checksum calculator.