Skip to content
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

Reference targets to addr of a count/for_each instance won't be collected #412

Open
magodo opened this issue Sep 25, 2024 · 2 comments
Open

Comments

@magodo
Copy link

magodo commented Sep 25, 2024

The CollectReferenceOrigins and CollectReferenceTargets are not recognizing references who targets to an address of a block instance with count/for_each.

@magodo

This comment was marked as outdated.

@magodo magodo closed this as completed Oct 4, 2024
@magodo magodo reopened this Oct 9, 2024
@magodo
Copy link
Author

magodo commented Oct 9, 2024

Reopening this issue as I saw the hcl-lang do have handling of the count and for_each:

if bodySchema.Extensions != nil && bodySchema.Extensions.Count && attr.Name == "count" {
aSchema = schemahelper.CountAttributeSchema()
} else if bodySchema.Extensions != nil && bodySchema.Extensions.ForEach && attr.Name == "for_each" {
aSchema = schemahelper.ForEachAttributeSchema()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant