https://pulumi.com logo
s

swift-lunch-74411

05/04/2020, 9:58 AM
Hi Team, I'm wondering if I can call Azure CLI command in the same scope of Pulumi script so I can pass generated names for resource group etc to the CLI command.
c

colossal-room-15708

05/04/2020, 10:04 AM
Sure, you can run any CLI really as part of your pulumi script, but for your use case I wonder if there's a better way. What exactly do you want to do? Also, there's #azure 🙂
s

swift-lunch-74411

05/04/2020, 4:19 PM
We are trying to assign global policy to resource group as we couldn't get Pulumi to work.
Here is one sample az policy assignment create --name tag-region --scope /subscriptions/<subscription>/resourceGroups/<resource group> --policy "<policy id>" --params "{'tagName':{'value': 'region'}}" --location northeurope --assign-identity
In Pulumi we can get the policy and create the assign to the policy but it's failing due to an error in parsing policy definition id. #azure