Reputation: 193
I am following the official documentation for using Customer Managed Key (CMK) for double encryption for Synapse workspace. Now my question is how to automate this step?
I got the part of granting the Synapse workspace access to the key vault and did automate it with terraform. However, there seems to be no way to do the activation part with terrafrom (azurerm module) or api call.
Can someone give me an idea on how to approach this issue.
Upvotes: 0
Views: 1164
Reputation: 11
As I've required this today: Using PowerShell directly, it easily works as following:
Update-AzSynapseWorkspaceKey -WorkspaceName YourWorkspaceName -Activate
Therefore the script only needs to be integrated into your terraform template, e.g. using https://www.terraform.io/docs/language/resources/provisioners/local-exec.html.
Of course, in this case, additional steps to authenticate within the Az-Cmdlets of PowerShell to Azure might be required.
In the end, resource provisioning is all about REST APIs. PowerShell Modules, Azure CLI, Python SDK etc. are only wrappers doing the REST API magic in behind.
And this magic is no secret, but can be investigated:
REST API directly:
Azure CLI:
Upvotes: 1
Reputation: 1866
There is no way to automate the activation process. We need to do it form portal manually.
Upvotes: 0