Table of Contents

Resource Node

Totalcloud Updated by Totalcloud

What is a Resource Node?

Resource node picks a set of resources belonging to a particular AWS service (EC2, IAM role, RDS, ECS, Autoscaling, AppSync, etc.) launched in a specific AWS Region. It is generally the second node in the workflow.

Working with Resource Node

To add a Resource node in a workflow, follow the steps below:

  1. Go to the workflow editor, after starting a new workflow or picking a new template.
  2. If you start a new workflow:
    1. Click on the plus symbol
    1. Select 'Resource' from the options below
    1. Click on 'Edit' to access the parameters input window
  3. If you pick an existing template:
    1. Click the resource node then click on edit form the options that drop down, to access the parameters input window.
  4. Select appropriate inputs in each drop-down menu to define your requirement

Example:

Here's an example of a Resource node that helps you pick your AWS CloudWatch Alarms.

  1. Click on 'Save' to save the changes.
If you want to delete this node, click on the 'Delete' option that you get on clicking the node.

What happens in Resource Node?

In a workflow, resource node is usually added after the Trigger node. It looks for parameter definitions set by you. The output of this node is a JSON file that has resources and their attributes, which is same as the data returned by AWS APIs. This data then becomes input to the next connecting node. Click here to view the Sample Output of this node.

Advanced Filters

Use Advanced Filters to pass additional parameters to filter the resources further. This would effectively modify the way the Resource node fetches resources and passes more filtered values to the next node. This provides added flexibility to what is already available in TotalCloud Workflow nodes.

Example: When you select EC2 Instances of a particular region in the Resource node, the workflow will fetch all the instances in the region. If you have hundreds of instances in this region, instead of fetching all of them, you might want to specifically work with only 2 or 3 instances. In such cases, you can leverage this additional feature to mention the instances in this field to fetch only these instances.

{ /*---------- optional params ----------*/

/*
* (Use keyword MAP in place of value if want to
* auto fill any value from previous data)
*/


"InstanceIds": [
"i-058b043d3b00fx483",
"i-0cf6fc1d256056c13"
]
}

Click here to know how to work with Advanced Filters in Resource node.

Add-ons

Add-ons allow you to enrich the resources data with additional qualities. This enriched data can be used in further nodes, like Filter nodes, to selectively retain the resources required.

Example: Say, we fetch EC2 instances' data in the Resource node. This data has attributes of instances alone. If we want to filter instance that have open port of 22, we must know Security Groups associated with each instance. So for the EC2 instance resources, Security Groups becomes a Add-on. Similarly, Volumes can be Add-ons to instances and Bucket's policies can be Add-ons to S3 Buckets.

The attributes of Add-ons are same as returned by the corresponding AWS API. For example: The data of describeSecurityGroups is available as output in addOns. Securitygroups when you select EC2 instances as resource and Security Groups as Add-ons in the Resource node.

Click here to know how to work with Add-ons and referencing them in Filter node.

Usage Examples

For your convenience, we have populated several usage examples of how to use this node and how to set their parameters. Check out some usage examples here.

How did we do?

Advanced Filters in the Resource Node

Contact