Hello, whne I’m trying to use a dynamic block for my docker_container
m getting the issue below:
resource "docker_container" "myapp" {
for_each = var.image_map
name = each.key
image = each.value.image
dynamic "env" {
for_each = var.vault_data_map
content {
VAULT_USERNAME = env.value.vault_user
VAULT_PASSWORD = env.value.vault_password
}
}
...
}
│ Error: Unsupported block type
│
│ on …/main.tf line 17, in resource “docker_container” “myapp”:
│ 17: dynamic “env” {
│
│ Blocks of type “env” are not expected here.
What would be the right way to do it?
Thanks!