Initial commit: AWS CloudFront with OpenTofu infrastructure
- Complete CloudFront distribution setup with origin.servidor.it.com - WAF v2 integration for security protection - S3 backend for Terraform state management - CloudFront logging to S3 - HTTP-only origin protocol configuration (resolves 504 Gateway Timeout) - Comprehensive documentation with deployment guide 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
43
versions.tf
Normal file
43
versions.tf
Normal file
@@ -0,0 +1,43 @@
|
||||
terraform {
|
||||
required_version = ">= 1.5"
|
||||
|
||||
required_providers {
|
||||
aws = {
|
||||
source = "hashicorp/aws"
|
||||
version = "~> 5.0"
|
||||
}
|
||||
}
|
||||
|
||||
# Uncomment and configure if you want to use remote state
|
||||
# backend "s3" {
|
||||
# bucket = "your-tofu-state-bucket"
|
||||
# key = "cloudfront/terraform.tfstate"
|
||||
# region = "us-east-1"
|
||||
# }
|
||||
}
|
||||
|
||||
provider "aws" {
|
||||
region = var.aws_region
|
||||
|
||||
default_tags {
|
||||
tags = {
|
||||
Project = var.project_name
|
||||
Environment = var.environment
|
||||
ManagedBy = "OpenTofu"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Additional provider for ACM certificate (must be in us-east-1 for CloudFront)
|
||||
provider "aws" {
|
||||
alias = "us_east_1"
|
||||
region = "us-east-1"
|
||||
|
||||
default_tags {
|
||||
tags = {
|
||||
Project = var.project_name
|
||||
Environment = var.environment
|
||||
ManagedBy = "OpenTofu"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user