github.com/pulumi/terraform@v1.4.0/pkg/addrs/for_each_attr.go (about)

     1  package addrs
     2  
     3  // ForEachAttr is the address of an attribute referencing the current "for_each" object in
     4  // the interpolation scope, addressed using the "each" keyword, ex. "each.key" and "each.value"
     5  type ForEachAttr struct {
     6  	referenceable
     7  	Name string
     8  }
     9  
    10  func (f ForEachAttr) String() string {
    11  	return "each." + f.Name
    12  }
    13  
    14  func (f ForEachAttr) UniqueKey() UniqueKey {
    15  	return f // A ForEachAttr is its own UniqueKey
    16  }
    17  
    18  func (f ForEachAttr) uniqueKeySigil() {}