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)
Sun, Nov 17, 3:50 AM
Unknown Object (File)
Sun, Nov 17, 3:50 AM
Unknown Object (File)
Sun, Nov 17, 3:48 AM
Unknown Object (File)
Sat, Nov 16, 11:28 PM
Unknown Object (File)
Oct 23 2024, 11:06 AM
Unknown Object (File)
Oct 17 2024, 1:06 AM
Unknown Object (File)
Oct 17 2024, 1:06 AM
Unknown Object (File)
Oct 17 2024, 1:02 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