Parameters in c4

This section describes how configuration parameters are structured and defined in c4. For an explanation of how to set the specific c4 parameters for an AWS deployment, see Configure c4 for AWS.

Parameter Structure

The c4 deployment tool has a large number of configurable parameters. Most of these parameters do not need to be modified for everyday usage and can be left at their default values. The default values can be overridden persistently using local configuration files, and/or specifically for each deployment by including parameters on the command line when creating the deployment.

The parameters are organized into modules that describe what they modify or in what context they are used. Some common modules are AWS, PLAY, and USER. Parameter names are always upper case and start with CCC_<MODULE>_. For example:

Parameter Description
CCC_USER_EMAIL Email address to be used for deployment tagging
CCC_PLAY_ACCESS_NODE Boolean for including an access node in the deployment. If this option is unset or set to false an access node will not be deployed and the REST API cannot be used to manage the instance.
CCC_AWS_REGION AWS region where deployments must be done by default

To learn more about the available parameter options, use c4 config --help-on <module>:all.

Parameter Types

Each parameter has a defined type that it accepts for the value. This type is automatically validated when a parameter value is changed. The available types are:

Type Format
string Text or numbers. If the string contains spaces, it should be enclosed in quotation marks.
int Number (integer)
bool true or false
list

A list of strings.

List values in environment variables must be specified as space-separated strings with quotes for values with spaces. For example CCC_MODULE_PARAM='A "B C"'.

List values in the CLI must be specified by repeating the parameter name for each element. For example --param=A --param='B C' or --param={a,"B C"}

Parameter Formats

Configuration parameters can be specified in a configuration file using shell, JSON, or YAML format, as environment parameters, or as command-line options. Parameter names must be formatted differently depending on where they are specified:

Location Format
Shell config file Use full parameter name in UPPER CASE
JSON config file Exclude CCC_<MODULE> prefix, use lower case
YAML config file Exclude CCC_<MODULE> prefix, use lower case
Environment Use full parameter name in UPPER CASE
Command-line option (absolute)

Replace _ (underscore) with - (dash), use lower case

Command-line option (relative) Exclude CCC_<MODULE> prefix, replace _ (underscore) with - (dash), use lower case

For example:

Location Parameter name
Shell config file CCC_AWS_REGION
JSON config file region in the aws subsection
YAML config file region in the aws subsection
Environment CCC_AWS_REGION
Command-line option (absolute) --ccc-aws-region
Command-line option (relative) --region after the aws module

The difference between absolute and relative options is where in the command the parameter is specified. For example, to specify the AWS region with the relative option, the parameter --region must be written after aws in the c4 command. The absolute parameter --ccc-aws-region can be specified anywhere in the command. See the following examples showing the difference in the usage:

Relative parameter

c4 aws --region eu-central-1 play -n 2 -T @exasol-8.8.0

Absolute parameter

c4 aws play --ccc-aws-region eu-central-1 -n 2 -T @exasol-8.8.0 

How To Set Parameters

The following list describes where and how c4 parameters can be specified. The list is ordered from general to specific, meaning that parameters specified in locations at the top of the list will be overridden by values specified further down. For example, a command-line parameter value will always override the value specified in the user configuration file for the same parameter.