A Terraform configuration is idempotent when a second apply results in 0 changes. An idempotent configuration ensures that:
You can use Terratest’s terraform.ApplyAndIdempotentContext() function to both apply your Terraform configuration and
test its idempotency.
ctx := t.Context()
defer terraform.DestroyContext(t, ctx, terraformOptions)
terraform.ApplyAndIdempotentContext(t, ctx, terraformOptions)
If a second apply of your Terraform configuration results in changes then your test will fail.
Your entire infrastructure. Defined as code. In about a day.
Explore Gruntwork.io