presets

Description

A preset groups together variable settings to make it easier for the blueprint author to declare allowed or best practice configurations. When a preset is declared, it can be set in each environment that the blueprint has been added to, which then sets the specified variables.

A preset is not required to set all of the variables. When a preset does not set a variable, the standard variable rules apply for that variable.

Examples

Two variables controlled by a preset. The blueprint author is declaring a preset named deployment with possible choices prod and staging. Depending on the environment setting for this preset, variables will be set to the specified values. If staging is set as the deployment preset, num_cores will use the default value because it has no preset value:

presets:
  deployment:
    prod:
      memory_gb: 16
      num_cores: 8
    staging:
      memory_gb: 4
variables:
  memory_gb:
    default: 8
    description: The amount of memory for this VM, in GB.
    preset: true
    type: integer
  num_cores:
    default: 2
    description: Number of CPU cores for this VM.
    max: 8
    min: 1
    preset: true
    type: integer

Last updated

Was this helpful?