Is there a way to use the Azure CLI 2 to turn on TDE on an existing Azure SQL Database? If yes, would you provide an example.
Thank you,
Is there a way to use the Azure CLI 2 to turn on TDE on an existing Azure SQL Database? If yes, would you provide an example.
Thank you,
Luckily the az cli is open source, so we can just look for the command.
Unluckily, it looks like it is not yet supported (as of Apr 26 2017). The code is in there, but commented out.
From the source: sql/commands.py#L59
# TDE will not be included in the first batch of GA commands
You can enable/disable TDE by using the az sql db tde set
command.
az sql db tde set --status {Disabled, Enabled}
[--database]
[--ids]
[--resource-group]
[--server]
[--subscription]
For exampke, az sql db set --resource-group mygroup --server myserver --database mydb --status Enabled
.