ROS Features Support
InfraGuard supports a wide range of ROS (Resource Orchestration Service) template features for static analysis and validation of your infrastructure code.
Functions
InfraGuard supports the following ROS functions:
String Functions
Fn::Join- Joins strings with a delimiterFn::Sub- Substitutes variables in a stringFn::Split- Splits a string into a listFn::Replace- Replaces strings in textFn::Str- Converts values to stringsFn::Indent- Indents text
Encoding Functions
Fn::Base64Encode- Encodes to Base64Fn::Base64Decode- Decodes from Base64
List Functions
Fn::Select- Selects an element from a listFn::Index- Finds the index of an elementFn::Length- Returns the length of a list or stringFn::ListMerge- Merges multiple lists
Map Functions
Fn::FindInMap- Retrieves values from a mappingFn::SelectMapList- Selects values from a list of mapsFn::MergeMapToList- Merges maps into a list
Mathematical Functions
Fn::Add- Adds numbersFn::Avg- Calculates averageFn::Max- Returns maximum valueFn::Min- Returns minimum valueFn::Calculate- Evaluates mathematical expressions
Conditional Functions
Fn::If- Returns values based on conditionsFn::Equals- Compares two valuesFn::And- Logical ANDFn::Or- Logical ORFn::Not- Logical NOTFn::Contains- Checks if a value is in a listFn::Any- Checks if any condition is trueFn::EachMemberIn- Checks if all elements are in another listFn::MatchPattern- Matches against a pattern
Utility Functions
Fn::GetJsonValue- Extracts values from JSONRef- References parameters and resources
Conditions
InfraGuard fully supports the ROS Conditions feature, including:
- Condition Definition - Define conditions in the
Conditionssection - Condition Functions - Use
Fn::Equals,Fn::And,Fn::Or,Fn::Not,Fn::Ifin conditions - Condition References - Reference conditions in resources and outputs
- Dependency Resolution - Automatically resolves condition dependencies
YAML Short Syntax
InfraGuard supports the YAML short syntax (tag notation) for ROS functions:
!Ref- Short form ofRef!GetAtt- Short form ofFn::GetAtt- All other
Fn::*functions can be written as!FunctionName
The YAML parser automatically converts these short forms to their standard map representation during template loading.
Unsupported Features
InfraGuard focuses on static analysis and currently does not support the following features in static mode:
Runtime Functions
Fn::GetAtt- Requires actual resource creation to retrieve attributesFn::GetAZs- Requires runtime query to cloud providerFn::GetStackOutput- Requires access to other stack outputs
Template Sections
Locals- Local variable definitionsTransform- Template transformations and macrosRules- Template validation rulesMappings- Static value mappings (not analyzed for policy violations)
Special References
- Pseudo parameters (e.g.,
ALIYUN::StackId,ALIYUN::Region, etc.) - System-provided parameters
These features will be preserved as-is in the analysis output without evaluation or validation when using static mode.
Tip: For templates that use features not supported by static analysis (such as
Fn::GetAtt,Fn::GetAZs, etc.), we recommend using--mode previewto leverage the ROS PreviewStack API for more accurate analysis. Preview mode evaluates templates with actual cloud provider context, enabling support for runtime functions and other dynamic features.