From 06904868099b49e1bb423c93998767366e763027 Mon Sep 17 00:00:00 2001 From: Andrew Starr-Bochicchio Date: Fri, 28 May 2021 10:53:37 -0400 Subject: [PATCH] Cover required_providers in the main docs. (#643) --- docs/index.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/index.md b/docs/index.md index 0e254530a..09d4a181c 100644 --- a/docs/index.md +++ b/docs/index.md @@ -13,6 +13,15 @@ Use the navigation to the left to read about the available resources. ## Example Usage ```hcl +terraform { + required_providers { + digitalocean = { + source = "digitalocean/digitalocean" + version = "~> 2.0" + } + } +} + # Set the variable value in *.tfvars file # or using -var="do_token=..." CLI option variable "do_token" {} @@ -28,6 +37,9 @@ resource "digitalocean_droplet" "web" { } ``` +-> **Note for Module Developers** Although provider configurations are shared between modules, each module must +declare its own [provider requirements](https://www.terraform.io/docs/language/providers/requirements.html). See the [module development documentation](https://www.terraform.io/docs/language/modules/develop/providers.html) for additional information. + ## Argument Reference The following arguments are supported: @@ -49,4 +61,4 @@ The following arguments are supported: used for DigitalOcean Spaces requests. (It defaults to the value of the `SPACES_ENDPOINT_URL` environment variable or `https://{{.Region}}.digitaloceanspaces.com` if unset.) The provider will replace `{{.Region}}` (via Go's templating engine) with the slug - of the applicable Spaces region. + of the applicable Spaces region.