When I try to upgrade terraform and cdktf for python, it is deleting all the resources and recreating them from cdktf plan output.
The Ids are changed. Is there anyway to force to use old style Ids? There are certain resources like eventhub’s and Log Analytics Workspace I can not afford to delete and recreate.
From:
terraform – v1.2.5
cdktf – v0.11.2
azurerm – v3.35.0
To:
terraform – v1.5.3
cdktf – v0.17.1
azurerm – v3.64.0
It is possible to override resources with an explicit id by calling .overrideLogicalId("the_old_id") on the specific resources as a quick way of getting rid of these proposed changes. The alternative would be to use terraform state mv commands in the output directory of the stack to move the state to the new ids.