# Terraform version constraints for {{ project_name }}
# Generated by Prism

terraform {
  required_version = ">= 1.5.0"

  required_providers {
    hcloud = {
      source  = "hetznercloud/hcloud"
      version = "~> 1.45"
    }
  }
{% if enable_remote_state %}

  # Hetzner Object Storage backend for remote state
  backend "s3" {
    bucket = "{{ s3_bucket_name }}"
    key    = "terraform.tfstate"
    region = "eu-central"

    endpoints = {
      s3 = "https://{{ s3_endpoint }}"
    }

    skip_credentials_validation = true
    skip_metadata_api_check     = true
    skip_region_validation      = true
    skip_requesting_account_id  = true
    skip_s3_checksum            = true
    use_path_style              = true
  }
{% endif %}
}
