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
+24 -1
View File
@@ -18,6 +18,21 @@ https://localstack.paulononato.com.br
- Secrets Manager secret with simulated credentials.
- Event source mapping SQS -> Lambda.
## Repository Layout
```text
.
+-- environments
| +-- dev
| +-- stg
| +-- prd
+-- examples
+-- modules
+-- quantum
```
Each environment is an independent OpenTofu root module. The shared infrastructure code lives in `modules/quantum`.
## Prerequisites
- OpenTofu installed.
@@ -42,6 +57,14 @@ $env:AWS_DEFAULT_REGION="us-east-1"
## Usage
Choose an environment first:
```bash
cd environments/dev
```
Use `environments/stg` or `environments/prd` for the other simulated stages.
Initialize:
```bash
@@ -79,7 +102,7 @@ Send a message to the Quantum queue:
```bash
aws --endpoint-url https://localstack.paulononato.com.br sqs send-message \
--queue-url "$(tofu output -raw quantum_queue_url)" \
--message-body '{"event":"quantum.order.created","orderId":"QTM-1001"}'
--message-body file://../../examples/quantum-message.json
```
Read the secret: