Hi Suresh Bettadapur •,
Welcome to Microsoft Q&A forum.
As I understand, you want to do encryption on an existing Azure Cosmos DB account using Terraform.
Please refer to the document:
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/cosmosdb_account
Here you have key_vault_key_id
- (Optional) A versionless Key Vault Key ID for CMK encryption. Changing this forces a new resource to be created.
In order to use a Custom Key
from Key Vault for encryption you must grant Azure Cosmos DB Service access to your key vault. For instructions on how to configure your Key Vault correctly please refer to the product documentation
Let us know if this helps or you have a different ask.
Thanks