Variable

JustDeploy relies on a few settings to control the behaviour and preferences. The following is an example JSON file.

Variable

Attribute Type Mandatory Values Default Notes
KeyName String No Key value pairs to define variables and their values
KeyValue String No

The following examples show a variable object in YAML containing some common variables used:

---
Variable:
  Region1: westeurope           # Used for primary location
  Region1Short: -weu
  Region2: uksouth              # Used for secondary location
  Region1Short: -uks
  BusinessUnit: -corp
  ProjectName: -jd-sqls
  SubscriptionType: -test       # dev, test, prod, shared, client
  EnvType: -test

The following example shows a configuration in JSON:

{
  "Variable": {
    "Region1": "westeurope",
    "Region2": null,
    "BusinessUnit": "-corp",
    "Region1Short": "-weu",
    "ProjectName": "-jd-sqls",
    "SubscriptionType": "-test",
    "EnvType": "-test"
  }
}

The following is an example use of how to use a variable in a resource description. This is the YAML for a azResourceGroup example:

---
azResourceGroup:
  - Name: rg(var.ProjectName)(var.EnvType)
    ConnectionName: az-jd-test
    Location: (var.Region1)