Merge pull request #25069 from hashicorp/jbardin/depends-on-docs
depends_on doc updates
This commit is contained in:
commit
866449a78a
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue