Is it possible to use Testing.to_have_resource_with_properties (Pythonic) with properties that are Tokens? e.g. I want to test that an AzureRm KeyVault Access Policy has the correct object_id, this object_id comes from another resource, so therefore it is a Token, can I assert on that? I tried doing this:
object_id = get it from test stack...
assert Testing.to_have_resource_with_properties(
self.synthesized,
KeyVaultAccessPolicyA.TF_RESOURCE_TYPE,
{
"object_id": object_id,
"key_permissions": ["Get", "List"],
"secret_permissions": ["Get", "List"],
"certificate_permissions": ["Get", "List"],
},
)
to_have_resource_with_properties returns False unfortunately, even though on inspection it is the correct object_id reference. I guess token support isn’t there? or am I missing something? If I test only the static lists under object_id then it returns True. Do I need to make a feature request or am I missing something not covered in the documentation?