github.com/terramate-io/tf@v0.0.0-20230830114523-fce866b4dfcd/website/docs/language/providers/index.mdx (about) 1 --- 2 page_title: Providers - Configuration Language 3 description: >- 4 An overview of how to install and use providers, Terraform plugins that 5 interact with services, cloud providers, and other APIs. 6 --- 7 8 # Providers 9 10 > **Hands-on:** Try the [Perform CRUD Operations with Providers](/terraform/tutorials/configuration-language/provider-use?utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS) tutorial. 11 12 Terraform relies on plugins called providers to interact with cloud providers, 13 SaaS providers, and other APIs. 14 15 Terraform configurations must declare which providers they require so that 16 Terraform can install and use them. Additionally, some providers require 17 configuration (like endpoint URLs or cloud regions) before they can be used. 18 19 ## What Providers Do 20 21 Each provider adds a set of [resource types](/terraform/language/resources) 22 and/or [data sources](/terraform/language/data-sources) that Terraform can 23 manage. 24 25 Every resource type is implemented by a provider; without providers, Terraform 26 can't manage any kind of infrastructure. 27 28 Most providers configure a specific infrastructure platform (either cloud or 29 self-hosted). Providers can also offer local utilities for tasks like 30 generating random numbers for unique resource names. 31 32 ## Where Providers Come From 33 34 Providers are distributed separately from Terraform itself, and each provider 35 has its own release cadence and version numbers. 36 37 The [Terraform Registry](https://registry.terraform.io/browse/providers) 38 is the main directory of publicly available Terraform providers, and hosts 39 providers for most major infrastructure platforms. 40 41 ## Provider Documentation 42 43 Each provider has its own documentation, describing its resource 44 types and their arguments. 45 46 The [Terraform Registry](https://registry.terraform.io/browse/providers) 47 includes documentation for a wide range of providers developed by HashiCorp, third-party vendors, and our Terraform community. Use the 48 "Documentation" link in a provider's header to browse its documentation. 49 50 Provider documentation in the Registry is versioned; you can use the version 51 menu in the header to change which version you're viewing. 52 53 For details about writing, generating, and previewing provider documentation, 54 see the [provider publishing documentation](/terraform/registry/providers/docs). 55 56 ## How to Use Providers 57 58 Providers are released separately from Terraform itself and have their own version numbers. In production we recommend constraining the acceptable provider versions in the configuration's provider requirements block, to make sure that `terraform init` does not install newer versions of the provider that are incompatible with the configuration. 59 60 To use resources from a given provider, you need to include some information 61 about it in your configuration. See the following pages for details: 62 63 - [Provider Requirements](/terraform/language/providers/requirements) 64 documents how to declare providers so Terraform can install them. 65 66 - [Provider Configuration](/terraform/language/providers/configuration) 67 documents how to configure settings for providers. 68 69 - [Dependency Lock File](/terraform/language/files/dependency-lock) 70 documents an additional HCL file that can be included with a configuration, 71 which tells Terraform to always use a specific set of provider versions. 72 73 ## Provider Installation 74 75 - Terraform Cloud and Terraform Enterprise install providers as part of every run. 76 77 - Terraform CLI finds and installs providers when 78 [initializing a working directory](/terraform/cli/init). It can 79 automatically download providers from a Terraform registry, or load them from 80 a local mirror or cache. If you are using a persistent working directory, you 81 must reinitialize whenever you change a configuration's providers. 82 83 To save time and bandwidth, Terraform CLI supports an optional plugin 84 cache. You can enable the cache using the `plugin_cache_dir` setting in 85 [the CLI configuration file](/terraform/cli/config/config-file). 86 87 To ensure Terraform always installs the same provider versions for a given 88 configuration, you can use Terraform CLI to create a 89 [dependency lock file](/terraform/language/files/dependency-lock) 90 and commit it to version control along with your configuration. If a lock file 91 is present, Terraform Cloud, CLI, and Enterprise will all obey it when 92 installing providers. 93 94 > **Hands-on:** Try the [Lock and Upgrade Provider Versions](/terraform/tutorials/configuration-language/provider-versioning?utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS) tutorial. 95 96 ## How to Find Providers 97 98 To find providers for the infrastructure platforms you use, browse 99 [the providers section of the Terraform Registry](https://registry.terraform.io/browse/providers). 100 101 Some providers on the Registry are developed and published by HashiCorp, some 102 are published by platform maintainers, and some are published by users and 103 volunteers. The provider listings use the following badges to indicate who 104 develops and maintains a given provider. 105 106 <ProviderTable /> 107 <p></p> 108 109 ## How to Develop Providers 110 111 Providers are written in Go, using the Terraform Plugin SDK. For more 112 information on developing providers, see: 113 114 - The [Plugin Development](/terraform/plugin) documentation 115 - The [Call APIs with Terraform Providers](/terraform/tutorials/providers-plugin-framework?utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS) tutorials