TA-002-P · Question #234
What resource dependency information is stored in Terraform's state?
The correct answer is B. Both implicit and explicit dependencies are stored in state. Terraform state captures all dependency information, both implicit and explicit. One purpose for state is to determine the proper order to destroy resources. When resources are created all of their dependency information is stored in the state. If you destroy a resource with…
Question
What resource dependency information is stored in Terraform's state?
Options
- AOnly implicit dependencies are stored in state.
- BBoth implicit and explicit dependencies are stored in state.
- COnly explicit dependencies are stored in state.
- DNo dependency information is stored in state.
How the community answered
(27 responses)- A4% (1)
- B89% (24)
- D7% (2)
Explanation
Terraform state captures all dependency information, both implicit and explicit. One purpose for state is to determine the proper order to destroy resources. When resources are created all of their dependency information is stored in the state. If you destroy a resource with dependencies, Terraform can still determine the correct destroy order for all other resources because the dependencies are stored in the state.
Topics
Community Discussion
No community discussion yet for this question.