Skip to content

Commit d18a316

Browse files
authored
Merge pull request #326 from bcgov/eso-tweak
Update Azure SecretStore example
2 parents 5f8f600 + fb31992 commit d18a316

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/docs/secrets-management/example_secretstore_azure_key_vault.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,14 @@ Save a copy of the output from this command - you'll need `clientId`, `clientSec
7070
```
7171
export CLIENT_ID=clientId_from_output
7272
export CLIENT_SECRET=clientSecret_from_output
73+
export TENANT_ID=tenantId_from_output
7374
```
7475

7576
## Create the OpenShift Secret
7677

7778
First, create a Secret in your OpenShift namespace to store your Azure Service Principal credentials. You can use the UI if you like, or use the following command:
7879
```
79-
oc create secret generic azure-key-vault-creds --from-literal=clientId=${CLIENT_ID} --from-literal=clientSecret=${CLIENT_SECRET}
80+
oc create secret generic azure-key-vault-creds --from-literal=clientId=${CLIENT_ID} --from-literal=clientSecret=${CLIENT_SECRET} --from-literal=tenantId=${TENANT_ID}
8081
```
8182

8283
## Assign permissions to the Service Principal
@@ -103,7 +104,7 @@ az keyvault set-policy --name ${KEY_VAULT_NAME} --object-id ${OBJECT_ID} --secre
103104
```
104105

105106
## Create a SecretStore
106-
Next, create a YAML manifest for the `SecretStore`. Be sure to enter the correct values for the `tenantId` and the name of the Secret that you created above.
107+
Next, create a YAML manifest for the `SecretStore`. Be sure to enter the correct value for the name of the Secret that you created above.
107108
```
108109
apiVersion: external-secrets.io/v1beta1
109110
kind: SecretStore
@@ -113,7 +114,6 @@ metadata:
113114
spec:
114115
provider:
115116
azurekv:
116-
tenantId: "MY_TENANT_ID"
117117
vaultUrl: https://my-key-vault-name.vault.azure.net/
118118
authSecretRef:
119119
clientId:
@@ -122,6 +122,9 @@ spec:
122122
clientSecret:
123123
name: azure-key-vault-creds
124124
key: clientSecret
125+
tenantId:
126+
name: azure-key-vault-creds
127+
key: tenantId
125128
```
126129

127130
After applying the YAML manifest, check the status of the new SecretStore. It should show as ready.

0 commit comments

Comments
 (0)