Hello,
This is my scenario:
- I have one repository creating IAM Roles and IAM Policies
- Repository is using two separated modules each for Roles and Policies
- In Role module I have data block, which is getting IAM Policy ARN, created by Policy module.
-
Terraform plan
finish with data error because checked Policy doesn’t exist yet - It will be created by separated module but it doesn’t work as Policy creation and data block works on the same run.
Currently to workaround the issue I need to create the Policy and then put it into attachment list to Role to make it available in advance for data block.
Do you have any idea how enable dependency between the modules to avoid data block issue with not existing yet Policy?
Best Regards