From 5d640292754980d18bc139ceef15317638b6b090 Mon Sep 17 00:00:00 2001 From: James Bardin Date: Thu, 28 May 2020 16:17:01 -0400 Subject: [PATCH] depends_on doc updates Update depends_on for modules and data sources. --- website/docs/configuration/data-sources.html.md | 14 ++------------ website/docs/configuration/modules.html.md | 10 +++++++--- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/website/docs/configuration/data-sources.html.md b/website/docs/configuration/data-sources.html.md index 1121b2167..8a650c340 100644 --- a/website/docs/configuration/data-sources.html.md +++ b/website/docs/configuration/data-sources.html.md @@ -114,18 +114,8 @@ operation, and is re-calculated each time a new plan is created. Data resources have the same dependency resolution behavior [as defined for managed resources](./resources.html#resource-dependencies). - -In particular, the `depends_on` meta-argument is also available within `data` -blocks, with the same meaning and syntax as in `resource` blocks. - -However, due to the data resource behavior of deferring the read until the -apply phase when depending on values that are not yet known, using `depends_on` -with data resources will force the read to _always_ be deferred to the apply -phase, and therefore a configuration that uses `depends_on` with a data -resource can never converge. - -Due to this behavior, we do not recommend using `depends_on` with data -resources. +Setting the `depends_on` meta-argument within `data` blocks defers reading of +the data source until after all changes to the dependencies have been applied. ## Multiple Resource Instances diff --git a/website/docs/configuration/modules.html.md b/website/docs/configuration/modules.html.md index 9628d1900..94bd2e3bd 100644 --- a/website/docs/configuration/modules.html.md +++ b/website/docs/configuration/modules.html.md @@ -158,9 +158,13 @@ described in more detail in other sections: If not specified, the child module inherits all of the default (un-aliased) provider configurations from the calling module. -In addition to the above, the argument names `depends_on` and -`lifecycle` are not currently used by Terraform but are reserved for planned -future features. +* `depends_on` - (Optional) Create explicit dependencies between the entire + module and the listed targets. This will delay the final evaluation of the + module, and any sub-modules, until after the dependencies have been applied. + Modules have the same dependency resolution behavior [as defined for managed resources](./resources.html#resource-dependencies). + +In addition to the above, the `lifecycle` argument is not currently used by +Terraform but is reserved for planned future features. Since modules are a complex feature in their own right, further detail about how modules can be used, created, and published is included in