openclaw/workers/ppal-aws/terraform/variables.tf
Shunsuke Hayashi abed5cb5cb feat(ppal-aws): add Terraform configuration for Discord Bot
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>
2026-01-25 19:04:55 +09:00

60 lines
1.4 KiB
HCL

variable "aws_region" {
description = "AWS region for resources"
type = string
default = "ap-northeast-1"
}
variable "environment" {
description = "Environment name (e.g., production, staging)"
type = string
default = "production"
}
variable "project_name" {
description = "Project name used for resource naming"
type = string
default = "ppal"
}
variable "lambda_handler" {
description = "Lambda handler function name"
type = string
default = "index.handler"
}
variable "lambda_timeout" {
description = "Lambda function timeout in seconds"
type = number
default = 30
}
variable "lambda_memory_size" {
description = "Lambda function memory size in MB"
type = number
default = 256
}
variable "discord_bot_token_secret_name" {
description = "Secrets Manager secret name for Discord bot token"
type = string
default = "ppal/discord/bot-token"
}
variable "discord_public_key_secret_name" {
description = "Secrets Manager secret name for Discord public key"
type = string
default = "ppal/discord/public-key"
}
variable "github_token_secret_name" {
description = "Secrets Manager secret name for GitHub token"
type = string
default = "ppal/github/token"
}
variable "openai_api_key_secret_name" {
description = "Secrets Manager secret name for OpenAI API key"
type = string
default = "ppal/openai/api-key"
}