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.
contextRequired
- 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.
nodeRequired
- 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.
leftRequired
- Type: interface{}
rightRequired
- Type: interface{}
IImportableConfig
- Implemented By: IImportableConfig
Properties
| Name | Type | Description |
|---|---|---|
ImportId | *string | No description. |
TerraformResourceType | *string | No description. |
Provider | TerraformProvider | No description. |
ImportIdRequired
func ImportId() *string
- Type: *string
TerraformResourceTypeRequired
func TerraformResourceType() *string
- Type: *string
ProviderOptional
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
terraformAttributeRequired
- 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.
contextRequired
- Type: IResolveContext
IManifest
Properties
| Name | Type | Description |
|---|---|---|
Stacks | *map[string]StackManifest | No description. |
Version | *string | No description. |
StacksRequired
func Stacks() *map[string]StackManifest
- Type: *map[string]StackManifest
VersionRequired
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.
contextRequired
- 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.
inputRequired
- Type: interface{}
contextRequired
- 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.
contextRequired
- 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. |
CreationStackRequired
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.
postProcessorRequired
- Type: IPostProcessor
Resolve
func Resolve(x interface{}) interface{}
Resolve an inner object.
xRequired
- 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. |
PreparingRequired
func Preparing() *bool
- Type: *bool
True when we are still preparing, false if we're rendering the final output.
ScopeRequired
func Scope() IConstruct
- Type: github.com/aws/constructs-go/constructs/v10.IConstruct
The scope from which resolution has been initiated.
IgnoreEscapesOptional
func IgnoreEscapes() *bool
- Type: *bool
True when ${} should not be parsed, and treated as literals.
IteratorContextOptional
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.
SuppressBracesOptional
func SuppressBraces() *bool
- Type: *bool
True when ${} should be ommitted (because already inside them), false otherwise.
WarnEscapesOptional
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. |
NodeRequired
func Node() Node
- Type: github.com/aws/constructs-go/constructs/v10.Node
The tree node.
StackRequired
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.
sessionRequired
- 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.
contextRequired
- 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. |
ManifestRequired
func Manifest() Manifest
- Type: Manifest
OutdirRequired
func Outdir() *string
- Type: *string
The output directory for this synthesis session.
SkipValidationOptional
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. |
FqnRequired
func Fqn() *string
- Type: *string
ITerraformDependable
Extends: ITerraformAddressable
Implemented By: DataResource, TerraformDataSource, TerraformHclModule, TerraformModule, TerraformResource, ITerraformDependable
Properties
| Name | Type | Description |
|---|---|---|
Fqn | *string | No description. |
FqnRequired
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
terraformAttributeRequired
- 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. |
FqnRequired
func Fqn() *string
- Type: *string
FriendlyUniqueIdRequired
func FriendlyUniqueId() *string
- Type: *string
TerraformResourceTypeRequired
func TerraformResourceType() *string
- Type: *string
CountOptional
func Count() interface{}
- Type: interface{}
DependsOnOptional
func DependsOn() *[]*string
- Type: _[]_string
ForEachOptional
func ForEach() ITerraformIterator
- Type: ITerraformIterator
LifecycleOptional
func Lifecycle() TerraformResourceLifecycle
ProviderOptional
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.
tRequired
- 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.
lRequired
- Type: _[]_string
contextRequired
- Type: IResolveContext
ResolveMap
func ResolveMap(m *map[string]interface{}, context IResolveContext) interface{}
Resolve a tokenized map.
mRequired
- Type: *map[string]interface{}
contextRequired
- Type: IResolveContext
ResolveNumberList
func ResolveNumberList(l *[]*f64, context IResolveContext) interface{}
Resolve a tokenized number list.
lRequired
- Type: _[]_f64
contextRequired
- Type: IResolveContext
ResolveString
func ResolveString(s TokenizedStringFragments, context IResolveContext) interface{}
Resolve a string with at least one stringified token in it.
(May use concatenation)
sRequired
- Type: TokenizedStringFragments
contextRequired
- Type: IResolveContext
ResolveToken
func ResolveToken(t IResolvable, context IResolveContext, postProcessor IPostProcessor) interface{}
Resolve a single token.
tRequired
- Type: IResolvable
contextRequired
- Type: IResolveContext
postProcessorRequired
- Type: IPostProcessor