Reprovision on terraform apply

Terraform is a great tool for cloud provisioning and if you are not already I highly suggest to look into it. When cloud resources are already provisioned with Terraform sometimes we need to do reprovisioning, ideally each time we run terraform apply. That is not supported in Terraform, at least not yet. However, it has a great feature which enables you to do reprovisioning on infrastructure change. An example would be when the new node is added to AWS and it needs to be joined to other nodes in the cluster. We can do this with null_resource, which acts as any other resource, but it has support for triggers. The trigger needs to be some value that will change, otherwise, it will not run every time.

read more
Alen KomljenReprovision on terraform apply