-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: include referenced resources in resource block's __tfmeta (fixes #99) #219
base: main
Are you sure you want to change the base?
fix: include referenced resources in resource block's __tfmeta (fixes #99) #219
Conversation
Make use of the changes from cloud-custodian/tfparse#219 to track all references to other blocks declared for a block.
Make use of the changes from cloud-custodian/tfparse#219 to track all references to other blocks declared for a block.
Make use of the changes from cloud-custodian/tfparse#219 to track all references to other blocks declared for a block.
Make use of the changes from cloud-custodian/tfparse#219 to track all references to other blocks declared for a block.
we'll need some release notes about the breaking change as well |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, thanks
e567989
to
ad368e3
Compare
ad368e3
to
5b38cf4
Compare
Make use of the changes from cloud-custodian/tfparse#219 to track all references to other blocks declared for a block.
It looks like we won't be able to see references in a case like this: resource "aws_instance" "example" {
launch_template {
id = aws_launch_template.example.id
}
}
resource "aws_launch_template" "example" {
name = "example"
metadata_options {
http_endpoint = "enabled"
http_tokens = "required"
}
} Where the use case is using a traverse filter to see if an instance has IMDSv2 enforced via For what it's worth, we don't catch this as a reference on main either. But I bring it up here because if the issue is that we're not seeing or tracking references that come from nested blocks inside resources, I don't know if that has any impact on how to approach this PR. |
references
entry in a resource's__tfmeta
if attributes reference other resources, which lists referenced blocks and they IDs. This allows c7n-left to build cross references, allowing traversal filters to work properly