salesforce/cloud-guardrails

Error in function call

MathCarv opened this issue · 1 comments

Anyone can help me?

Warning: "policy_definitions": [DEPRECATED] Deprecated in favour of policy_definition_reference

on no_params.tf line 72, in resource "azurerm_policy_set_definition" "no_params":
72: resource "azurerm_policy_set_definition" "no_params" {

Error: Error in function call

on no_params.tf line 66, in locals:
66: no_params_scope = local.management_group_no_params != "" ? data.azurerm_management_group.no_params[0].id : element(data.azurerm_subscriptions.no_params[0].subscriptions.*.id, 0)
|----------------
| data.azurerm_subscriptions.no_params[0].subscriptions is empty list of object

Call to function "element" failed: cannot use element function with an empty
list.

image

Try using a different Terraform version maybe? When I wrote this tool, I was using 0.12.31. It probably works with Terraform versions after that but idk.

If you find a version that works, I encourage anyone to post their Terraform versions that work (both the Terraform and the provider versions), so others can pin their versions. I've become aware that quite a few companies and cloud courses rely on this tool, and that will probably help people who are still using it to have consistent results.

I would help more, but I don't really maintain this tool anymore. Moved on from Salesforce and started my own company. Kinda just saw this in my inbox and thought I'd drop a quick comment.