Terraform
Go: Protocols
IAnyProducer
- Implemented By: IAnyProducer
Interface for lazy untyped value producers.
Methods
Name | Description |
---|---|
Produce | Produce the value. |
Produce
func Produce(context IResolveContext) interface{}
Produce the value.
context
Required
- Type: IResolveContext
IAspect
- Implemented By: MigrateIds, IAspect
Represents an Aspect.
Methods
Name | Description |
---|---|
Visit | All aspects can visit an IConstruct. |
Visit
func Visit(node IConstruct)
All aspects can visit an IConstruct.
node
Required
- Type: github.com/aws/constructs-go/constructs/v10.IConstruct
IFragmentConcatenator
- Implemented By: StringConcat, IFragmentConcatenator
Function used to concatenate symbols in the target document language.
Interface so it could potentially be exposed over jsii.
Methods
Name | Description |
---|---|
Join | Join the fragment on the left and on the right. |
Join
func Join(left interface{}, right interface{}) interface{}
Join the fragment on the left and on the right.
left
Required
- Type: interface{}
right
Required
- Type: interface{}
IImportableConfig
- Implemented By: IImportableConfig
Properties
Name | Type | Description |
---|---|---|
ImportId | *string | No description. |
TerraformResourceType | *string | No description. |
Provider | TerraformProvider | No description. |
ImportId
Required
func ImportId() *string
- Type: *string
TerraformResourceType
Required
func TerraformResourceType() *string
- Type: *string
Provider
Optional
func Provider() TerraformProvider
- Type: TerraformProvider
IInterpolatingParent
- Implemented By: AnyMapList, BooleanMapList, ComplexComputedList, ComplexObject, DataResource, MapList, NumberMapList, StringMapList, TerraformDataSource, TerraformResource, IInterpolatingParent
Methods
Name | Description |
---|---|
InterpolationForAttribute | No description. |
InterpolationForAttribute
func InterpolationForAttribute(terraformAttribute *string) IResolvable
terraformAttribute
Required
- Type: *string
IListProducer
- Implemented By: IListProducer
Interface for lazy list producers.
Methods
Name | Description |
---|---|
Produce | Produce the list value. |
Produce
func Produce(context IResolveContext) *[]*string
Produce the list value.
context
Required
- Type: IResolveContext
IManifest
Properties
Name | Type | Description |
---|---|---|
Stacks | *map[string]StackManifest | No description. |
Version | *string | No description. |
Stacks
Required
func Stacks() *map[string]StackManifest
- Type: *map[string]StackManifest
Version
Required
func Version() *string
- Type: *string
INumberProducer
- Implemented By: INumberProducer
Interface for lazy number producers.
Methods
Name | Description |
---|---|
Produce | Produce the number value. |
Produce
func Produce(context IResolveContext) *f64
Produce the number value.
context
Required
- Type: IResolveContext
IPostProcessor
- Implemented By: IPostProcessor
A Token that can post-process the complete resolved value, after resolve() has recursed over it.
Methods
Name | Description |
---|---|
PostProcess | Process the completely resolved value, after full recursion/resolution has happened. |
PostProcess
func PostProcess(input interface{}, context IResolveContext) interface{}
Process the completely resolved value, after full recursion/resolution has happened.
input
Required
- Type: interface{}
context
Required
- Type: IResolveContext
IRemoteWorkspace
- Implemented By: NamedRemoteWorkspace, PrefixedRemoteWorkspaces, IRemoteWorkspace
IResolvable
- Implemented By: AnyListList, AnyListMap, AnyMap, AnyMapList, BooleanList, BooleanListList, BooleanListMap, BooleanMap, BooleanMapList, ComplexComputedList, ComplexList, ComplexMap, ComplexObject, LazyBase, MapList, NumberListList, NumberListMap, NumberMap, NumberMapList, StringListList, StringListMap, StringMap, StringMapList, IResolvable
Interface for values that can be resolvable later.
Tokens are special objects that participate in synthesis.
Methods
Name | Description |
---|---|
Resolve | Produce the Token's value at resolution time. |
ToString | Return a string representation of this resolvable object. |
Resolve
func Resolve(context IResolveContext) interface{}
Produce the Token's value at resolution time.
context
Required
- Type: IResolveContext
ToString
func ToString() *string
Return a string representation of this resolvable object.
Returns a reversible string representation.
Properties
Name | Type | Description |
---|---|---|
CreationStack | _[]_string | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
CreationStack
Required
func CreationStack() *[]*string
- Type: _[]_string
The creation stack of this resolvable which will be appended to errors thrown during resolution.
If this returns an empty array the stack will not be attached.
IResolveContext
- Implemented By: IResolveContext
Current resolution context for tokens.
Methods
Name | Description |
---|---|
RegisterPostProcessor | Use this postprocessor after the entire token structure has been resolved. |
Resolve | Resolve an inner object. |
RegisterPostProcessor
func RegisterPostProcessor(postProcessor IPostProcessor)
Use this postprocessor after the entire token structure has been resolved.
postProcessor
Required
- Type: IPostProcessor
Resolve
func Resolve(x interface{}) interface{}
Resolve an inner object.
x
Required
- Type: interface{}
Properties
Name | Type | Description |
---|---|---|
Preparing | *bool | True when we are still preparing, false if we're rendering the final output. |
Scope | github.com/aws/constructs-go/constructs/v10.IConstruct | The scope from which resolution has been initiated. |
IgnoreEscapes | *bool | True when ${} should not be parsed, and treated as literals. |
IteratorContext | *string | TerraformIterators can be passed for block attributes and normal list attributes both require different handling when the iterable variable is accessed e.g. a dynamic block needs each.key while a for expression just needs key. |
SuppressBraces | *bool | True when ${} should be ommitted (because already inside them), false otherwise. |
WarnEscapes | *bool | True when ${} should not be included in the string to be resolved, outputs a warning. |
Preparing
Required
func Preparing() *bool
- Type: *bool
True when we are still preparing, false if we're rendering the final output.
Scope
Required
func Scope() IConstruct
- Type: github.com/aws/constructs-go/constructs/v10.IConstruct
The scope from which resolution has been initiated.
IgnoreEscapes
Optional
func IgnoreEscapes() *bool
- Type: *bool
True when ${} should not be parsed, and treated as literals.
IteratorContext
Optional
func IteratorContext() *string
- Type: *string
TerraformIterators can be passed for block attributes and normal list attributes both require different handling when the iterable variable is accessed e.g. a dynamic block needs each.key while a for expression just needs key.
SuppressBraces
Optional
func SuppressBraces() *bool
- Type: *bool
True when ${} should be ommitted (because already inside them), false otherwise.
WarnEscapes
Optional
func WarnEscapes() *bool
- Type: *bool
True when ${} should not be included in the string to be resolved, outputs a warning.
Default: false
IResource
Properties
Name | Type | Description |
---|---|---|
Node | github.com/aws/constructs-go/constructs/v10.Node | The tree node. |
Stack | TerraformStack | The stack in which this resource is defined. |
Node
Required
func Node() Node
- Type: github.com/aws/constructs-go/constructs/v10.Node
The tree node.
Stack
Required
func Stack() TerraformStack
- Type: TerraformStack
The stack in which this resource is defined.
IResourceConstructor
- Implemented By: IResourceConstructor
IScopeCallback
- Implemented By: IScopeCallback
IStackSynthesizer
- Implemented By: IStackSynthesizer
Encodes information how a certain Stack should be deployed inspired by AWS CDK v2 implementation (synth functionality was removed in constructs v10).
Methods
Name | Description |
---|---|
Synthesize | Synthesize the associated stack to the session. |
Synthesize
func Synthesize(session ISynthesisSession)
Synthesize the associated stack to the session.
session
Required
- Type: ISynthesisSession
IStringProducer
- Implemented By: IStringProducer
Interface for lazy string producers.
Methods
Name | Description |
---|---|
Produce | Produce the string value. |
Produce
func Produce(context IResolveContext) *string
Produce the string value.
context
Required
- Type: IResolveContext
ISynthesisSession
- Implemented By: ISynthesisSession
Represents a single session of synthesis.
Passed into TerraformStack.onSynthesize()
methods.
originally from aws/constructs lib v3.3.126 (synth functionality was removed in constructs v10)
Properties
Name | Type | Description |
---|---|---|
Manifest | Manifest | No description. |
Outdir | *string | The output directory for this synthesis session. |
SkipValidation | *bool | No description. |
Manifest
Required
func Manifest() Manifest
- Type: Manifest
Outdir
Required
func Outdir() *string
- Type: *string
The output directory for this synthesis session.
SkipValidation
Optional
func SkipValidation() *bool
- Type: *bool
ITerraformAddressable
- Implemented By: AnyListList, AnyListMap, AnyMap, AnyMapList, BooleanList, BooleanListList, BooleanListMap, BooleanMap, BooleanMapList, ComplexComputedList, ComplexList, ComplexMap, ComplexObject, DataResource, DataTerraformRemoteState, DataTerraformRemoteStateAzurerm, DataTerraformRemoteStateConsul, DataTerraformRemoteStateCos, DataTerraformRemoteStateGcs, DataTerraformRemoteStateHttp, DataTerraformRemoteStateLocal, DataTerraformRemoteStateOss, DataTerraformRemoteStatePg, DataTerraformRemoteStateS3, DataTerraformRemoteStateSwift, MapList, NumberListList, NumberListMap, NumberMap, NumberMapList, StringListList, StringListMap, StringMap, StringMapList, TerraformDataSource, TerraformHclModule, TerraformLocal, TerraformModule, TerraformRemoteState, TerraformResource, TerraformVariable, ITerraformAddressable, ITerraformDependable
Properties
Name | Type | Description |
---|---|---|
Fqn | *string | No description. |
Fqn
Required
func Fqn() *string
- Type: *string
ITerraformDependable
Extends: ITerraformAddressable
Implemented By: DataResource, TerraformDataSource, TerraformHclModule, TerraformModule, TerraformResource, ITerraformDependable
Properties
Name | Type | Description |
---|---|---|
Fqn | *string | No description. |
Fqn
Required
func Fqn() *string
- Type: *string
ITerraformIterator
- Implemented By: DynamicListTerraformIterator, ListTerraformIterator, MapTerraformIterator, ResourceTerraformIterator, TerraformIterator, ITerraformIterator
ITerraformResource
- Implemented By: DataResource, TerraformDataSource, TerraformResource, ITerraformResource
Methods
Name | Description |
---|---|
InterpolationForAttribute | No description. |
InterpolationForAttribute
func InterpolationForAttribute(terraformAttribute *string) IResolvable
terraformAttribute
Required
- Type: *string
Properties
Name | Type | Description |
---|---|---|
Fqn | *string | No description. |
FriendlyUniqueId | *string | No description. |
TerraformResourceType | *string | No description. |
Count | interface{} | No description. |
DependsOn | _[]_string | No description. |
ForEach | ITerraformIterator | No description. |
Lifecycle | TerraformResourceLifecycle | No description. |
Provider | TerraformProvider | No description. |
Fqn
Required
func Fqn() *string
- Type: *string
FriendlyUniqueId
Required
func FriendlyUniqueId() *string
- Type: *string
TerraformResourceType
Required
func TerraformResourceType() *string
- Type: *string
Count
Optional
func Count() interface{}
- Type: interface{}
DependsOn
Optional
func DependsOn() *[]*string
- Type: _[]_string
ForEach
Optional
func ForEach() ITerraformIterator
- Type: ITerraformIterator
Lifecycle
Optional
func Lifecycle() TerraformResourceLifecycle
Provider
Optional
func Provider() TerraformProvider
- Type: TerraformProvider
ITokenMapper
- Implemented By: ITokenMapper
Interface to apply operation to tokens in a string.
Interface so it can be exported via jsii.
Methods
Name | Description |
---|---|
MapToken | Replace a single token. |
MapToken
func MapToken(t IResolvable) interface{}
Replace a single token.
t
Required
- Type: IResolvable
ITokenResolver
- Implemented By: DefaultTokenResolver, ITokenResolver
How to resolve tokens.
Methods
Name | Description |
---|---|
ResolveList | Resolve a tokenized list. |
ResolveMap | Resolve a tokenized map. |
ResolveNumberList | Resolve a tokenized number list. |
ResolveString | Resolve a string with at least one stringified token in it. |
ResolveToken | Resolve a single token. |
ResolveList
func ResolveList(l *[]*string, context IResolveContext) interface{}
Resolve a tokenized list.
l
Required
- Type: _[]_string
context
Required
- Type: IResolveContext
ResolveMap
func ResolveMap(m *map[string]interface{}, context IResolveContext) interface{}
Resolve a tokenized map.
m
Required
- Type: *map[string]interface{}
context
Required
- Type: IResolveContext
ResolveNumberList
func ResolveNumberList(l *[]*f64, context IResolveContext) interface{}
Resolve a tokenized number list.
l
Required
- Type: _[]_f64
context
Required
- Type: IResolveContext
ResolveString
func ResolveString(s TokenizedStringFragments, context IResolveContext) interface{}
Resolve a string with at least one stringified token in it.
(May use concatenation)
s
Required
- Type: TokenizedStringFragments
context
Required
- Type: IResolveContext
ResolveToken
func ResolveToken(t IResolvable, context IResolveContext, postProcessor IPostProcessor) interface{}
Resolve a single token.
t
Required
- Type: IResolvable
context
Required
- Type: IResolveContext
postProcessor
Required
- Type: IPostProcessor