diff --git a/README.md b/README.md index 055dc0c..f8e8752 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # aws-localstack -OpenTofu project for provisioning simulated AWS resources on LocalStack for the fictional Quantum application. +OpenTofu project for provisioning AWS resources on LocalStack for the Quantum application. LocalStack endpoint: @@ -13,9 +13,9 @@ https://localstack.paulononato.com.br - S3 bucket for Quantum application artifacts. - SQS main queue and DLQ. - Python Lambda function for event processing. -- IAM role and fictional policies for the Lambda function. +- IAM role and policies for the Lambda function. - CloudWatch Log Group. -- Secrets Manager secret with simulated credentials. +- Secrets Manager secret with application configuration. - Event source mapping SQS -> Lambda. ## Repository Layout @@ -63,7 +63,7 @@ Choose an environment first: cd environments/dev ``` -Use `environments/stg` or `environments/prd` for the other simulated stages. +Use `environments/stg` or `environments/prd` for the other stages. Initialize: diff --git a/environments/dev/variables.tf b/environments/dev/variables.tf index 4437f06..10660f9 100644 --- a/environments/dev/variables.tf +++ b/environments/dev/variables.tf @@ -1,5 +1,5 @@ variable "aws_region" { - description = "Simulated AWS region in LocalStack." + description = "AWS region used by LocalStack." type = string default = "us-east-1" } @@ -11,7 +11,7 @@ variable "localstack_endpoint" { } variable "project_name" { - description = "Short name of the fictional project." + description = "Short name of the project." type = string default = "quantum" } diff --git a/environments/prd/variables.tf b/environments/prd/variables.tf index 4437f06..10660f9 100644 --- a/environments/prd/variables.tf +++ b/environments/prd/variables.tf @@ -1,5 +1,5 @@ variable "aws_region" { - description = "Simulated AWS region in LocalStack." + description = "AWS region used by LocalStack." type = string default = "us-east-1" } @@ -11,7 +11,7 @@ variable "localstack_endpoint" { } variable "project_name" { - description = "Short name of the fictional project." + description = "Short name of the project." type = string default = "quantum" } diff --git a/environments/stg/variables.tf b/environments/stg/variables.tf index 4437f06..10660f9 100644 --- a/environments/stg/variables.tf +++ b/environments/stg/variables.tf @@ -1,5 +1,5 @@ variable "aws_region" { - description = "Simulated AWS region in LocalStack." + description = "AWS region used by LocalStack." type = string default = "us-east-1" } @@ -11,7 +11,7 @@ variable "localstack_endpoint" { } variable "project_name" { - description = "Short name of the fictional project." + description = "Short name of the project." type = string default = "quantum" } diff --git a/modules/quantum/main.tf b/modules/quantum/main.tf index 98f206b..e0ba0c8 100644 --- a/modules/quantum/main.tf +++ b/modules/quantum/main.tf @@ -40,7 +40,7 @@ resource "aws_s3_object" "sample_config" { content = jsonencode({ appName = "Quantum" environment = var.environment - featureToggle = "simulated-localstack" + featureToggle = "localstack" owner = "platform-team" }) @@ -84,9 +84,9 @@ resource "aws_secretsmanager_secret_version" "quantum_app" { secret_id = aws_secretsmanager_secret.quantum_app.id secret_string = jsonencode({ - databaseUrl = "postgres://quantum_user:fake_password@quantum-${var.environment}-db.local:5432/quantum" - apiKey = "qtm_${var.environment}_fake_123456" - jwtSecret = "localstack-only-secret-${var.environment}" + databaseUrl = "postgres://quantum_user:change-me@quantum-${var.environment}-db.local:5432/quantum" + apiKey = "qtm_${var.environment}_change_me" + jwtSecret = "change-me-${var.environment}" }) } @@ -111,7 +111,7 @@ resource "aws_iam_role" "quantum_lambda" { resource "aws_iam_policy" "quantum_lambda" { name = "${local.name_prefix}-lambda-policy" - description = "Simulated permissions for the Quantum Lambda function on LocalStack." + description = "Permissions for the Quantum Lambda function on LocalStack." policy = jsonencode({ Version = "2012-10-17" @@ -173,7 +173,7 @@ resource "aws_cloudwatch_log_group" "quantum_lambda" { resource "aws_lambda_function" "quantum_processor" { function_name = "${local.name_prefix}-processor" - description = "Fictional event processor for the Quantum application." + description = "Event processor for the Quantum application." role = aws_iam_role.quantum_lambda.arn runtime = "python3.11" handler = "handler.lambda_handler" diff --git a/modules/quantum/variables.tf b/modules/quantum/variables.tf index a57ce36..729fb45 100644 --- a/modules/quantum/variables.tf +++ b/modules/quantum/variables.tf @@ -1,10 +1,10 @@ variable "project_name" { - description = "Short name of the fictional project." + description = "Short name of the project." type = string default = "quantum" } variable "environment" { - description = "Fictional application environment." + description = "Application environment." type = string }