Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Understanding terraform provider and plugin

Is there a simpler way to understand them ? When I use a provider in my code and do a terraform init - does it download a provider or plugin ?

Where are and what are the 3rd party plugins ? Is is same as 3rd party provider like that ?

like image 648
Naveen Vijay Avatar asked Oct 27 '25 12:10

Naveen Vijay


1 Answers

Plugins is how you develop providers. For example, AWS provider is implemented as a plugin in go programming language into terraform.

The source code of the AWS provider plugin is here:

The Terraform AWS provider is a plugin for Terraform that allows for the full lifecycle management of AWS resources.

So, as an end-user you are using AWS provider. But if you want to contribute to the provider, and implement or fix bugs in it, you will be doing this in in a context of a plugin in go language.

When I use a provider in my code and do a terraform init - does it download a provider or plugin ?

Technically it downloads a plugin that provides the AWS (example) provider functionality. It will be stored in your project's directory in plugins folder:

.terraform/plugins/linux_amd64/terraform-provider-aws_v3.2.0_x5

3rd party provider

This is a provider not distributed by HashiCorp. Those third-party providers/plugins are "manually" installed in the plugins folder, whereas those by HashiCorp are installed using terraform init.

like image 117
Marcin Avatar answered Oct 30 '25 15:10

Marcin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!