Terraform
Typescript: Protocols
IAnyProducer
- Implemented By: IAnyProducer
Interface for lazy untyped value producers.
Methods
| Name | Description |
|---|---|
produce | Produce the value. |
produce
public produce(context: IResolveContext): any
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
public visit(node: IConstruct): void
All aspects can visit an IConstruct.
nodeRequired
- Type: constructs.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
public join(left: any, right: any): any
Join the fragment on the left and on the right.
leftRequired
- Type: any
rightRequired
- Type: any
IImportableConfig
- Implemented By: IImportableConfig
Properties
| Name | Type | Description |
|---|---|---|
importId | string | No description. |
terraformResourceType | string | No description. |
provider | TerraformProvider | No description. |
importIdRequired
public readonly importId: string;
- Type: string
terraformResourceTypeRequired
public readonly terraformResourceType: string;
- Type: string
providerOptional
public readonly 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
public 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
public produce(context: IResolveContext): string[]
Produce the list value.
contextRequired
- Type: IResolveContext
IManifest
Properties
| Name | Type | Description |
|---|---|---|
stacks | {[ key: string ]: StackManifest} | No description. |
version | string | No description. |
stacksRequired
public readonly stacks: {[ key: string ]: StackManifest};
- Type: {[ key: string ]: StackManifest}
versionRequired
public readonly version: string;
- Type: string
INumberProducer
- Implemented By: INumberProducer
Interface for lazy number producers.
Methods
| Name | Description |
|---|---|
produce | Produce the number value. |
produce
public produce(context: IResolveContext): number
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
public postProcess(input: any, context: IResolveContext): any
Process the completely resolved value, after full recursion/resolution has happened.
inputRequired
- Type: any
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
public resolve(context: IResolveContext): any
Produce the Token's value at resolution time.
contextRequired
- Type: IResolveContext
toString
public 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
public readonly 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
public registerPostProcessor(postProcessor: IPostProcessor): void
Use this postprocessor after the entire token structure has been resolved.
postProcessorRequired
- Type: IPostProcessor
resolve
public resolve(x: any): any
Resolve an inner object.
xRequired
- Type: any
Properties
| Name | Type | Description |
|---|---|---|
preparing | boolean | True when we are still preparing, false if we're rendering the final output. |
scope | constructs.IConstruct | The scope from which resolution has been initiated. |
ignoreEscapes | boolean | 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 | boolean | True when ${} should be ommitted (because already inside them), false otherwise. |
warnEscapes | boolean | True when ${} should not be included in the string to be resolved, outputs a warning. |
preparingRequired
public readonly preparing: boolean;
- Type: boolean
True when we are still preparing, false if we're rendering the final output.
scopeRequired
public readonly scope: IConstruct;
- Type: constructs.IConstruct
The scope from which resolution has been initiated.
ignoreEscapesOptional
public readonly ignoreEscapes: boolean;
- Type: boolean
True when ${} should not be parsed, and treated as literals.
iteratorContextOptional
public readonly 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
public readonly suppressBraces: boolean;
- Type: boolean
True when ${} should be ommitted (because already inside them), false otherwise.
warnEscapesOptional
public readonly warnEscapes: boolean;
- Type: boolean
True when ${} should not be included in the string to be resolved, outputs a warning.
Default: false
IResource
Properties
| Name | Type | Description |
|---|---|---|
node | constructs.Node | The tree node. |
stack | TerraformStack | The stack in which this resource is defined. |
nodeRequired
public readonly node: Node;
- Type: constructs.Node
The tree node.
stackRequired
public readonly 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
public synthesize(session: ISynthesisSession): void
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
public 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 | boolean | No description. |
manifestRequired
public readonly manifest: Manifest;
- Type: Manifest
outdirRequired
public readonly outdir: string;
- Type: string
The output directory for this synthesis session.
skipValidationOptional
public readonly skipValidation: boolean;
- Type: boolean
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
public readonly fqn: string;
- Type: string
ITerraformDependable
Extends: ITerraformAddressable
Implemented By: DataResource, TerraformDataSource, TerraformHclModule, TerraformModule, TerraformResource, ITerraformDependable
Properties
| Name | Type | Description |
|---|---|---|
fqn | string | No description. |
fqnRequired
public readonly 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
public interpolationForAttribute(terraformAttribute: string): IResolvable
terraformAttributeRequired
- Type: string
Properties
| Name | Type | Description |
|---|---|---|
fqn | string | No description. |
friendlyUniqueId | string | No description. |
terraformResourceType | string | No description. |
count | number | TerraformCount | No description. |
dependsOn | string[] | No description. |
forEach | ITerraformIterator | No description. |
lifecycle | TerraformResourceLifecycle | No description. |
provider | TerraformProvider | No description. |
fqnRequired
public readonly fqn: string;
- Type: string
friendlyUniqueIdRequired
public readonly friendlyUniqueId: string;
- Type: string
terraformResourceTypeRequired
public readonly terraformResourceType: string;
- Type: string
countOptional
public readonly count: number | TerraformCount;
- Type: number | TerraformCount
dependsOnOptional
public readonly dependsOn: string[];
- Type: string[]
forEachOptional
public readonly forEach: ITerraformIterator;
- Type: ITerraformIterator
lifecycleOptional
public readonly lifecycle: TerraformResourceLifecycle;
providerOptional
public readonly 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
public mapToken(t: IResolvable): any
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
public resolveList(l: string[], context: IResolveContext): any
Resolve a tokenized list.
lRequired
- Type: string[]
contextRequired
- Type: IResolveContext
resolveMap
public resolveMap(m: {[ key: string ]: any}, context: IResolveContext): any
Resolve a tokenized map.
mRequired
- Type: {[ key: string ]: any}
contextRequired
- Type: IResolveContext
resolveNumberList
public resolveNumberList(l: number[], context: IResolveContext): any
Resolve a tokenized number list.
lRequired
- Type: number[]
contextRequired
- Type: IResolveContext
resolveString
public resolveString(s: TokenizedStringFragments, context: IResolveContext): any
Resolve a string with at least one stringified token in it.
(May use concatenation)
sRequired
- Type: TokenizedStringFragments
contextRequired
- Type: IResolveContext
resolveToken
public resolveToken(t: IResolvable, context: IResolveContext, postProcessor: IPostProcessor): any
Resolve a single token.
tRequired
- Type: IResolvable
contextRequired
- Type: IResolveContext
postProcessorRequired
- Type: IPostProcessor