Are provisioners really "a last resort"?

I was looking at the getting started guide here: https://learn.hashicorp.com/terraform/getting-started/provision

which links to this page on provisioners: https://www.terraform.io/docs/provisioners/index.html

which indicates that provisioners are a “last resort” which suggests to me that provisioners should be a special case thing for most users, but putting them in the getting started guide suggests they’re one of the first things you reach for – is there some cognitive dissonance among the documentation writers?

Hi @mwatts15,

Thanks for pointing this out and I’m sorry I didn’t catch this message when you originally posted it. It sounds like you caught the documentation at a funny point while we were reorganizing it, and so some parts had been updated and some parts had not; for better or worse the tutorials on learn.hashicorp.com and the docs on terraform.io are published independently and so they can get out of sync sometimes when we’re making changes.

I don’t remember what the docs looked like at the time you would’ve written this but I guess what you found was the original Terraform getting started guide that had dated back to very early versions of Terraform, and so it was essentially an overview of the Terraform functionality that existed at that time rather than a carefully-considered set of best practices. The guide you saw isn’t published anymore, because it’s been replaced by a set of cloud-platform-specific getting started guides, but it looks like the “Provision” page you linked to here is now redirecting to a guide on using Packer to build a custom AMI, which is consistent with the recommendations under Running Configuration Management Software on the Provisioners doc page.

I hope that things are clearer now that all of the different documentation has caught up! If anyone finds this and has questions about how to employ the various alternatives listed under Provisioners are a Last Resort then I’d invite you to start a new topic in this forum to discuss it!