Open gwvandesteeg opened 1 year ago
We came across something like this recently but and haven't had a chance to try to repro intentionally yet. Interesting that your example is KMS though, as ours was also.
Interesting observation..
if i run the init
on the staging
environment, it's in the correct order
13:36:49 Thu May 18 ]-[ gerwin@wash:7 ]-[ 90:100047 ]-[ develop ]-[ terraspace:staging ]
[ ~/src/infrastructure ]
$ terraspace all init -y --exit-on-fail && terraspace all plan -y --exit-on-fail
Running:
terraspace init defaults # batch 1
terraspace init foxpass # batch 2
if i run init
on the prod
environment we get the reported issue.
Staging has had all the changes already applied, prod has not yet.
The problem seems to be that something is causing the tfvars files to not get generated.
Checklist
My Environment
Expected Behaviour
Expected behaviour is for the defaults stack to be at batch level one, and the foxpass stack to be at batch level 2 for its dependency.
Current Behavior
Two stacks with a dependency between them are not being ordered in the graph as being dependant on each other. Observed behaviour when running
terraspace all init
(these are excerpts from the full project).Step-by-step reproduction instructions
See code samples
Code Sample
The foxpass stack has the following in the
base.tfvars
.Ouput of the
defaults
stack containsoutputs.tf
When checking the generated output from the
init
we see that there is no such file in the.terraspace-cache/.../stacks/foxpass/
for a file called1-base.auto.tfvars
Solution Suggestion
This seems indicative that there is some issue building the graph, although it works for everything else in the correct order for the other stacks in the entire project.