I'm preparing for the Terraform Associate Certification exam. I've done a practice exam on Udemy and got a question about automatic install of community providers wrong. However, based on actual terraform behaviour I question whether the exam (or Terraform's documentation) is incorrect. It may be the case that my question should be directed at the author of the practice exam, but I thought I'd post it here in case a clarification might help someone else.
The exam question is:
True or False?
terraform initcannot automatically download Community providers.
My answer is false, incorrect according to the exam with the following explanation:
Explanation
Anyone can develop and distribute their own Terraform providers. (See Writing Custom Providers for more about provider development.) These third-party providers must be manually installed, since terraform init cannot automatically download them.
https://www.terraform.io/docs/configuration/providers.html#third-party-plugins
Terraform's init documentation confirms this (note no reference to community plugins):
Note that terraform init cannot automatically download providers that are not distributed by HashiCorp. See Third-party Plugins below for installation instructions.
But if you add a community provider to your config and run terraform init community plugins do install automatically:
provider "auth0" {
version = "> 0.8"
}
$ terraform init
Initializing the backend...
Initializing provider plugins...
- Checking for available provider plugins...
- Downloading plugin for provider "auth0" (terraform-providers/auth0) 0.10.2...
...
So I can only assume that based on actual terraform functionality Community Providers are not considered third-party plugins?