How can I use a resource in root from a file in module

Hi ,

I am having a resource in my root . I want to use this resource in one of the module .
How can I call that resource in the root from the file inside the module ?

Jithin Babu

Hi @jithinbabu657,

You can pass data from your root module to your child module using input variables. I’m not sure what else to say without some more details about your goals, but hopefully you can try to address your goals using input variables and then, if you run into more specific questions along the way, we can discuss them further!

1 Like

Hi @apparentlymart
Thank you for the response .
I am trying to implement terraform for PagerDuty . I am having a in root and a “pagerduty_user” resource inside it . I want to use this resource in a module called pager-duty .How can I do that ?

I got it , I defined the input variable in the module and passed this variable in the module definition .