Skip to content

Commit

Permalink
Merge pull request #75 from outime/74-senza-information-about-paramet…
Browse files Browse the repository at this point in the history
…er-properties

#74 Information about Parameter Properties
  • Loading branch information
hjacobs committed May 11, 2016
2 parents 50bdca4 + 7837132 commit fe6389c
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions components/senza.rst
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,8 @@ Available properties for the ``SenzaInfo`` section are:
- GreetingText:
Description: "The greeting to be displayed"
Default: "Hello, world!"
MinLength: "1"
MaxLength: "16"
# a list of senza components to apply to the definition
SenzaComponents:
# this basic configuration is required for the other components
Expand Down Expand Up @@ -248,6 +250,21 @@ to follow the named ones.
pass this parameter with the name, to prevent ``senza`` from treating the
part of the parameter value before the first ``=`` as the parameter name.

It is possible to pass any of the supported `CloudFormation Properties <http://
docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/
parameters-section-structure.html>`_ such as ``AllowedPattern``, ``AllowedValues``,
``MinLength``, ``MaxLength`` and many others. Senza itself will not enforce these
but CloudFormation will evaluate the generated template and raise an exception
if any of the Properties is not met. For example:

.. code-block:: bash
$ senza create example.yaml 3 example latest mint-bucket "Way too long greeting"
Generating Cloud Formation template.. OK
Creating Cloud Formation stack hello-world-3.. EXCEPTION OCCURRED: An error occurred (ValidationError) when calling the CreateStack operation: Parameter 'GreetingText' must contain at most 15 characters
Traceback (most recent call last):
[...]
Any parameter may be given a default value using ``Default`` attribute.
If a parameter was not specified on the command line (either as positional or
named one), the default value is used. It makes sense to always put all
Expand Down

0 comments on commit fe6389c

Please sign in to comment.