Skip to main content

Actions and workflows

Resource and Workflows

Overview

Actions

Stopping cloud resources when they are not in use is a prudent practice that offers several benefits. First and foremost, it helps to optimize costs by preventing unnecessary expenditure on computing resources. Cloud services are typically billed on a pay-as-you-go model, so keeping instances running when they are idle contributes to higher expenses. Additionally, stopping unused resources promotes environmental sustainability by reducing overall energy consumption and the carbon footprint associated with data centers. From a security standpoint, inactive resources can be potential targets for unauthorized access or attacks, and shutting them down mitigates these risks. Moreover, resource termination enhances overall system performance by freeing up valuable computing resources for other critical tasks. In essence, the proactive management of cloud resources aligns with efficiency, cost-effectiveness, and environmental responsibility in the dynamic landscape of cloud computing.

Torque provides a built-in set of actions you can run on specific cloud resources in the environment to stop them and gain the aforementioned benefits. The built-in actions currently available out of the box by Torque are:

Virtual Machines

  • Power on
  • Power off
  • Restart
  • Connect - a special kind of action which creates an RDP or SSH connection to the VM directly from Torque, allowing environment users to access env vms directly.

Database Servers

  • Stop
  • Start

Kubernetes Clusters

  • Pause
  • Resume

Please see the below table for additional details.

Resource TypeAction NameCloudGrain technologyResource typeDescriptionLimitations
Virtual MachinesPower On VMAWSTerraformaws_instanceStart an EC2 instance
CloudFormationAWS::EC2::Instance
AzureTerraformazurerm_virtual_machineStart an Azure VM
Power Off VMAWSTerraformaws_instanceStop an EC2 instance
CloudFormationAWS::EC2::Instance
AzureCloudFormationazurerm_virtual_machineStop and Deallocate an Azure VM
Restart VMAWSTerraformaws_instanceRestart an EC2 instance
CloudformationAWS::EC2::Instance
AzureTerraformazurerm_virtual_machineRestart an Azure VM
Connect to a VMAWSTerraformaws_instancea special kind of action which creates an RDP or SSH connection to the VM directly from Torque, allowing environment users to access env vms directly.
AWSCloudformationAWS::EC2::Instance
AzureTerraformazurerm_virtual_machine
DatabasesStop RDS instanceAWSTerraformaws_db_instanceTemporarily stop an RDS instanceThe RDS will be restarted after 7 days if the action will not be repeated.
CloudFormationComing Soon
Start RDS instanceAWSTerraformaws_db_instanceStart a stopped RDS instance
CloudFormationComing Soon
Delete RDS instanceAWSTerraformaws_db_instanceDelete an RDS instance
Stop Database ServerAzureTerraformMySql - azurerm_mysql_server MySql Flexible - azurerm_mysql_flexible_server MariaDB - azurerm_mariadb_server Postgres flexible - azurerm_postgresql_flexible_serverTemporarily stop a DB serverThe DB server will be restarted after a period of time (dependent on the engine type) if the action will not be repeated.
Start Database ServerAzureTerraformMySql - azurerm_mysql_server MySql Flexible - azurerm_mysql_flexible_server MariaDB - azurerm_mariadb_server Postgres flexible - azurerm_postgresql_flexible_serverStart a stopped DB server
Delete databaseAzureTerraformazurerm_mysql_database azurerm_mariadb_database azurerm_postgresql_database azurerm_mssql_database azurerm_mysql_flexible_database azurerm_postgresql_flexible_server_databaseDelete a database
Kubernetes ClustersPauseAzure (AKS)Terraformazurerm_kubernetes_clusterReduce the number of agents (VMs) in all node pools in the cluster to 1
AWS (EKS)TerraformComing Soon
ResumeAzure (AKS)Terraformazurerm_kubernetes_clusterIncrease the number of agents (VMs) in all node pools in the cluster to the original number
AWS (EKS)TerraformComing Soon

Debugging Actions

If you need verbose output from the actions in order to debug them, you can add a parameter like so: SYSTEM_ACTIONS_VERBOSE_MODE=true (or false) in the account level.

Workflows

Workflows take actions another step forward. They are scheduled automations that run on all resources from the same type in the environment. Examples of workflows include:

  • Power-off all VMs in the environment every day at 6PM
  • Pause (scale to minimum) the dev K8s cluster every weekend
info

To learn how to create workflows in your Torque account, click here.

Invoke actions and workflows in the environment

  1. Switch to Resources view.

    Locale Dropdown

  2. Click a resource tile.

    The resource's actions as well as attributes and tags are displayed in the left pane.

  3. Hover over the relevant action and click Run.

    Locale Dropdown

  4. Click the action's name to see its progress.

  5. Click Workflows to see which workflows apply to your environment. Note that you can also manually run the workflows ahead of their scheduled run time.