That’s not possible with cdktf directly, but could be done in combination with the Terraform CLI. That would make a good feature requests though: https://cdk.tf/feature
Sounds good, thnx. I imported using terraform i.e. keyvault and now trying to add new key but getting an error “Inappropriate value for attribute “key_vault_id”: string required.”
new KeyVaultKey(this, 'keyvaultkey', {
name: 'cdktfkey',
keyVaultId: remoteState.get('azurerm_key_vault.keyvault.id'),
...
});
My state file is like below , not sure what I am doing wrong: