Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var NoEachIndex = EachIndex(nil)
NoIndex is a nil value of type EachIndex that is used when ForEach is not in use, to represent the absense of an index.
Functions ¶
Types ¶
type EachIndex ¶
EachIndex represents an index for an instance of a configuration structure that supports ForEach.
EachInt and EachString represent integer and string indices respectively. Which type is used depends on whether ForEach is assigned a list or a map.
A nil EachIndex represents no index at all, which us used when ForEach is not set.
func MakeEachIndex ¶
MakeEachIndex takes a cty.Value of either cty.Number or cty.String and produces the equivalent EachIndex.
This function will return NoEachIndex if the given value is not of a suitable type or if it not convertable to an int. It will panic if the value is unknown or null.
type EachString ¶
type EachString string
func (EachString) EachType ¶
func (s EachString) EachType() EachType
func (EachString) String ¶
func (s EachString) String() string
func (EachString) Value ¶
func (s EachString) Value() cty.Value
type ModulePath ¶
type ModulePath []ModulePathStep
var RootModulePath ModulePath
RootModulePath is a ModulePath representing the root module
func (ModulePath) AppendIndex ¶
func (m ModulePath) AppendIndex(key EachIndex) ModulePath
func (ModulePath) AppendName ¶
func (m ModulePath) AppendName(name string) ModulePath
func (ModulePath) IsRoot ¶
func (m ModulePath) IsRoot() bool
func (ModulePath) NearestName ¶
func (m ModulePath) NearestName() ModulePath
func (ModulePath) Parent ¶
func (m ModulePath) Parent() ModulePath
func (ModulePath) String ¶
func (m ModulePath) String() string
type ModulePathStep ¶
type ModulePathStep interface {
// contains filtered or unexported methods
}
type NameInModule ¶
type NameInModule struct { Module ModulePath Name string Key EachIndex }
NameInModule is a tuple of a module path, a name defined within that module, an an optional index into the referenced object for objects that support ForEach. The Key field is NoEachIndex when no index is selected, or will otherwise be an EachInt or EachString value.
func (NameInModule) ID ¶
func (n NameInModule) ID() string
ID returns an opaque string that uniquely identifies the recieving qualified name using only alphanumeric characters, suitable for use as a resource identifier in CloudFormation template JSON.
The result is not intelligible to humans, so objects using such ids should generally be annotated with a human-readable form too so that users can map generated objects back onto the source construct that created them.
func (NameInModule) String ¶
func (n NameInModule) String() string