Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(event-hub): do not try to access root mgmt group in non-org mode …
…(SSPROD-36994) (#30) The change in #27 fixes the onboarding of the organizational mode but introduces a regression when onboarding a single subscription: ``` Error: Invalid index on .terraform/modules/single-subscription-threat-detection/modules/services/event-hub-data-source/organizational.tf line 14, in locals: 14: selected_management_group = length(data.azurerm_management_group.onboarded_management_group) > 0 ? values(data.azurerm_management_group.onboarded_management_group) : [data.azurerm_management_group.root_management_group[0]] ├──────────────── │ data.azurerm_management_group.root_management_group is empty tuple ``` Avoiding to access the undefined `root_management_group` if `is_organizational` is false fixes the issue. This was caught by the automated daily regression tests and the fix has been confirmed by testing manually modifying the `source` on `main.tf` to point to my local `terraform-azurerm-secure` repo.
- Loading branch information