We plan on using environment variables with IQService before/after scripts to selectively control the state of certain operations. For example, we can easily control with certain mailbox provisioning features are enabled.
However, this doesn’t apply to cloud rules. If had a rule for example that performed a move or rename under a certain condition, is there a pattern we can use to control whether that rule is enabled?
Does the rule environment have access to a user defined configuration store? One suggestion was to create a source with a simple key-value set of attributes, but I thought I would explore whether another option exists.
Remove the rule from all source configurations that reference it
This is effectively the same as disabling the rule
To enable or disable a code snippet within a cloud rule:(you already put this in your question)
Use source attributes to control whether certain code paths execute
In the rule, read the source attribute value and use it to execute code blocks conditionally
For managing global configuration used across your tenant across all sources to avoid configuring the same thing on each source:
Use an IdentityNow source as a centralized property store - I have written a blog on how to use a source as a property store and find code snippets to read property value by passing key in cloud rule. Refer the 2nd one in this blog