published on Tuesday, Nov 3, 2026 by Pulumi
published on Tuesday, Nov 3, 2026 by Pulumi
Builds a policy group’s stack match rule from tag rules, without writing Pulumi Cloud’s expression format by hand. Use the result as a policy group’s stackMatchRule. Pulumi Cloud adds the stacks the rule matches to the group, alongside the stacks added individually, and keeps membership up to date as stack tags change. Match rules are a preview feature of Pulumi Cloud.
Using buildStackMatchRule
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function buildStackMatchRule(args: BuildStackMatchRuleArgs, opts?: InvokeOptions): Promise<BuildStackMatchRuleResult>
function buildStackMatchRuleOutput(args: BuildStackMatchRuleOutputArgs, opts?: InvokeOutputOptions): Output<BuildStackMatchRuleResult>def build_stack_match_rule(rules: Optional[Sequence[PolicyGroupMatchRule]] = None,
opts: Optional[InvokeOptions] = None) -> BuildStackMatchRuleResult
def build_stack_match_rule_output(rules: pulumi.Input[Optional[Sequence[pulumi.Input[PolicyGroupMatchRuleArgs]]]] = None,
opts: Optional[InvokeOutputOptions] = None) -> Output[BuildStackMatchRuleResult]func BuildStackMatchRule(ctx *Context, args *BuildStackMatchRuleArgs, opts ...InvokeOption) (*BuildStackMatchRuleResult, error)
func BuildStackMatchRuleOutput(ctx *Context, args *BuildStackMatchRuleOutputArgs, opts ...InvokeOption) BuildStackMatchRuleResultOutput> Note: This function is named BuildStackMatchRule in the Go SDK.
public static class BuildStackMatchRule
{
public static Task<BuildStackMatchRuleResult> InvokeAsync(BuildStackMatchRuleArgs args, InvokeOptions? opts = null)
public static Output<BuildStackMatchRuleResult> Invoke(BuildStackMatchRuleInvokeArgs args, InvokeOptions? opts = null)
public static Output<BuildStackMatchRuleResult> Invoke(BuildStackMatchRuleInvokeArgs args, InvokeOutputOptions opts)
}public static CompletableFuture<BuildStackMatchRuleResult> buildStackMatchRule(BuildStackMatchRuleArgs args, InvokeOptions options)
public static Output<BuildStackMatchRuleResult> buildStackMatchRule(BuildStackMatchRuleArgs args, InvokeOptions options)
public static Output<BuildStackMatchRuleResult> buildStackMatchRule(BuildStackMatchRuleArgs args, InvokeOutputOptions options)
fn::invoke:
function: pulumiservice:buildStackMatchRule
arguments:
# arguments dictionarydata "pulumiservice_build_stack_match_rule" "name" {
# arguments
}The following arguments are supported:
- Rules
List<Pulumi.
Pulumi Service. Inputs. Policy Group Match Rule> - The rules. An entity matches if it matches any rule.
- Rules
[]Policy
Group Match Rule - The rules. An entity matches if it matches any rule.
- rules list(object)
- The rules. An entity matches if it matches any rule.
- rules
List<Policy
Group Match Rule> - The rules. An entity matches if it matches any rule.
- rules
Policy
Group Match Rule[] - The rules. An entity matches if it matches any rule.
- rules
Sequence[Policy
Group Match Rule] - The rules. An entity matches if it matches any rule.
- rules List<Property Map>
- The rules. An entity matches if it matches any rule.
buildStackMatchRule Result
The following output properties are available:
- Match
Rule Dictionary<string, object> - The match rule, as the Pulumi Cloud expression a policy group's match rule field takes.
- Match
Rule map[string]interface{} - The match rule, as the Pulumi Cloud expression a policy group's match rule field takes.
- match_
rule map(any) - The match rule, as the Pulumi Cloud expression a policy group's match rule field takes.
- match
Rule Map<String,Object> - The match rule, as the Pulumi Cloud expression a policy group's match rule field takes.
- match
Rule {[key: string]: any} - The match rule, as the Pulumi Cloud expression a policy group's match rule field takes.
- match_
rule Mapping[str, Any] - The match rule, as the Pulumi Cloud expression a policy group's match rule field takes.
- match
Rule Map<Any> - The match rule, as the Pulumi Cloud expression a policy group's match rule field takes.
Supporting Types
PolicyGroupMatchRule
- Conditions
List<Pulumi.
Pulumi Service. Inputs. Policy Group Tag Condition> - Tag conditions that must all hold for the rule to match. At least one is required.
- Conditions
[]Policy
Group Tag Condition - Tag conditions that must all hold for the rule to match. At least one is required.
- conditions list(object)
- Tag conditions that must all hold for the rule to match. At least one is required.
- conditions
List<Policy
Group Tag Condition> - Tag conditions that must all hold for the rule to match. At least one is required.
- conditions
Policy
Group Tag Condition[] - Tag conditions that must all hold for the rule to match. At least one is required.
- conditions
Sequence[Policy
Group Tag Condition] - Tag conditions that must all hold for the rule to match. At least one is required.
- conditions List<Property Map>
- Tag conditions that must all hold for the rule to match. At least one is required.
PolicyGroupTagCondition
- Key string
- The tag key.
- Operator
Pulumi.
Pulumi Service. Policy Group Tag Operator - How the tag is compared. Defaults to
equals. - Value string
- The tag value. Required with
equalsandnotEquals, and not allowed withexistsandnotExists.
- Key string
- The tag key.
- Operator
Policy
Group Tag Operator - How the tag is compared. Defaults to
equals. - Value string
- The tag value. Required with
equalsandnotEquals, and not allowed withexistsandnotExists.
- key string
- The tag key.
- operator
"equals" | "not
Equals" | "exists" | "not Exists" - How the tag is compared. Defaults to
equals. - value string
- The tag value. Required with
equalsandnotEquals, and not allowed withexistsandnotExists.
- key String
- The tag key.
- operator
Policy
Group Tag Operator - How the tag is compared. Defaults to
equals. - value String
- The tag value. Required with
equalsandnotEquals, and not allowed withexistsandnotExists.
- key string
- The tag key.
- operator
Policy
Group Tag Operator - How the tag is compared. Defaults to
equals. - value string
- The tag value. Required with
equalsandnotEquals, and not allowed withexistsandnotExists.
- key str
- The tag key.
- operator
Policy
Group Tag Operator - How the tag is compared. Defaults to
equals. - value str
- The tag value. Required with
equalsandnotEquals, and not allowed withexistsandnotExists.
- key String
- The tag key.
- operator
"equals" | "not
Equals" | "exists" | "not Exists" - How the tag is compared. Defaults to
equals. - value String
- The tag value. Required with
equalsandnotEquals, and not allowed withexistsandnotExists.
PolicyGroupTagOperator
- Equals
Value equalsThe tag is set tovalue.- Not
Equals notEqualsThe tag isn't set tovalue. Also matches entities that don't have the tag.- Exists
existsThe entity has the tag, with any value.- Not
Exists notExistsThe entity doesn't have the tag.
- Policy
Group Tag Operator Equals equalsThe tag is set tovalue.- Policy
Group Tag Operator Not Equals notEqualsThe tag isn't set tovalue. Also matches entities that don't have the tag.- Policy
Group Tag Operator Exists existsThe entity has the tag, with any value.- Policy
Group Tag Operator Not Exists notExistsThe entity doesn't have the tag.
- "equals"
equalsThe tag is set tovalue.- "not
Equals" notEqualsThe tag isn't set tovalue. Also matches entities that don't have the tag.- "exists"
existsThe entity has the tag, with any value.- "not
Exists" notExistsThe entity doesn't have the tag.
- Equals
equalsThe tag is set tovalue.- Not
Equals notEqualsThe tag isn't set tovalue. Also matches entities that don't have the tag.- Exists
existsThe entity has the tag, with any value.- Not
Exists notExistsThe entity doesn't have the tag.
- Equals
equalsThe tag is set tovalue.- Not
Equals notEqualsThe tag isn't set tovalue. Also matches entities that don't have the tag.- Exists
existsThe entity has the tag, with any value.- Not
Exists notExistsThe entity doesn't have the tag.
- EQUALS
equalsThe tag is set tovalue.- NOT_EQUALS
notEqualsThe tag isn't set tovalue. Also matches entities that don't have the tag.- EXISTS
existsThe entity has the tag, with any value.- NOT_EXISTS
notExistsThe entity doesn't have the tag.
- "equals"
equalsThe tag is set tovalue.- "not
Equals" notEqualsThe tag isn't set tovalue. Also matches entities that don't have the tag.- "exists"
existsThe entity has the tag, with any value.- "not
Exists" notExistsThe entity doesn't have the tag.
Package Details
- Repository
- pulumiservice pulumi/pulumi-pulumiservice
- License
- Apache-2.0
published on Tuesday, Nov 3, 2026 by Pulumi