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

Enable scoped addressing of check > data block #234

Open
radeksimko opened this issue Jun 16, 2023 · 0 comments
Open

Enable scoped addressing of check > data block #234

radeksimko opened this issue Jun 16, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@radeksimko
Copy link
Member

Context

#229 introduces the check block, which can look like this

check "health_check" {
  data "http" "terraform_io" {
    url = "https://www.terraform.io"
  }

  assert {
    condition = data.http.terraform_io.status_code == 200
    error_message = "${data.http.terraform_io.url} returned an unhealthy status code"
  }
}

That PR enables completion, hover etc. throughout the block but does not recognise the references to the scoped data block within check, i.e. data.http.terraform_io.* references above.

2023-06-16 17 13 38

This was omitted from the PR as there's currently no simple way of expressing such a scoped reference through the hcl-lang schema.

Proposal

  • hcl-lang: Explore ways a scoped address such as the above could be expressed in the schema
  • terraform-schema: Add Address to the nested data block
@radeksimko radeksimko added the enhancement New feature or request label Jun 16, 2023
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