I had a terraform template to create multiple Azure mysql Database servers with azurerm_template_deployment
, and all the database servers are running fine.
I am currently working on splitting the template so that one template is for one database server. I already finished splitting the template (so one azurerm_template_deployment
is split to multiple azurerm_template_deployment
) and its tfstate file, compared old and new templates, and made sure the new template is good. However, terraform shows that it will create new database resources instead of showing no diffs. After I proceeded the database creation , and it was actually creating a new deployment and updating the database. Since there was no change on the database configuration, no operation was applied to the database and the database did not go down.
Here is my question:
Why terraform shows that it will create new resources even if template and tfstate are split?