Created
May 19, 2021 11:58
-
-
Save pierskarsenbarg/726c59d7ce29c3aee6dca806f2576405 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private (Output<string> registryUsername, Output<string> registryPassword) GetRegistryLogin(Output<string> resourceGroupName, Output<string> registryName) | |
| { | |
| var credentials = Output.Tuple(resourceGroupName, registryName).Apply(values => | |
| ListRegistryCredentials.InvokeAsync(new ListRegistryCredentialsArgs | |
| { | |
| ResourceGroupName = values.Item1, | |
| RegistryName = values.Item2 | |
| })); | |
| var registryUsername = credentials.Apply(c => c.Username ?? ""); | |
| var registryPassword = credentials.Apply(c => Output.CreateSecret(c.Passwords.First().Value ?? "")); | |
| return (registryUsername, registryPassword); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment