mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-26 08:51:02 -06:00
Merge pull request #31191 from IgnacioNMiranda/patch-1
docs: update depends_on.mdx meta-argument
This commit is contained in:
commit
c4d7207230
@ -14,7 +14,7 @@ Use the `depends_on` meta-argument to handle hidden resource or module dependenc
|
||||
|
||||
## Processing and Planning Consequences
|
||||
|
||||
The `depends_on` meta-argument instructs Terraform to complete all actions on the the dependency object (including Read actions) before performing actions on the object declaring the dependency. When one the dependency object is an entire module, `depends_on` affects the order in which Terraform processes all of the resources and data sources associated with that module. Refer to [Resource Dependencies](/language/resources/behavior#resource-dependencies) and [Data Resource Dependencies](/language/data-sources#data-resource-dependencies) for more details.
|
||||
The `depends_on` meta-argument instructs Terraform to complete all actions on the dependency object (including Read actions) before performing actions on the object declaring the dependency. When the dependency object is an entire module, `depends_on` affects the order in which Terraform processes all of the resources and data sources associated with that module. Refer to [Resource Dependencies](/language/resources/behavior#resource-dependencies) and [Data Resource Dependencies](/language/data-sources#data-resource-dependencies) for more details.
|
||||
|
||||
You should use `depends_on` as a last resort because it can cause Terraform to create more conservative plans that replace more resources than necessary. For example, Terraform may treat more values as unknown “(known after apply)” because it is uncertain what changes will occur on the upstream object. This is especially likely when you use `depends_on` for modules.
|
||||
|
||||
@ -70,4 +70,4 @@ resource "aws_instance" "example" {
|
||||
aws_iam_role_policy.example
|
||||
]
|
||||
}
|
||||
```
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user