hashicorp / hashicorp/packer

For_each on data source like http

Open
#12,696 6 comments 0 reactions 0 assignees View on GitHub
core hcl2 stage/needs-discussion wontfix
Dominant language
Go
Stars
15.8k
Forks
3.3k
PR merge metrics
PR metrics pending

Description

#### Description

for_each attribute support on configuration resource

#### Use Case(s)

At times we may iterate on multiple data sources.

#### Potential configuration

```
data "http" "this" {
for_each = local.fileset
URL = "https://git.myserver/api/v4/projects/1000/repository/files/${replace(each.value, "/", "%2F")}?ref=master"
request_headers = {
PRIVATE-TOKEN = var.TOKEN
}
}

```

#### Potential References

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.