aztfmod / rover

The rover is a docker container in charge of the deployment of the Terraform platform engineering for Azure
MIT License
174 stars 146 forks source link

Rover fails to set msi object_id when using user assigned identity for multi subscription deployment #350

Closed eboentaran closed 11 months ago

eboentaran commented 11 months ago

When using user assigned identity and multi subscription by setting target_subscription_id and tfstate_subscription_id get_resource_from_assignedIdentityInfo will return an empty list if the user assigned identity is created in the source subscription for example when the user assigned identity is created in the launchpad subscription since the default subscription is set to the target subscription https://github.com/aztfmod/rover/blob/6d647ea7018e145f941a3efa351e8f87161b7f09/scripts/functions.sh#L590

And cause the following line to fail https://github.com/aztfmod/rover/blob/6d647ea7018e145f941a3efa351e8f87161b7f09/scripts/functions.sh#L690C24-L690C54

image