How to create dependencies in acceptance test in terraform

I am creating multiple datasources. Lets say A, B C.
Data source A depends on B and B depends on C.
Hence if i am writing acceptance test for A, it needs B and C to be created.
How can i do that? Any references ?