Environments
Definition
Environments are defined inside the env property of the main.json file like this:
{
"$schema": "https://hulk.cyncly-platform.com/schemas/main.json",
"team": "your team identifier",
"project": "Your project name",
"envs": {
"name": "NAME OF THE ENVIRONMENT",
"rg": "NAME OF THE RESOURCE GROUP",
"subscription": "NAME OF THE AZURE SUBSCRIPTION",
"abbr": "ABBREVIATION OF THE ENVIRONMENT"
},
"resources": []
}
Requirements
- The environment name must be unique and part of the allowed environment names
- The resource group name must contain the name of the environment
- The abbreviation of the environment is picked between the allowed list per environment name
How it works
The {env} keyword is a reserved variable inside the schema that will be statically replaced when parsing your hulk files.
This value will be the value of the abbr field of the environment that matches the -e/--env flag.
This value can be used anywhere in your files where you need the value of the current environment (e.g App Settings, resource names, custom domains, etc).