Skip to content

Commit cda148f

Browse files
committed
more edits and removed image
1 parent 5252fb7 commit cda148f

File tree

2 files changed

+36
-15
lines changed

2 files changed

+36
-15
lines changed

articles/mysql/flexible-server/tutorial-set-data-encryption-cli-mysql-flexible-server.md

Lines changed: 36 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,31 +24,41 @@ In this tutorial you'll learn how to:
2424

2525
- An Azure account with an active subscription.
2626

27-
- If you don't have an Azure subscription, create an [Azure free account](https://azure.microsoft.com/free)before you begin. With an Azure free account, you can now try Azure Database for MySQL - Flexible Server for free for 12 months. For more information, see [Try Flexible Server for free](how-to-deploy-on-azure-free-account).
27+
- If you don't have an Azure subscription, create an [Azure free account](https://azure.microsoft.com/free)before you begin. With an Azure free account, you can now try Azure Database for MySQL - Flexible Server for free for 12 months. For more information, see [Try Flexible Server for free](how-to-deploy-on-azure-free-account.md).
2828

2929
- Install or upgrade Azure CLI to the latest version. See [Install Azure CLI](/cli/azure/install-azure-cli).
3030

3131
- Login to Azure account using [az login](/cli/azure/reference-index#az-login) command. Note the id property, which refers to Subscription ID for your Azure account.
3232

33-
`az login`
33+
```azurecli
34+
az login
35+
```
3436

3537
- If you have multiple subscriptions, choose the appropriate subscription in which you want to create the server using the az account set command.
3638

37-
`az account set --subscription \<subscription id\>`
39+
```azurecli
40+
az account set --subscription \<subscription id\>
41+
```
3842

3943
- In Azure Key Vault, create a key vault and a key. The key vault must have the following properties to use as a customer-managed key:
4044

4145
[Soft delete](../../key-vault/general/soft-delete-overview.md)
4246

43-
`az resource update --id $(az keyvault show --name \ \<key\_vault\_name\> -o tsv | awk '{print $1}') --set \ properties.enableSoftDelete=true`
47+
```azurecli
48+
az resource update --id $(az keyvault show --name \ \<key\_vault\_name\> -o tsv | awk '{print $1}') --set \ properties.enableSoftDelete=true
49+
```
4450

45-
[Purge protected](#purge-protection%22)
51+
[Purge protected](../../key-vault/general/soft-delete-overview.md#purge-protection)
4652

47-
`az keyvault update --name \<key\_vault\_name\> --resource-group \<resource\_group\_name\> --enable-purge-protection true`
53+
```azurecli
54+
az keyvault update --name \<key\_vault\_name\> --resource-group \<resource\_group\_name\> --enable-purge-protection true
55+
```
4856

4957
Retention days set to 90 days
5058

51-
`az keyvault update --name \<key\_vault\_name\> --resource-group \<resource\_group\_name\> --retention-days 90`
59+
```azurecli
60+
az keyvault update --name \<key\_vault\_name\> --resource-group \<resource\_group\_name\> --retention-days 90
61+
```
5262

5363
The key must have the following attributes to use as a customer-managed key:
5464

@@ -60,22 +70,33 @@ The key must have the following attributes to use as a customer-managed key:
6070

6171
You can verify the above attributes of the key by using the following command:
6272

63-
`az keyvault key show --vault-name \<key\_vault\_name\> -n \<key\_name\>`
73+
```azurecli
74+
az keyvault key show --vault-name \<key\_vault\_name\> -n \<key\_name\>
75+
```
6476

65-
**Update an existing MySQL flexible server with data encryption**
77+
## Update an existing MySQL flexible server with data encryption
6678

6779
Set or change key and identity for data encryption
6880

69-
`az mysql flexible-server update --resource-group testGroup --name testserver \\ --key \<key identifier of newKey\> --identity newIdentity`
81+
```azurecli
82+
az mysql flexible-server update --resource-group testGroup --name testserver \\ --key \<key identifier of newKey\> --identity newIdentity
83+
```
84+
85+
Set or change key, identity, backup key and backup identity for data encryption with geo redundant backup
7086

71-
**Disable data encryption for flexible server**
87+
```azurecli
88+
az mysql flexible-server update --resource-group testGroup --name testserver \\ --key \<key identifier of newKey\> --identity newIdentity \\ --backup-key \<key identifier of newBackupKey\> --backup-identity newBackupIdentity
89+
```
7290

73-
`az mysql flexible-server update --resource-group testGroup --name testserver --disable-data-encryption`
91+
Disable data encryption for flexible server
92+
93+
```azurecli-interactive
94+
az mysql flexible-server update --resource-group testGroup --name testserver --disable-data-encryption
95+
```
7496

7597
## Use an Azure Resource Manager template to enable data encryption
7698

77-
- The params **identityUri** and **primaryKeyUri** are the resource ID of the user managed identity and the user managed key, respectively.
78-
- Use _2021-05-01_ as the API version.
99+
The params **identityUri** and **primaryKeyUri** are the resource ID of the user managed identity and the user managed key, respectively.
79100

80101
```json
81102
"$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#",
@@ -219,4 +240,4 @@ Set or change key and identity for data encryption
219240

220241
## Next steps
221242

222-
- [Data encryption with customer managed keys – Azure Database for MySQL – Flexible Server Preview](concepts-customer-managed-key-mysql-flexible-server.md)
243+
- [Data encryption with customer managed keys – Azure Database for MySQL – Flexible Server Preview](concepts-customer-managed-key-mysql-flexible-server.md)

0 commit comments

Comments
 (0)