first claude draft
This commit is contained in:
58
infra/aws/terraform/main.tf
Normal file
58
infra/aws/terraform/main.tf
Normal file
@@ -0,0 +1,58 @@
|
||||
# System Monitor Platform - AWS Infrastructure
|
||||
#
|
||||
# This Terraform configuration sets up:
|
||||
# - EC2 instance for running Docker Compose (demo/staging)
|
||||
# - Lambda functions for data processing pipeline
|
||||
# - SQS queue for buffering metrics
|
||||
# - S3 bucket for metric backups
|
||||
# - Security groups and IAM roles
|
||||
|
||||
terraform {
|
||||
required_version = ">= 1.0"
|
||||
|
||||
required_providers {
|
||||
aws = {
|
||||
source = "hashicorp/aws"
|
||||
version = "~> 5.0"
|
||||
}
|
||||
}
|
||||
|
||||
# Uncomment for remote state
|
||||
# backend "s3" {
|
||||
# bucket = "your-terraform-state-bucket"
|
||||
# key = "sysmonstm/terraform.tfstate"
|
||||
# region = "us-east-1"
|
||||
# }
|
||||
}
|
||||
|
||||
provider "aws" {
|
||||
region = var.aws_region
|
||||
|
||||
default_tags {
|
||||
tags = {
|
||||
Project = "sysmonstm"
|
||||
Environment = var.environment
|
||||
ManagedBy = "terraform"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Data sources
|
||||
data "aws_availability_zones" "available" {
|
||||
state = "available"
|
||||
}
|
||||
|
||||
data "aws_ami" "amazon_linux_2023" {
|
||||
most_recent = true
|
||||
owners = ["amazon"]
|
||||
|
||||
filter {
|
||||
name = "name"
|
||||
values = ["al2023-ami-*-x86_64"]
|
||||
}
|
||||
|
||||
filter {
|
||||
name = "virtualization-type"
|
||||
values = ["hvm"]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user