Terraform
CSharp: Protocols
IAnyProducer
- Implemented By: IAnyProducer
Interface for lazy untyped value producers.
Methods
Name | Description |
---|---|
Produce | Produce the value. |
Produce
private object Produce(IResolveContext Context)
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
private void Visit(IConstruct Node)
All aspects can visit an IConstruct.
Node
Required
- 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
private object Join(object Left, object Right)
Join the fragment on the left and on the right.
Left
Required
- Type: object
Right
Required
- Type: object
IImportableConfig
- Implemented By: IImportableConfig
Properties
Name | Type | Description |
---|---|---|
ImportId | string | No description. |
TerraformResourceType | string | No description. |
Provider | TerraformProvider | No description. |
ImportId
Required
public string ImportId { get; set; }
- Type: string
TerraformResourceType
Required
public string TerraformResourceType { get; set; }
- Type: string
Provider
Optional
public TerraformProvider Provider { get; set; }
- Type: TerraformProvider
IInterpolatingParent
- Implemented By: AnyMapList, BooleanMapList, ComplexComputedList, ComplexObject, DataResource, MapList, NumberMapList, StringMapList, TerraformDataSource, TerraformResource, IInterpolatingParent
Methods
Name | Description |
---|---|
InterpolationForAttribute | No description. |
InterpolationForAttribute
private IResolvable InterpolationForAttribute(string TerraformAttribute)
TerraformAttribute
Required
- Type: string
IListProducer
- Implemented By: IListProducer
Interface for lazy list producers.
Methods
Name | Description |
---|---|
Produce | Produce the list value. |
Produce
private string[] Produce(IResolveContext Context)
Produce the list value.
Context
Required
- Type: IResolveContext
IManifest
Properties
Name | Type | Description |
---|---|---|
Stacks | System.Collections.Generic.IDictionary< string, StackManifest> | No description. |
Version | string | No description. |
Stacks
Required
public System.Collections.Generic.IDictionary< string, StackManifest > Stacks { get; }
- Type: System.Collections.Generic.IDictionary< string, StackManifest>
Version
Required
public string Version { get; }
- Type: string
INumberProducer
- Implemented By: INumberProducer
Interface for lazy number producers.
Methods
Name | Description |
---|---|
Produce | Produce the number value. |
Produce
private double Produce(IResolveContext Context)
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
private object PostProcess(object Input, IResolveContext Context)
Process the completely resolved value, after full recursion/resolution has happened.
Input
Required
- Type: object
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
private object Resolve(IResolveContext Context)
Produce the Token's value at resolution time.
Context
Required
- Type: IResolveContext
ToString
private string ToString()
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
public string[] CreationStack { get; }
- 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
private void RegisterPostProcessor(IPostProcessor PostProcessor)
Use this postprocessor after the entire token structure has been resolved.
PostProcessor
Required
- Type: IPostProcessor
Resolve
private object Resolve(object X)
Resolve an inner object.
X
Required
- Type: object
Properties
Name | Type | Description |
---|---|---|
Preparing | bool | 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 | 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
public bool Preparing { get; }
- Type: bool
True when we are still preparing, false if we're rendering the final output.
Scope
Required
public IConstruct Scope { get; }
- Type: Constructs.IConstruct
The scope from which resolution has been initiated.
IgnoreEscapes
Optional
public bool IgnoreEscapes { get; set; }
- Type: bool
True when ${} should not be parsed, and treated as literals.
IteratorContext
Optional
public string IteratorContext { get; set; }
- 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
public bool SuppressBraces { get; set; }
- Type: bool
True when ${} should be ommitted (because already inside them), false otherwise.
WarnEscapes
Optional
public bool WarnEscapes { get; set; }
- 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 | Constructs.Node | The tree node. |
Stack | TerraformStack | The stack in which this resource is defined. |
Node
Required
public Node Node { get; }
- Type: Constructs.Node
The tree node.
Stack
Required
public TerraformStack Stack { get; }
- 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
private void Synthesize(ISynthesisSession Session)
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
private string Produce(IResolveContext Context)
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
public Manifest Manifest { get; }
- Type: Manifest
Outdir
Required
public string Outdir { get; }
- Type: string
The output directory for this synthesis session.
SkipValidation
Optional
public bool SkipValidation { get; }
- 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
public string Fqn { get; }
- Type: string
ITerraformDependable
Extends: ITerraformAddressable
Implemented By: DataResource, TerraformDataSource, TerraformHclModule, TerraformModule, TerraformResource, ITerraformDependable
Properties
Name | Type | Description |
---|---|---|
Fqn | string | No description. |
Fqn
Required
public string Fqn { get; }
- 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
private IResolvable InterpolationForAttribute(string TerraformAttribute)
TerraformAttribute
Required
- Type: string
Properties
Name | Type | Description |
---|---|---|
Fqn | string | No description. |
FriendlyUniqueId | string | No description. |
TerraformResourceType | string | No description. |
Count | object | No description. |
DependsOn | string[] | No description. |
ForEach | ITerraformIterator | No description. |
Lifecycle | TerraformResourceLifecycle | No description. |
Provider | TerraformProvider | No description. |
Fqn
Required
public string Fqn { get; }
- Type: string
FriendlyUniqueId
Required
public string FriendlyUniqueId { get; }
- Type: string
TerraformResourceType
Required
public string TerraformResourceType { get; }
- Type: string
Count
Optional
public object Count { get; set; }
- Type: object
DependsOn
Optional
public string[] DependsOn { get; set; }
- Type: string[]
ForEach
Optional
public ITerraformIterator ForEach { get; set; }
- Type: ITerraformIterator
Lifecycle
Optional
public TerraformResourceLifecycle Lifecycle { get; set; }
Provider
Optional
public TerraformProvider Provider { get; set; }
- 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
private object MapToken(IResolvable T)
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
private object ResolveList(string[] L, IResolveContext Context)
Resolve a tokenized list.
L
Required
- Type: string[]
Context
Required
- Type: IResolveContext
ResolveMap
private object ResolveMap(System.Collections.Generic.IDictionary< string, object > M, IResolveContext Context)
Resolve a tokenized map.
M
Required
- Type: System.Collections.Generic.IDictionary< string, object >
Context
Required
- Type: IResolveContext
ResolveNumberList
private object ResolveNumberList(double[] L, IResolveContext Context)
Resolve a tokenized number list.
L
Required
- Type: double[]
Context
Required
- Type: IResolveContext
ResolveString
private object ResolveString(TokenizedStringFragments S, IResolveContext Context)
Resolve a string with at least one stringified token in it.
(May use concatenation)
S
Required
- Type: TokenizedStringFragments
Context
Required
- Type: IResolveContext
ResolveToken
private object ResolveToken(IResolvable T, IResolveContext Context, IPostProcessor PostProcessor)
Resolve a single token.
T
Required
- Type: IResolvable
Context
Required
- Type: IResolveContext
PostProcessor
Required
- Type: IPostProcessor