Getting --impersonate working correctly, for logged_in_user in configuration #190
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When first deploy LandingZones with level0 it is deployed with a user account. During the deployment of Level0 the following Service Principal is created - [prefix]-caf_launchpad_level0.
The clientID, Secret is stored within Level0 keyvault [prefix]-kv-level0 as the following 3 values:
aadapp-caf-launchpad-level0-client-id
aadapp-caf-launchpad-level0-client-secret
aadapp-caf-launchpad-level0-tenant-id
launchpad-secret-prefix <- Currently missing from the scenerio 200.
With those 4 values above in the keyvault, it then allows the user to use the service principal going forward instead of a user account.
The code get's the ClientID and Secret, logs in as the service principal and apply terraform as that service principal.
The changes made in this pull request:
TF_VAR_logged_user_objectId
orTF_VAR_logged_aad_app_objectId
is correctly set instead of both as they are currently. This change is to help in fixing the issue logged_in_user for keyvault still gets applied when using MSI / Service Principal terraform-azurerm-caf#541. This pull request on it's own will not fix the issue. As I need to submit pull requests for: