I would like to pass a variable into an AST query in my powershell script. eg. in the query below I would like to use $role instead of "avrt". Is it possible? Getting an error when I tired it.
$trusted_facts = @{
query = '["from", "facts",
["and",
["=", "name", "trusted"],
["subquery", "facts",
["and",
["subquery", "fact_contents",
["and",
["~>", "path", ["trusted", "extensions", "pp_role"]],
["=", "value", "avrt"]
]
],
["subquery", "fact_contents",
["and",
["~>", "path", ["trusted", "extensions", "pp_apptier"]],
["=", "value", "production"]
]
]
]
]
]
]'
}