terraform {
required_version = ">= 1.5.0"
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 5.0"
}
}
backend "s3" {
bucket = "my-tfstate"
key = "infra/terraform.tfstate"
region = "eu-west-2"
}
}
This block doesn't create anything in AWS. It configures Terraform itself: what version to use, which providers to download, where to store state.