Skip to content

Commit 3757bf4

Browse files
Merge pull request #231069 from GennadNY/gennadyk898
Update concepts-data-encryption.md
2 parents a2defcd + 8c63eba commit 3757bf4

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
@@ -190,6 +190,8 @@ Follow the steps below to enable CMK while creating Postgres Flexible Server usi
190190

191191
### CLI:
192192

193+
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.
194+
193195
Prerequisites:
194196

195197
- You must have an Azure subscription and be an administrator on that subscription.
@@ -220,46 +222,8 @@ az keyvault set-policy -g <resource_group> -n <vault_name> --object-id $identit
220222
```azurecli-interactive
221223
az postgres flexible-server create -g <resource_group> -n <postgres_server_name> --location <azure_region> --key $keyIdentifier --identity <identity_name>
222224
```
223-
## Update Customer Managed Key on the CMK enabled Flexible Server
224-
225-
### Portal
226-
227-
Prerequisites:
228-
229-
- 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.
230-
231-
- 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.
232-
233-
Follow the steps below to update CMK on CMK enabled Flexible Server using Azure portal:
234-
235-
1. Navigate to Azure Database for PostgreSQL - Flexible Server create a page via the Azure portal.
236-
237-
1. Navigate to Data Encryption screen under Security tab
238-
239-
1. Select different identity to connect to Azure Key Vault, remembering that this identity needs to have proper access rights to the Key Vault
240-
241-
1. Select different key by choosing subscription, Key Vault and key from dropdowns provided.
242225

243226

244-
### CLI
245-
246-
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.
247-
248-
249-
Prerequisites:
250-
- You must have an Azure subscription and be an administrator on that subscription.
251-
- 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.
252-
253-
Follow the steps below to change\rotate key or identity after creation of server with data encryption.
254-
1. Change key/identity for data encryption for existing server, first lets get new key identifier
255-
```azurecli-interactive
256-
newKeyIdentifier=$(az keyvault key show --vault-name <vault_name> --name <key_name> --query key.kid -o tsv)
257-
```
258-
2. Update server with new key and\or identity
259-
```azurecli-interactive
260-
az postgres flexible-server update --resource-group <resource_group> --name <server_name> --key $newKeyIdentifier --identity <identity_name>
261-
```
262-
263227
### Azure Resource Manager (ARM)
264228
ARM templates are a form of infrastructure as code, a concept where you define the infrastructure you need to be deployed.
265229
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)
@@ -268,7 +232,7 @@ Prerequisites:
268232
- You must have an Azure subscription and be an administrator on that subscription.
269233
- 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.
270234

271-
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
235+
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
272236
```json
273237
{
274238
"$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#",
@@ -597,6 +561,47 @@ Following is an example Azure ARM template that creates server with Customer MAN
597561
]
598562
}
599563
```
564+
## Update Customer Managed Key on the CMK enabled Flexible Server
565+
566+
### Portal
567+
568+
Prerequisites:
569+
570+
- 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.
571+
572+
- 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.
573+
574+
Follow the steps below to update CMK on CMK enabled Flexible Server using Azure portal:
575+
576+
1. Navigate to Azure Database for PostgreSQL - Flexible Server create a page via the Azure portal.
577+
578+
1. Navigate to Data Encryption screen under Security tab
579+
580+
1. Select different identity to connect to Azure Key Vault, remembering that this identity needs to have proper access rights to the Key Vault
581+
582+
1. Select different key by choosing subscription, Key Vault and key from dropdowns provided.
583+
584+
585+
### CLI
586+
587+
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.
588+
589+
590+
Prerequisites:
591+
- You must have an Azure subscription and be an administrator on that subscription.
592+
- 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.
593+
594+
Follow the steps below to change\rotate key or identity after creation of server with data encryption.
595+
1. Change key/identity for data encryption for existing server, first lets get new key identifier
596+
```azurecli-interactive
597+
newKeyIdentifier=$(az keyvault key show --vault-name <vault_name> --name <key_name> --query key.kid -o tsv)
598+
```
599+
2. Update server with new key and\or identity
600+
```azurecli-interactive
601+
az postgres flexible-server update --resource-group <resource_group> --name <server_name> --key $newKeyIdentifier --identity <identity_name>
602+
```
603+
604+
600605

601606

602607

0 commit comments

Comments
 (0)