CfnIncludeProps Struct
Construction properties of CfnInclude.
Example
const parentTemplate = new cfn_inc.CfnInclude(this, 'ParentStack', {
templateFile: 'path/to/my-parent-template.json',
loadNestedStacks: {
'ChildStack': {
templateFile: 'path/to/my-nested-template.json',
},
},
});
Properties
allowCyclicalReferencesoptionalbooleanallow_cyclical_referencesoptionalboolallowCyclicalReferencesoptionalBooleanAllowCyclicalReferencesoptionalboolAllowCyclicalReferencesoptional*bool#Default: will throw an error on detecting any cyclical references
This should only be set to true in the case of templates utilizing cloud transforms (e.g. SAM) that after processing the transform will no longer contain any circular references.
dehydratedResourcesoptionalstring[]dehydrated_resourcesoptionaltyping.List[str]dehydratedResourcesoptionalList<String>DehydratedResourcesoptionalstring[]DehydratedResourcesoptional*[]*string#Default: All resources are hydrated
This allows you to use CFN templates that rely on Intrinsic placement that cfn-include would otherwise reject, such as non-primitive values in resource update policies.
loadNestedStacksoptional{ [key: string]: CfnIncludeProps }load_nested_stacksoptionaltyping.Mapping[str, CfnIncludeProps]loadNestedStacksoptionalMap<String, CfnIncludeProps>LoadNestedStacksoptionalIDictionary<string, CfnIncludeProps>LoadNestedStacksoptional*map[string]CfnIncludeProps#Default: no nested stacks will be included
notes
If your template specifies a stack that isn't included here, it won't be created as a NestedStack resource, and it won't be accessible from the CfnInclude.getNestedStack method (but will still be accessible from the CfnInclude.getResource method).
If you include a stack here with an ID that isn't in the template, or is in the template but is not a nested stack, template creation will fail and an error will be thrown.
parametersoptional{ [key: string]: any }parametersoptionaltyping.Mapping[str, Any]parametersoptionalMap<String, Object>ParametersoptionalIDictionary<string, object>Parametersoptional*map[string]interface{}#Default: parameters will retain their original definitions
notes
Any parameters in the template that aren't specified here will be left unmodified. If you include a parameter here with an ID that isn't in the template, template creation will fail and an error will be thrown.
If you are importing a parameter from a live stack, we cannot know the value of that parameter. You will need to supply a value for your parameters, else the default value will be used.
preserveLogicalIdsoptionalbooleanpreserve_logical_idsoptionalboolpreserveLogicalIdsoptionalBooleanPreserveLogicalIdsoptionalboolPreserveLogicalIdsoptional*bool= true#notes
If you're vending a Construct using an existing CloudFormation template, make sure to pass this as false.
Note: regardless of whether this option is true or false, the CfnInclude.getResource and related methods always uses the original logical ID of the resource/element, as specified in the template file.
Both JSON and YAML template formats are supported.