Created
January 20, 2020 11:07
-
-
Save snobu/169a5ad1e1ae07e0261f61438e86dca3 to your computer and use it in GitHub Desktop.
keyvalult base64 encoded json as secret
This file contains 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
$ cat secret.json | base64 > secret.json.base64 | |
$ az keyvault secret set --vault-name alice --name secret-from-cli -f secret.json.base64 | |
{ | |
... | |
"tags": { | |
"file-encoding": "utf-8" | |
}, | |
"value": "ewogICAgInRoaXMiOiAiaXMiLAogICAgInNvbWUiOiAianNvbiwKICAgICJtYXliZSI6IHsKICAgICAgICAieWVhaCI6IDEKICAgIH0KfQo=\n" | |
} | |
$ az keyvault secret show --vault-name alice --name secret-from-cli --query value -o tsv | base64 -d | |
{ | |
"this": "is", | |
"some": "json, | |
"maybe": { | |
"yeah": 1 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment