Using Terraform I have provisioned an aurora multi-az MySQL cluster. but after provisioning even I am not making any changes in the aurora configuration when I do the terraform plan it shows for the cluster replacement but there is no change in its terraform code.
I would like to ask you guys if it is the default behavior of terraform wrt to aurora cluster because it is not happening for other resources like for ec2 if there is any change or no change is there for ec2 resource terraform configuration.
i am using a custom module for creating multiple resources sending you the snapshot of the aurora cluster module for your reference and also sending you that snapshot of the Terraform plan this plan command is executed after resources are provisioned then only it shows that Plan: 3 to add, 1 to change, 3 to destroy but it should have shown your infrastructure matches the configuration.
Can you include the output of the plan? That should show exactly what is different between the ‘current’ state of the objects in AWS and what your module believes the ‘desired’ configuration is.
Typically when this sort of thing happens it is related to inputs changing or the resource changing. The former can happen when the inputs are not idempotent or are calculated from something changing, the latter when there are elements such as policies(or processes or people) that modify the resource outside of terraform. These are by far not the only reasons, but cover most.
Attaching the output of plan command after the infra provisioned. it asks for the replacement of the cluster even if it is provisioned. pls, go through the SS and let me know if you find the reason for the same.
I can not attach multiple screenshots so attaching the one combined screenshot for your reference.
Hello Ikhan, did you resolve this issue, i got the same issue, when I’m trying to modify from serverless to provisioned terraform is trying to replace the cluster instead of modifying.