Closed phx-tim-butters closed 3 months ago
Hi! Interesting feedback, we will look into a solution that has module outputs that indicate when policy (set) definitions have been deployed
I am hoping the depends_on
issue will disappear soon when the language experiment unknown_instances
is fully released
We are making significant changes to the provider so will close this for now. Once the next version is released please open a new issue if still relevant.
Check for previous/existing GitHub issues
Module specific issue
Issue Type?
Feature Request
(Optional) Module Version
0.6.0
(Optional) Correlation Id
No response
Description
When deploying Greenfield with a typical ALZ policy set, I've found that the root archetype doesn't finish deploying before the lower archetypes start.
I'm in a position where I can re-produce a Policy Assignment on the Landing Zone archetype failing due to the Policy (Set) Definition not having been completed on the Root archetype yet.
On a subsequent run, the the Apply suceeds.
Having the ability to provide a dependancy on an previous module archetype would be great. At the moment I am not able to specify a Depends On based on any of the outputs from the module as the data sources within the modules are not refreshed with an explict dependancy - this causes (I believet the alz or alzlib provider) to fail a for_each lookup.
A workaround would be to specify a large delay on lower archetypes - but that would impede subsequent operations.
I have circumvented the issue by adding the following to the module to specifically force a wait for Policy Definitions to complete (basically creates a null resource output of the module that is created once policy assignments in the root have completed, therefor inferring policy definitions and sets have been completed)
main.tf
variables.tf
outputs.tf
Root.tf