Skip to content

Commit 21d89ca

Browse files
UndermyspellDenisBiondic
authored andcommitted
feat(login) adds managed identity login to readme
1 parent 6247c7a commit 21d89ca

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

docs/features/08-azure-login.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,26 @@ developer and technical accounts should always be supported to run the IaC appli
55
perspective, to prevent technical account identifiers and secrets to be passed around by developers.
66

77
In the default setup, calling Login() will log the user in (if not already logged in) via normal prompts via azure CLI.
8-
If viper variables for service principal info are set (check the code docs on `azure_login.New` or `NewWithParams` methods),
9-
then the service principal login will be used (useful for CI systems).
8+
If specific viper variables are set (check the code docs on `azure_login.New` or `NewWithParams` methods), the following login methods are also supported (useful for CI systems).
109

11-
# usage
10+
## Managed identity
11+
You can provide a flag whether to use azure managed identities for the login.
12+
### User assigned managed identity
13+
Login via a user assigned managed identity can be done by additionally providing the client id.
14+
### System assigned managed identity
15+
The system assigned managed identity is used when the client id is ommitted
16+
17+
## Service Principal
18+
By providing the client-id, client-secret, tenant-id you can login via a service principal as well. You also have to ommit the flag to use a managed identity.
19+
20+
## Usage
1221

1322
```go
1423
login := azure_login.New(hq.GetExecutor())
1524
login.Login()
16-
```
25+
```
26+
The login mechanisms which will be attempted in the following order:
27+
- User assigned managed identity
28+
- System assigned managed identity
29+
- Service Principal
30+
- Normal user login

0 commit comments

Comments
 (0)