# Bootstrap module for the remote-state backend.
# This module uses LOCAL state by design — it creates the bucket + lock table
# that the main terraform/ module then uses as its S3 backend.
# Reader-facing copy: cloud-devops/lesson08-terraform-basics/lab_guide.html.

terraform {
  required_version = ">= 1.6.0"
  required_providers {
    aws = { source = "hashicorp/aws", version = "~> 5.0" }
  }
}

provider "aws" {
  region = var.region
}

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

variable "bucket_name" {
  type        = string
  description = "Globally-unique S3 bucket for tfstate. Suggest 'url-shortener-tfstate-<your-handle>'."
}

variable "lock_table_name" {
  type    = string
  default = "url-shortener-tflock"
}
