Rules
  • 18 Jul 2020
  • 2 Minutes to read
  • Dark
    Light
  • PDF

Rules

  • Dark
    Light
  • PDF

Article Summary

Rules

Rules are used to auto-assign the unmapped resources to the required scope, environment and logical resource.

  1. User can add, delete and apply rules by using the buttons provided at the top
  2. The created rules can also be edited at anytime
    Rule

Resource Map level rules

These rules will be used to assign the unmapped resources to the required scope, environment and logical resource. Default rules will be available to assign the resource to the required scope, environment and logical resource respectively with default tag names.

doc-resource-rules

Scope level rules

These rules can be used to assign the unmapped resources in the scope to the required environment and logical resource. The scope rules come in to play if you use tag names other than the tags defined in the rules of Resources section of Resource Map.
docs-rules-in-scope

How to use rules?

Follow the below steps to use the Resource map rules

  1. Create the required tags for the resource in the Azure Portal. For example, I have a logic app named BAM Staging with the three tags.

    Scope Path - This tag is used to assign the resource to the required scope. The scope path can be copied from the summary section of Scopes
    doc-copy-scope-path

    Environment - This tag is used to assign the resource to the required environment
    Logical resource - This tag is used to assign the resource to the required logical resource

    docs-tags-in-Azure

  2. Edit the tag names in Resource map rules with the tags you use in the azure resources
    doc-edit-scope-tag

  3. Click on the Apply Rules button
    docs-apply-rules

  4. Now you can see the resources mapped to the required Environment, logical resource and scope.
    doc-final-assigned-resources

Advanced Rules

If the need is to create the Rules with Resource group name, Resource Type and Name of the resource along with Tag Name, user can go for Advanced filtering. The following operators can be used for comparison.

  • Equal to(=)
  • Not Equal to(!=)
  • Like(like)

You can also use the following logical operators to combine multiple conditions

  • AND
  • OR

Advanced rules

Following are some of the examples for creating Advanced rules

Searching for an exact match

ResourceGroup = "Development"

Searching for a partial match

Name like "%dev%"

Searching using combinations

Name like "%dev%" and ResourceGroup = "Development"

Searching using tags

scope like "%dev%"

Here a tag with key scope must be present in the resource

The resources matching the rule will be mapped to the selected scope.

This advanced rules can also be created to map the resources to the required Environment and Logical resource.

Note
  • The rules will be applied when the resources are synced manually and during auto-sync.
  • The rules can also be applied manually by clicking the Apply rules button.
  • When a matching logical resource in an environment is not found, a new logical resource will be created.
  • If a resource has more than one matching tags, the resource will not be auto-assigned.
  • Since the rule application is done in the background, it may take up to two minutes to reflect the resource mappings in the Serverless360 portal.
We'd love to hear your thoughts
Please visit our feedback system to suggest new Features or Enhancements. You can also take a look at our Roadmap

Was this article helpful?

What's Next