Parameters key
Plans accept parameters in the parameters
key. The value of
parameters
is a map, where each key is the name of a parameter and the value
is a map describing the parameter.
Parameter values can be referenced from steps as variables.
Parameters use these fields, which are all optional:
type
: Specify a valid Puppet data type. The plan fails if the value supplied to the parameter does not match the defined type. If you do not specify a data type, this field defaults toAny
.default
: Specify a default value to use if no specific value is supplied to the parameter. This can be empty.description
: A description of the parameter. This can be empty.
For example, this plan accepts a load_balancer
name as a string, two sets
of nodes called frontends
and backends
, and a
version
string:
parameters: # A simple parameter definition doesn't need a type or description load_balancer: frontends: type: TargetSpec description: "The frontend web servers" backends: type: TargetSpec description: "The backend application servers" version: type: String description: "The new application version to deploy"