Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3383447
D8715.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D8715.diff
View Options
diff --git a/services/terraform/modules/shared/outputs.tf b/services/terraform/modules/shared/outputs.tf
new file mode 100644
--- /dev/null
+++ b/services/terraform/modules/shared/outputs.tf
@@ -0,0 +1,13 @@
+locals {
+ exported_dynamodb_tables = [
+ aws_dynamodb_table.feature-flags
+ ]
+}
+
+# map table names to their resources
+output "dynamodb_tables" {
+ value = {
+ for table in local.exported_dynamodb_tables :
+ table.name => table
+ }
+}
diff --git a/services/terraform/remote/aws_iam.tf b/services/terraform/remote/aws_iam.tf
--- a/services/terraform/remote/aws_iam.tf
+++ b/services/terraform/remote/aws_iam.tf
@@ -108,9 +108,6 @@
}
# Feature Flags IAM
-data "aws_dynamodb_table" "feature_flags" {
- name = "feature-flags"
-}
data "aws_iam_policy_document" "read_feature_flags" {
statement {
sid = "FeatureFlagsDDBReadAccess"
@@ -122,7 +119,7 @@
"dynamodb:Scan",
]
resources = [
- data.aws_dynamodb_table.feature_flags.arn,
+ module.shared.dynamodb_tables["feature-flags"].arn
]
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 29, 3:40 PM (21 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2597403
Default Alt Text
D8715.diff (1 KB)
Attached To
Mode
D8715: [terraform] Expose shared dynamodb tables
Attached
Detach File
Event Timeline
Log In to Comment