HomePhabricator
Diffusion Comm 35834a687935

[terraform] Expose shared dynamodb tables

Description

[terraform] Expose shared dynamodb tables

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.

Reviewers: jon, varun

Reviewed By: jon

Subscribers: ashoat, tomek

Differential Revision: https://phab.comm.dev/D8715

Details

Provenance
bartekAuthored on Aug 3 2023, 2:03 AM
Reviewer
jon
Differential Revision
D8715: [terraform] Expose shared dynamodb tables
Parents
rCOMMa592acaf51de: [terraform] Add S3 bucket name suffix
Branches
Unknown
Tags
Unknown