Overview

resource "foo" "example" {
  #...
 
  dynamic "settings" {
    for_each = var.settings
 
    content {
      name = settings.value["name"]
 
      #...
    }
  }
}
  • Can specify an iterator nameā€”defaults to the name of the dynamic block:
resource "foo" "example" {
  #...
 
  dynamic "settings" {
    for_each = var.settings
    iterator = "bar"
 
    content {
      name = bar.value["name"]
 
      #...
    }
  }
}

Graph View