Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How do I write rules for "dynamic" blocks? #1917

Unanswered
CallumHibbert asked this question in Help and suppports
Discussion options

Sometimes I might declare a DynamoDB global table like this:

resource aws_dynamodb_table table {
 billing_mode = "PAY_PER_REQUEST"
 name = "dynamodb_table_name"
 dynamic replica {
 for_each = var.table_replication_regions
 content {
 propagate_tags = true
 region_name = replica.value
 }
 }
}

This allows me to vary the regions the table is replicated to (by passing in the regions via the table_replication_regions list variable).

I would like to write a TFSec rule that ensures propagate_tags is true for this sort of scenario. How can I do that? I can't find a way to do a subMatch on a dynamic block.

You must be logged in to vote

Replies: 1 comment

Comment options

+1

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /