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

Recognise local references in dynamic blocks #172

Open
radeksimko opened this issue Dec 2, 2022 · 0 comments
Open

Recognise local references in dynamic blocks #172

radeksimko opened this issue Dec 2, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@radeksimko
Copy link
Member

Currently we do not recognise "local" references within the dynamic block, such as setting.* in this example:

resource "aws_elastic_beanstalk_environment" "tfenvtest" {
  # ...
  dynamic "setting" {
    for_each = var.settings
    content {
      namespace = setting.value["namespace"] # HERE
      name      = setting.value["name"] # HERE
      value     = setting.value["value"] # HERE
    }
  }
}

This affects completion, hover, go-to-*, and semantic token highlighting.

What makes these local references different to other local references we already support (such as count.index, each.* and self.*) is that aside from the first segment, such as settings above, the rest of the address is fully dependent on interpolating the provided expression/variable inside for_each.

@radeksimko radeksimko added the enhancement New feature or request label Dec 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant