Page MenuHomePhabricator

[terraform] Expose shared dynamodb tables
ClosedPublic

Authored by bartek on Aug 3 2023, 2:36 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, May 7, 9:12 PM
Unknown Object (File)
Tue, May 7, 9:12 PM
Unknown Object (File)
Tue, May 7, 9:12 PM
Unknown Object (File)
Tue, May 7, 9:10 PM
Unknown Object (File)
Mar 27 2024, 11:55 PM
Unknown Object (File)
Feb 24 2024, 11:25 AM
Unknown Object (File)
Feb 24 2024, 11:25 AM
Unknown Object (File)
Feb 24 2024, 11:25 AM
Subscribers

Details

Summary

This stack resolves issues encountered when setting up fresh staging AWS account with Terraform.

This diff resolves an issue when running terraform plan on plain fresh AWS account. The aws_dynamodb_table data doesn't resolve to anything because the DDB table isn't yet created.

Resources from inside module aren't globally exposed, so I created a outputs.tf file in the shared module and iterated over explicitly-specified table resources to expose them.

I really wanted to do it in a more automated way, but TF has no good mechanism for iterating over all resources yet. There's an open issue for that where people share other usecases for such feature.

Depends on D8714

Test Plan

Production terraform plan with no changes. Staging plan no longer fails.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable