Variables are substituted in all task configuration text fields (e.g. Stack Name, Template URL, Instance ID, Volume ID etc.).
Sensitive Data Masking
Tasks may emit sensitive data like credentials which are not supposed to surface in build logs - this can be achieved as follows:
- if the variable key contains the phrase
"password", the value will be masked with
"********"in the build logs; for example, if the key is
"awsSecretKeyPassword", the build log will show the substituted value as
Variables are defined by most tasks for reuse in subsequent tasks, see Bamboo Variable Substitution/Definition for details, and each task's documentation for example log outputs.
- A task's generated variables might get amended with respective AWS API additions over time - a live build log will always provide the most current variable shape accordingly.
- We are contemplating to evolve the current key/value based approach to one based on hierarchical JSON payloads, please watch/vote/comment on the following issue to guide our resp. roadmap:
- UAA-92Getting issue details... STATUS
This example illustrates the variable generation pattern:
- variables have a dedicated prefix like
*being a task specific prefix, e.g.
- variables referring to a collection of resources provide their ids in a semicolon separated list (i.e. the same format available on input), e.g.
i-a316b842;i-b4210842 (line 2)
you can refer to these variables from subsequent tasks via something like
(line 6)- however, given script access to such a named resource is difficult, there is a shortcut to ease reusing the first (and often only) affected resource via something like
variables are also available as environment variables in the Script task for example, albeit named slightly different, e.g.
variables are locally scoped and thus only reusable in subsequent tasks and not in other jobs/stages due to the implied concurrency, see the following discussion and workaround
Some tasks also support the substitution of custom variables to ease composing unique names when operating multiple AWS resources at once, for example creating EBS snapshots from a set of EBS volumes, or EC2 images from a set of EC2 instances - refer to Custom Variables for details.