Skip to content

Commit eb36b8a

Browse files
committed
Update CLI command examples
1 parent 6e133c8 commit eb36b8a

File tree

1 file changed

+25
-58
lines changed

1 file changed

+25
-58
lines changed

articles/operator-nexus/how-to-credential-manager-key-vault.md

Lines changed: 25 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -113,96 +113,63 @@ Refer to [_Grant Managed Identity Access to a Key Vault for Credential Rotation_
113113
## Configure Key Vault Using Managed Identity for Cluster
114114

115115
> [!IMPORTANT]
116-
> Please note that this method for configuring a key vault for credential rotation is in preview. **This method can only be used with key vault that do not have firewall enabled.** If your environment requires the key vault firewall be enabled, use the existing [Cluster Manager]() identity method.
116+
> Please note that this method for configuring a key vault for credential rotation is in preview. **This method can only be used with key vaults that do not have firewall enabled.** If your environment requires the key vault firewall be enabled, use the existing [Cluster Manager]() identity method.
117117
118-
Beginning with the 2024-10-01-preview API, managed identities in the Nexus Cluster resource can be used instead of Cluster Manager. The Cluster identity may be system-assigned or [user-assigned](/entra/identity/managed-identities-azure-resources/how-manage-user-assigned-managed-identities), and can be managed directly via APIs or via CLI.
118+
Beginning with the 2024-10-01-preview API, managed identities in the Nexus Cluster resource can be used instead of Cluster Manager. The Cluster managed identity may be system-assigned or [user-assigned](/entra/identity/managed-identities-azure-resources/how-manage-user-assigned-managed-identities), and can be managed directly via APIs or via CLI.
119119

120120
> [!NOTE]
121121
> If Nexus Cluster managed identity is configured for the key vault, then these settings will supersede settings configured in [_Configure Key Vault Using Managed Identity for Cluster Manager_](#configure-key-vault-using-managed-identity-for-cluster-manager)
122122
123-
These examples describe how to configure a managed identity for a Nexus Cluster.
123+
### Configure Nexus Cluster Secret Archive Settings
124+
125+
The Nexus Cluster _secret-archive-settings_ specify the Azure Key Vault URI where rotated credentials will be stored and the managed identity which will be used to access it.
126+
127+
These examples describe how to configure a managed identity for a Nexus Cluster and configure it as part of _secret-archive-settings_.
128+
129+
> [!NOTE]
130+
> Secret archive settings specify the Key Vault URI, not the Key Vault resource ID, and the managed identity specfied must be configured for the Nexus Cluster.
124131
125-
- Create Nexus Cluster with system-assigned identity
132+
- Create Nexus Cluster with system-assigned identity to access Key Vault for rotated credentials.
126133
```azurecli-interactive
127134
az networkcloud cluster create --name "<cluster-name>" \
128135
--resource-group "<cluster-resource-group>" \
129136
...
130137
--mi-system-assigned \
138+
--secret-archive-settings identity-type="SystemAssignedIdentity" vault-uri="https://<key vault name>.vault.azure.net/"
131139
...
132140
--subscription "<subscription>"
133141
```
134142

135-
- Create Nexus Cluster with user-assigned identity
143+
- Create Nexus Cluster with user-assigned identity to access Key Vault for rotated credentials.
136144
```azurecli-interactive
137145
az networkcloud cluster create --name "<cluster-name>" \
138146
--resource-group "<cluster-resource-group>" \
139147
...
140148
--mi-user-assigned "<user-assigned-identity-resource-id>" \
149+
--secret-archive-settings identity-type="UserAssignedIdentity" identity-resource-id="<user-assigned-identity-resource-id>" vault-uri="https://<key vault name>.vault.azure.net/"
141150
...
142151
--subscription "<subscription>"
143152
```
144153

145-
- Update existing Nexus Cluster with system-assigned identity
154+
- Update existing Nexus Cluster with system-assigned identity to access Key Vault for rotated credentials.
146155
```azurecli-interactive
147-
az networkcloud cluster update --ids <cluster-resource-id> --mi-system-assigned
156+
az networkcloud cluster update --ids <cluster-resource-id> \
157+
--mi-system-assigned \
158+
--secret-archive-settings identity-type="SystemAssignedIdentity" vault-uri="https://<key vault name>.vault.azure.net/"
148159
```
149160

150161
- Update existing Nexus Cluster with user-assigned identity
151162
```azurecli-interactive
152-
az networkcloud cluster update --ids <cluster-resource-id> --mi-user-assigned "<user-assigned-identity-resource-id>"
163+
az networkcloud cluster update --ids <cluster-resource-id> \
164+
--mi-user-assigned "<user-assigned-identity-resource-id>" \
165+
--secret-archive-settings identity-type="UserAssignedIdentity" identity-resource-id="<user-assigned-identity-resource-id>" vault-uri="https://<key vault name>.vault.azure.net/"
153166
```
154167

155-
### Configure Nexus Cluster Secret Archive Settings
156-
157-
Register the Key Vault URI and managed identity to be used in the secret archive settings for the Nexus cluster.
158-
159-
> [!NOTE]
160-
> Secret archive settings specify the Key Vault URI, not the Key Vault resource ID, and the managed identity specfied must be configured for the Nexus Cluster.
161-
162-
Example:
168+
For more help:
163169

164-
- Using a system-assigned identity:
165-
166-
```azurecli
167-
az rest --method PATCH --url ${CLUSTER_ID}?api-version=2024-10-01-preview --body @./sami-body.json
168-
```
169-
170-
The request body (sami-body.json) example:
171-
172-
```azurecli
173-
{
174-
"properties": {
175-
"secretArchiveSettings": {
176-
"vaultUri": "https://<key vault name>.vault.azure.net/",
177-
"associatedIdentity": {
178-
"identityType": "SystemAssignedIdentity"
179-
}
180-
}
181-
}
182-
}
183-
```
184-
185-
- Using a user-assigned identity:
186-
187-
```azurecli
188-
az rest --method PATCH --url ${CLUSTER_ID}?api-version=2024-10-01-preview --body @./uami-body.json
189-
```
190-
191-
The request body (uami-body.json) example:
192-
193-
```azurecli
194-
{
195-
"properties": {
196-
"secretArchiveSettings": {
197-
"vaultUri": "https://<key vault name>.vault.azure.net/",
198-
"associatedIdentity": {
199-
"identityType": "UserAssignedIdentity",
200-
"userAssignedIdentityResourceId": "<user-assigned-identity-resource-id>"
201-
}
202-
}
203-
}
204-
}
205-
```
170+
```azurecli-interactive
171+
az networkcloud cluster update --secret-archive-settings '??' --help
172+
```
206173

207174
### Get the Principal ID for the Cluster Managed Identity
208175

0 commit comments

Comments
 (0)