Skip to content

Instantly share code, notes, and snippets.

@hendrixroa
Created March 21, 2023 02:00
Show Gist options
  • Save hendrixroa/fb297809c5ce47e3e4779bcd53d80e26 to your computer and use it in GitHub Desktop.
Save hendrixroa/fb297809c5ce47e3e4779bcd53d80e26 to your computer and use it in GitHub Desktop.
Backend configuration for AWS provider using S3 bucket
terraform {
backend "s3" {
bucket = "your bucket to store state"
key = "terraform.state"
region = "us-east-1"
}
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 4.0"
}
}
}
// All infra is over AWS and is the provider used by default.
provider "aws" {
region = "us-east-1"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment