creating directories one-at-a-time causes a plan error
BrianHicks opened this issue · 0 comments
BrianHicks commented
Given the following file:
file.directory "a" {
destination = "a"
}
file.directory "b" {
destination = "{{lookup `file.directory.a.destination`}}/b"
}
converge plan
outputs the following:
root/file.directory.a:
Messages:
Has Changes: yes
Changes:
a: "<absent>" => "<present>"
root/file.directory.b:
Error: resource cannot change because of an error
Messages:
"a" does not exist and will not be created (enable create_all to do this)
Has Changes: yes
Changes: No changes
Errors:
* root/file.directory.b: resource cannot change because of an error
Summary: 1 errors, 1 changes
But converge apply
works just fine. My suggestion: drop this message to a warning visible to the user in the same place. It's not actually an error since this configuration is acceptable. The alternative is to use create_all
everywhere, which defeats the purpose of making single directories safely.