AWS User Data Variables

This topic provides a list of variables supported in AWS user data. For general information on variables, see Add Data to Workflows With Variables.

If you need a variable that isn't documented, create a case through the Snow Support Portal, and if the variable is available, we'll provide you with the variable name. We'll also add it to the list of documented variables in the next release.

VariableExpressionDescription
Commander
Directorysystem.directoryDirectory where Commander is installed.
IP Addresssystem.addressThe IP address for the Commander server.
Portsystem.portThe port number used by Commander.
Infrastructure
Regiontarget.region.nameThe component's region.
Request
Request IDrequest.idThe unique identifier for the service request.
Requested Component
Chef Environmenttarget.settings.chef.environmentThe Chef environment set in the service catalog.
Chef Organizationtarget.settings.chef.organizationThe Chef organization set in the service catalog.
Chef Recipestarget.settings.chef.recipesA comma-separated list of Chef recipes. Includes the default values set in the service catalog and those specified by the user on the request form.
Chef Rolestarget.settings.chef.rolesA comma-separated list of Chef roles. Includes the default values set in the service catalog and those specified by the user on the request form.
Chef Run-Listtarget.settings.chef.runlistA comma-separated list of Chef roles and Chef recipes in the order specified in the Run-List. Includes the default values set in the service catalog and those specified by the user on the request form.
Component Nametarget.settings.componentNameThe name for the VM as specified by the user on the request form.
CPUstarget.settings.cpuCountThe number of CPUs, if changed.

For change requests, a value of -1 indicates that the value is the same as set on the source service.

Dynamic Listtarget.settings.dynamicList['*']The value of the specified dynamic list from the request. Replace * with the name of the dynamic list.
Input Fieldtarget.settings.inputField['*']The value of the specified input text field from the request. Replace * with the name of the input text field.
Instance Type Remote IDtarget.settings.instanceType.remoteIdThe instance type ID (for example, t1.micro, m3.2xlarge).
Key Pairtarget.settings.keyPair.nameThe name of the requested key pair.
Memorytarget.settings.memory.gbMemory of the VM, if changed, in gigabytes.

For change requests, a value of -1 indicates that the value is the same as that set in the service catalog (or on the source template, for legacy component forms).

Network Adapterstarget.settings.nicCountThe number of network adapters requested.
Puppet Classestarget.settings.puppet.classesA comma-separated list of Puppet classes. Includes the default values set in the service catalog and those specified by the user on the request form.
Puppet Environmenttarget.settings.puppet.environmentThe Puppet environment set in the service catalog.
Puppet Groupstarget.settings.puppet.groupsA comma-separated list of Puppet groups. Includes the default values set in the service catalog and those specified by the user on the request form.
Total Storagetarget.settings.storage.gbFor new requests, the total of all storage, in GB.

For change requests, this value represents existing storage plus any changes.

Uploaded Filetarget.settings.uploadedFile['*']The name(s) of the specified uploaded file(s) from the request. Replace * with the display label of the File Upload control.
Uploaded File Contenttarget.settings.uploadedFile['*'].file[x].contentThe content of the file for an File Upload control in the request. Replace * with the name of the File Upload control. Replace [x] with a number starting with [1]; for example, [2] represents the second file in the File Upload control.
Uploaded File Nametarget.settings.uploadedFile['*'].file[x].fileNameThe filename for an File Upload control in the request. Replace * with the name of the File Upload control. Replace [x] with a number starting with [1]; for example, [2] represents the second file in the File Upload control.
Requested Component Custom Attributes
Custom Attributetarget.settings.customAttribute['*']The value of the specified custom attribute from the request.
Requester
Organization Namerequest.requester.organization.nameThe organization of the user requesting the VM.
Requester UserIdrequest.requester.userIdThe user ID of the requesting user.
Target
Deployed Nametarget.deployedNameThe deployed name of the component.