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

Loosen up reference matching when completing lists #1283

Open
radeksimko opened this issue May 12, 2023 · 0 comments
Open

Loosen up reference matching when completing lists #1283

radeksimko opened this issue May 12, 2023 · 0 comments
Labels

Comments

@radeksimko
Copy link
Member

Context

References to lists can (and often are) addressed using indexes. One common example is creating AWS subnets for each AZ:

data "aws_availability_zones" "all" {}

resource "aws_subnet" "public" {
  count             = 3
  availability_zone = data.aws_availability_zones.all.names[count.index]
}

In which case we do not complete data.aws_availability_zones.all.names (list of strings) due to availability_zone attribute having string constraint. Such strict constraint matching is unhelpful to the user.

Screenshot 2023-05-12 at 17 09 17

Proposal

Loosen up matching of references, such that list of TYPE is considered match for constraint of TYPE.

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

No branches or pull requests

1 participant