Skip to content

Commit 8c63eba

Browse files
committed
Update concepts-data-encryption.md
1 parent c6a97dc commit 8c63eba

File tree

1 file changed

+44
-39
lines changed

1 file changed

+44
-39
lines changed

articles/postgresql/flexible-server/concepts-data-encryption.md

Lines changed: 44 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,8 @@ Follow the steps below to enable CMK while creating Postgres Flexible Server usi
189189

190190
### CLI:
191191

192+
The Azure command-line interface (Azure CLI) is a set of commands used to create and manage Azure resources. The Azure CLI is available across Azure services and is designed to get you working quickly with Azure, with an emphasis on automation.
193+
192194
Prerequisites:
193195

194196
- You must have an Azure subscription and be an administrator on that subscription.
@@ -219,46 +221,8 @@ az keyvault set-policy -g <resource_group> -n <vault_name> --object-id $identit
219221
```azurecli-interactive
220222
az postgres flexible-server create -g <resource_group> -n <postgres_server_name> --location <azure_region> --key $keyIdentifier --identity <identity_name>
221223
```
222-
## Update Customer Managed Key on the CMK enabled Flexible Server
223-
224-
### Portal
225-
226-
Prerequisites:
227-
228-
- Azure Active Directory (Azure AD) user-managed identity in region where Postgres Flex Server will be created. Follow this [tutorial](../../active-directory/managed-identities-azure-resources/qs-configure-portal-windows-vm.md) to create identity.
229-
230-
- Key Vault with key in region where Postgres Flex Server will be created. Follow this [tutorial](../../key-vault/general/quick-create-portal.md) to create Key Vault and generate key.
231-
232-
Follow the steps below to update CMK on CMK enabled Flexible Server using Azure portal:
233-
234-
1. Navigate to Azure Database for PostgreSQL - Flexible Server create a page via the Azure portal.
235-
236-
1. Navigate to Data Encryption screen under Security tab
237-
238-
1. Select different identity to connect to Azure Key Vault, remembering that this identity needs to have proper access rights to the Key Vault
239-
240-
1. Select different key by choosing subscription, Key Vault and key from dropdowns provided.
241224

242225

243-
### CLI
244-
245-
The Azure command-line interface (Azure CLI) is a set of commands used to create and manage Azure resources. The Azure CLI is available across Azure services and is designed to get you working quickly with Azure, with an emphasis on automation.
246-
247-
248-
Prerequisites:
249-
- You must have an Azure subscription and be an administrator on that subscription.
250-
- Key Vault with key in region where Postgres Flex Server will be created. Follow this [tutorial](../../key-vault/general/quick-create-portal.md) to create Key Vault and generate key.
251-
252-
Follow the steps below to change\rotate key or identity after creation of server with data encryption.
253-
1. Change key/identity for data encryption for existing server, first lets get new key identifier
254-
```azurecli-interactive
255-
newKeyIdentifier=$(az keyvault key show --vault-name <vault_name> --name <key_name> --query key.kid -o tsv)
256-
```
257-
2. Update server with new key and\or identity
258-
```azurecli-interactive
259-
az postgres flexible-server update --resource-group <resource_group> --name <server_name> --key $newKeyIdentifier --identity <identity_name>
260-
```
261-
262226
### Azure Resource Manager (ARM)
263227
ARM templates are a form of infrastructure as code, a concept where you define the infrastructure you need to be deployed.
264228
Using ARM templates in managing your Azure environment has many benefits, as declarative syntax removes the requirement of writing complicated deployment scripts to handle multiple deployment scenarios. For more on ARM templates see this [doc](../../azure-resource-manager/templates/overview.md)
@@ -267,7 +231,7 @@ Prerequisites:
267231
- You must have an Azure subscription and be an administrator on that subscription.
268232
- Key Vault with key in region where Postgres Flex Server will be created. Follow this [tutorial](../../key-vault/general/quick-create-portal.md) to create Key Vault and generate key.
269233

270-
Following is an example Azure ARM template that creates server with Customer MANAGED kEY (CMK) based encryption as defined in *dataEncryptionData* section of ARM template
234+
Following is an example Azure ARM template that creates server with Customer Managed Key (CMK) based encryption as defined in *dataEncryptionData* section of ARM template
271235
```json
272236
{
273237
"$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#",
@@ -596,6 +560,47 @@ Following is an example Azure ARM template that creates server with Customer MAN
596560
]
597561
}
598562
```
563+
## Update Customer Managed Key on the CMK enabled Flexible Server
564+
565+
### Portal
566+
567+
Prerequisites:
568+
569+
- Azure Active Directory (Azure AD) user-managed identity in region where Postgres Flex Server will be created. Follow this [tutorial](../../active-directory/managed-identities-azure-resources/qs-configure-portal-windows-vm.md) to create identity.
570+
571+
- Key Vault with key in region where Postgres Flex Server will be created. Follow this [tutorial](../../key-vault/general/quick-create-portal.md) to create Key Vault and generate key.
572+
573+
Follow the steps below to update CMK on CMK enabled Flexible Server using Azure portal:
574+
575+
1. Navigate to Azure Database for PostgreSQL - Flexible Server create a page via the Azure portal.
576+
577+
1. Navigate to Data Encryption screen under Security tab
578+
579+
1. Select different identity to connect to Azure Key Vault, remembering that this identity needs to have proper access rights to the Key Vault
580+
581+
1. Select different key by choosing subscription, Key Vault and key from dropdowns provided.
582+
583+
584+
### CLI
585+
586+
The Azure command-line interface (Azure CLI) is a set of commands used to create and manage Azure resources. The Azure CLI is available across Azure services and is designed to get you working quickly with Azure, with an emphasis on automation.
587+
588+
589+
Prerequisites:
590+
- You must have an Azure subscription and be an administrator on that subscription.
591+
- Key Vault with key in region where Postgres Flex Server will be created. Follow this [tutorial](../../key-vault/general/quick-create-portal.md) to create Key Vault and generate key.
592+
593+
Follow the steps below to change\rotate key or identity after creation of server with data encryption.
594+
1. Change key/identity for data encryption for existing server, first lets get new key identifier
595+
```azurecli-interactive
596+
newKeyIdentifier=$(az keyvault key show --vault-name <vault_name> --name <key_name> --query key.kid -o tsv)
597+
```
598+
2. Update server with new key and\or identity
599+
```azurecli-interactive
600+
az postgres flexible-server update --resource-group <resource_group> --name <server_name> --key $newKeyIdentifier --identity <identity_name>
601+
```
602+
603+
599604

600605

601606

0 commit comments

Comments
 (0)