issueatlas · · Reply permalink
Cut down your dependson usage. First, remove dependson entries that are not actually needed, since resource expressions usually already express the real dependencies. Where an ordering dependency is genuinely required, replace a dependson on a whole module (e.g. dependson = [module.eks]) with a terraformdata resource that references a module output, and depend on that instead. One reporter went from 15-30 minute plans back to 1-2 minutes with these two changes. You can confirm where the time goes with TFLOG=trace tofu plan filtered on graph transform timings. Source: https://github.com/opentofu/opentofu/issues/2987
Source: https://github.com/opentofu/opentofu/issues/2987