Add AWS infrastructure as code for PPAL Discord Bot: - API Gateway (HTTP API) for Discord Interactions endpoint - Lambda function (Node.js 20.x container image) - DynamoDB tables (users, conversations) with PAY_PER_REQUEST - Secrets Manager for tokens (Discord, GitHub, OpenAI) - IAM role with inline policies for Lambda execution Files: - versions.tf: Terraform 1.0+ with AWS provider 5.x - variables.tf: environment, project_name, lambda config - api_gateway.tf: HTTP API with CloudWatch logging - lambda.tf: ECR-based Lambda with function URL - dynamodb.tf: GSI-enabled tables with PITR & encryption - secrets.tf: 4 secrets with placeholder values - iam.tf: Inline policies for DynamoDB, Secrets, Logs, ECR - outputs.tf: Endpoint URLs, ARNs (sensitive) Co-Authored-By: Claude <noreply@anthropic.com>
23 lines
339 B
HCL
23 lines
339 B
HCL
terraform {
|
|
required_version = ">= 1.0"
|
|
|
|
required_providers {
|
|
aws = {
|
|
source = "hashicorp/aws"
|
|
version = "~> 5.0"
|
|
}
|
|
}
|
|
}
|
|
|
|
provider "aws" {
|
|
region = var.aws_region
|
|
|
|
default_tags {
|
|
tags = {
|
|
Project = var.project_name
|
|
Environment = var.environment
|
|
ManagedBy = "Terraform"
|
|
}
|
|
}
|
|
}
|