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

Support for dynamic block #530

Closed
7 tasks
radeksimko opened this issue May 20, 2021 · 1 comment · Fixed by #1115
Closed
7 tasks

Support for dynamic block #530

radeksimko opened this issue May 20, 2021 · 1 comment · Fixed by #1115
Assignees
Milestone

Comments

@radeksimko
Copy link
Member

radeksimko commented May 20, 2021

Use-cases

Terraform supports a dynamic "meta" block within resource data, provider and provisioner blocks, for example:

resource "aws_elastic_beanstalk_environment" "example" {
  name                = "example"
  application         = "example-app"
  solution_stack_name = "64bit Amazon Linux 2018.03 v2.11.4 running Go 1.12.6"

  dynamic "setting" {
    for_each = var.settings
    content {
      namespace = setting.value["namespace"]
      name      = setting.value["name"]
      value     = setting.value["value"]
    }
  }
}

variable "settings" {
  type = list(object({
    namespace = string
    name      = string
    value     = string
  }))
}

Language server currently does not support this block, which in practice means that e.g.

  • dynamic doesn't come up as candidate when completing resource data, provider or provisioner body
  • no completion is provided within an existing dynamic block
  • no data is provided when user hovers over dynamic block or any block/attribute/value within it
  • no tokens are reported for the dynamic block itself or anything within it

Expected UX

Completion

Screen.Recording.2022-06-01.at.10.59.59.mov

Hover

Screen.Recording.2022-06-01.at.10.57.39.mov

Semantic Tokens

TODO

Proposal

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants