ivkcs_agent_exec Resource
The arguments of the ivkcs_agent_exec resource are given in table 1.
Name | Description | Format | Required |
|---|---|---|---|
| Service deployment identifier | string | |
| Common name for the scripts described in the | string | |
| List of hostnames where the script will be executed | list, list elements — string | |
| Describes the scripts that will be run by the agents on the hosts. Defines the order of script execution | list, the structure of a single element is given in the table below |
The arguments of a single step element are given in table 2.
Name | Description | Format | Required | Resource recreation upon value change |
|---|---|---|---|---|
| Script index that determines the execution order | integer | ||
| Script language. Possible values:
| string | ||
| Script execution parameters | set, list arguments — in table 3 | ||
| Script body | string |
The options arguments for describing script options are given in table 3.
Name | Description | Format | Default value |
|---|---|---|---|
| List of environment variables additional to the system environment variables | list, list elements — string in the format | — |
| Expected script exit codes. If an exit code indicating successful script execution is received, the script is assigned the If an exit code indicating script termination with an error is received, the script will be run again. If, as a result of all retry attempts, the script terminates with an error, the script status is The retry parameters are set in the options:
| list, list elements — integer |
Code Code |
| Script exit codes for which the script will not be run again | list, list elements — integer |
|
| Signal sent to the script if its execution timeout is exceeded — The timeout is set in the | integer |
|
| Timeout counted from the moment the Example values:
| string |
|
| Directory for script execution | string |
|
| User on whose behalf the script will be run. | string |
|
| User group on whose behalf the script will be run. | string |
|
| Script execution timeout. If the script does not complete within the timeout, the The value is set in the same format as the | string |
|
| Number of attempts to rerun the script if exit codes indicating script termination with an error are received (set in the | integer |
|
| Duration of the pause between script reruns. The value is set in the same format as the | string |
|
| Duration of the pause before the script is started. The value is set in the same format as the | string |
|
| Duration of the pause after the script completes. The value is set in the same format as the | string |
|
| Whether to save the script execution result to the host disk | boolean | true |
| Path to the file with the formatted script result | string | — |
| Determines whether the script will be executed only once or at every redeployment of the service. If set to | boolean |
|
For each script described in step, the ivkcs_agent_exec resource returns the hash attribute (string format), which contains the script hash to be passed to the configuration management service. Using the received values, the configuration management service compares the current and target (described in the Terraform manifest) state of the hosts.