@@ -46,8 +46,16 @@ commands:
4646
4747 # Using the `default: value` option will cause the value to variable to be
4848 # set if it is not provided by the user.
49+ - name : region
50+ help : Cloud region
51+ default : us-east-2
52+
53+ # Using the `allowed: [value1, value2]` option will halt the script's
54+ # execution with a friendly error message, unless the variable matches one
55+ # of the defined values.
4956 - name : environment
5057 help : One of development, production or test
58+ allowed : [development, production, testing]
5159 default : development
5260` ` ` `
5361
@@ -59,11 +67,6 @@ echo "# code for 'cli verify' goes here"
5967echo "# you can edit it freely and regenerate (it will not be overwritten)"
6068inspect_args
6169
62- echo "environment:"
63- echo "- API_KEY=${API_KEY:-}"
64- echo "- ENVIRONMENT=${ENVIRONMENT:-}"
65- echo "- MY_SECRET=${MY_SECRET:-}"
66-
6770````
6871
6972
@@ -133,8 +136,13 @@ Environment Variables:
133136 MY_SECRET (required)
134137 Your secret
135138
139+ REGION
140+ Cloud region
141+ Default: us-east-2
142+
136143 ENVIRONMENT
137144 One of development, production or test
145+ Allowed: development, production, testing
138146 Default: development
139147
140148
@@ -156,10 +164,12 @@ missing required environment variable: MY_SECRET
156164# code for 'cli verify' goes here
157165# you can edit it freely and regenerate (it will not be overwritten)
158166args: none
159- environment:
160- - API_KEY=
161- - ENVIRONMENT=development
162- - MY_SECRET=there is no spoon
167+
168+ environment variables:
169+ - $API_KEY =
170+ - $ENVIRONMENT = development
171+ - $MY_SECRET = there is no spoon
172+ - $REGION = us-east-2
163173
164174
165175````
@@ -171,10 +181,12 @@ environment:
171181# code for 'cli verify' goes here
172182# you can edit it freely and regenerate (it will not be overwritten)
173183args: none
174- environment:
175- - API_KEY=
176- - ENVIRONMENT=production
177- - MY_SECRET=safe-with-me
184+
185+ environment variables:
186+ - $API_KEY =
187+ - $ENVIRONMENT = production
188+ - $MY_SECRET = safe-with-me
189+ - $REGION = us-east-2
178190
179191
180192````
0 commit comments