The ServiceNOW plugin, up to the current release 2.1.1, is bundled with 3 pollers by default. The Worker Poll Apply Run periodically makes API calls to all existing workspaces that ServiceNOW is aware of with a current run, which has not been deleted, to perform the apply operation. This behavior may result in two distinct problems:
- The Terraform runs are expected to be applied by different workflow, therefore the poller may apply those runs prior to the expected workflow initiating the apply operation.
- The poller continues to make API calls to perform the apply operation regardless of the current status of the runs on the workspaces, including the runs that are in terminal states, such as applied, planned_and_finished, errored, etc. resulting in a large volume of unnecessary API calls relative to the number of workspaces and the poll interval.
- Existing ServiceNOW workflows that provide at least one mechanism to apply Terraform runs on the workspaces without the need of having the Worker Poll Apply Run.
- The cause depends on the workflows requirement where the Worker Poll Apply Run assists in the automatic apply process for the runs that are in a ready state, however, a customized workflow may not require this poller and find that the default behavior of the Worker Poll Apply Run.
Deactivate the Worker Poll Apply Run:
- Launch System Applications - Studio
- Choose Terraform application
- Navigate to Flow Designer menu
- Select Worker Poll Apply Run under the Flows menu
- Click on the Deactivate button and confirm
- Terraform apply operation is performed only according to the designed workflows.
- The volume of API calls is decreasing.