github.com/terramate-io/tf@v0.0.0-20230830114523-fce866b4dfcd/addrs/count_attr.go (about)

     1  // Copyright (c) HashiCorp, Inc.
     2  // SPDX-License-Identifier: MPL-2.0
     3  
     4  package addrs
     5  
     6  // CountAttr is the address of an attribute of the "count" object in
     7  // the interpolation scope, like "count.index".
     8  type CountAttr struct {
     9  	referenceable
    10  	Name string
    11  }
    12  
    13  func (ca CountAttr) String() string {
    14  	return "count." + ca.Name
    15  }
    16  
    17  func (ca CountAttr) UniqueKey() UniqueKey {
    18  	return ca // A CountAttr is its own UniqueKey
    19  }
    20  
    21  func (ca CountAttr) uniqueKeySigil() {}