Note: Please go to docs.rightscale.com to access the current RightScale documentation set. Also, feel free to Chat with us!
Home > FAQs > How do I include inputs in RightScripts?

How do I include inputs in RightScripts?

Table of Contents
Background Information

When writing the underlying code for a RightScript, you can enter input variables in all CAPS.

 


Answer

Depending on which language of the script, you must enter the input using the appropriate syntax.   Below are a few examples of how you would enter a variable named APPLICATION. 

For a ruby script use: ENV['APPLICATION']

For a bash script use: $APPLICATION

For a perl script use: $ENV{'APPLICATION'}

For a powershell(Windows) script use:$env:APPLICATION

Use the "OPT_" prefix for optional inputs that can be set to Ignore. e.g. OPT_FILENAME

 

Note: "EC2_" and "RS_" are reserved prefix variables specific to Amazon EC2 and RightScale.  Therefore, your variables cannot begin with "EC2_" or "RS_".  For example EC2_HOME will not be picked up as an Input variable.  However, EC2HOME will work.

You must to post a comment.
Last modified
21:25, 16 May 2013

Tags

Classifications

This page has no classifications.

Announcements

None


© 2006-2014 RightScale, Inc. All rights reserved.
RightScale is a registered trademark of RightScale, Inc. All other products and services may be trademarks or servicemarks of their respective owners.