Skip to main content

Available variables

You can use variables in stack and stack group configuration files and stack template files. Each of them has a different set of variables available.

Stack group configuration files

Here are variables available in stack group configuration files:

KeyTypeDescription
envobjectEnvironment variables.
contextobjectAn object containing context variables.
context.projectDirstringCurrent project directory.
stackGroupobjectAn object representing the current stack group.
stackGroup.namestringName of the stack group.
stackGroup.pathstringPath of the stack group.
stackGroup.pathSegmentsstring[]Path of the stack group split into an array using / as a separator.
parentobjectAn object representing the parent stack group where the stack group belongs to.
parent.accountIdsstring[]Account ids of the parent stack group.
parent.capabilitiesstring[]Capabilities of the parent stack group.
parent.commandRolestringCommand role of the parent stack group.
parent.dataobjectData object of the parent stack group.
parent.isRootbooleanIs the parent stack group the root.
parent.namestringName of the parent stack group.
parent.pathstringPath of the parent stack group.
parent.pathSegmentsstring[]Path of the parent stack group split into an array using / as a separator.
parent.projectstringProject of the parent stack group.
parent.regionsstringRegions of the parent stack group.
parent.tagsobject[]Stack tags of the parent stack group.
parent.tags[].keystringTag key.
parent.tags[].valuestringTag value.
parent.templateBucketobjectTemplate bucket configuration of the parent stack group.
parent.templateBucket.namestringName of the template bucket.
parent.templateBucket.keyPrefixstringKey prefix of the template bucket.
parent.timeoutobjectTimeout configuration of the parent stack group.
parent.timeout.createnumberCreate timeout in seconds.
parent.timeout.updatenumberUpdate timeout in seconds.
varobjectVariables from the command line.

Stack configuration files

Here are variables available in stack configuration files:

KeyTypeDescription
contextobjectAn object containing context variables.
context.projectDirstringCurrent project directory.
envobjectEnvironment variables.
stackGroupobjectAn object representing the stack group where the stack belongs to.
stackGroup.accountIdsstring[]Account ids of the stack group.
stackGroup.capabilitiesstring[]Capabilities of the stack group.
stackGroup.commandRolestringCommand role of the stack group.
stackGroup.dataobjectData object of the stack group.
stackGroup.isRootbooleanIs the stack group the root.
stackGroup.namestringName of the stack group.
stackGroup.pathstringPath of the stack group.
stackGroup.pathSegmentsstring[]Path of the stack group split into an array using / as a separator.
stackGroup.projectstringProject of the stack group.
stackGroup.regionsstringRegions of the stack group.
stackGroup.tagsobject[]Stack tags of the stack group.
stackGroup.tags[].keystringTag key.
stackGroup.tags[].valuestringTag value.
stackGroup.templateBucketobjectTemplate bucket configuration of the stack group.
stackGroup.templateBucket.namestringName of the template bucket.
stackGroup.templateBucket.keyPrefixstringKey prefix of the template bucket.
stackGroup.timeoutobjectTimeout configuration of the stack group.
stackGroup.timeout.createnumberCreate timeout in seconds.
stackGroup.timeout.updatenumberUpdate timeout in seconds.
stackobjectAn object representing the stack.
stack.configFileobjectAn object representing configuration file of the stack.
stack.configFile.basenamestringName of the stack configuration file including the file extension
stack.configFile.dirPathstringFile path to the directory containing the stack configuration file relative to stack directory.
stack.configFile.filePathstringFile path of the stack configuration file relative to stack directory.
stack.configFile.namestringName of the stack configuration file without the file extension.
stack.pathstringPath of the stack without the region specified.
stack.pathSegmentsstring[]Path of the stack without the region specified split into an array using / as a separator.
varobjectVariables from the command line.

Stack template files

Here are variables available in stack template files:

KeyTypeDescription
contextobjectAn object containing context variables.
context.projectDirstringCurrent project directory.
envobjectEnvironment variables.
hooksobjectAn object containing values returned by hooks
stackobjectAn object representing the current stack
stack.accountIdsstring[]Account ids of the stack.
stack.commandRolestringCommand role of the stack.
stack.configFileobjectAn object representing configuration file of the stack.
stack.configFile.basenamestringName of the stack configuration file including the file extension
stack.configFile.dirPathstringFile path to the directory containing the stack configuration file relative to stack directory.
stack.configFile.filePathstringFile path of the stack configuration file relative to stack directory.
stack.configFile.namestringName of the stack configuration file without the file extension.
stack.dataobjectData object of the stack.
stack.dependsstring[]Dependencies of the stack.
stack.namestringName of the stack.
stack.pathstringPath of the stack.
stack.pathSegmentsstring[]Path of the stack split into an array using / as a separator.
stack.parametersobject[]Parameters of the stack
stack.parameters[].keystringParameters key
stack.parameters[].valuestringParameters value
stack.parametersMapobjectStack parameters in an object where each key is a parameter key and value is the corresponding parameter value.
stack.projectstringProject of the stack.
stack.regionstringRegion of the stack.
stack.tagsobject[]Stack tags of the stack.
stack.tags[].keystringTag key.
stack.tags[].valuestringTag value.
stack.templatestringTemplate of the stack.
stack.templateBucketobjectTemplate bucket configuration of the stack.
stack.templateBucket.namestringName of the template bucket.
stack.templateBucket.keyPrefixstringKey prefix of the template bucket.
stack.timeoutobjectTimeout configuration of the stack.
stack.timeout.createnumberCreate timeout in seconds.
stack.timeout.updatenumberUpdate timeout in seconds.
varobjectVariables from the command line.