Structure OpenTofu environments

This commit is contained in:
2026-04-20 16:54:09 -03:00
parent 707852bb3a
commit c363cab9bd
22 changed files with 278 additions and 16 deletions
+6
View File
@@ -0,0 +1,6 @@
module "quantum" {
source = "../../modules/quantum"
project_name = var.project_name
environment = "dev"
}
+34
View File
@@ -0,0 +1,34 @@
output "localstack_endpoint" {
description = "LocalStack endpoint used by the provider."
value = var.localstack_endpoint
}
output "quantum_bucket_name" {
description = "S3 bucket for the Quantum application."
value = module.quantum.quantum_bucket_name
}
output "quantum_queue_url" {
description = "Main SQS queue URL."
value = module.quantum.quantum_queue_url
}
output "quantum_dlq_url" {
description = "DLQ URL."
value = module.quantum.quantum_dlq_url
}
output "quantum_lambda_name" {
description = "Processor Lambda function name."
value = module.quantum.quantum_lambda_name
}
output "quantum_log_group_name" {
description = "CloudWatch Log Group for the Lambda function."
value = module.quantum.quantum_log_group_name
}
output "quantum_secret_name" {
description = "Secrets Manager secret name."
value = module.quantum.quantum_secret_name
}
+22
View File
@@ -0,0 +1,22 @@
provider "aws" {
region = var.aws_region
access_key = "test"
secret_key = "test"
s3_use_path_style = true
skip_credentials_validation = true
skip_metadata_api_check = true
skip_requesting_account_id = true
endpoints {
apigateway = var.localstack_endpoint
cloudformation = var.localstack_endpoint
cloudwatch = var.localstack_endpoint
iam = var.localstack_endpoint
lambda = var.localstack_endpoint
logs = var.localstack_endpoint
s3 = var.localstack_endpoint
secretsmanager = var.localstack_endpoint
sqs = var.localstack_endpoint
sts = var.localstack_endpoint
}
}
+17
View File
@@ -0,0 +1,17 @@
variable "aws_region" {
description = "Simulated AWS region in LocalStack."
type = string
default = "us-east-1"
}
variable "localstack_endpoint" {
description = "LocalStack HTTPS endpoint."
type = string
default = "https://localstack.paulononato.com.br"
}
variable "project_name" {
description = "Short name of the fictional project."
type = string
default = "quantum"
}
+14
View File
@@ -0,0 +1,14 @@
terraform {
required_version = ">= 1.6.0"
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 5.0"
}
archive = {
source = "hashicorp/archive"
version = "~> 2.4"
}
}
}