rake-terraform
rake-terraform copied to clipboard
Remove terraform output
Since the latest version of terraform handles Windows' plan
and apply
commands correctly, there is not need to spit out and output file any more.
I'm curious why you need this. I mean, if you're outputting to a gitignore'd directory it shouldn't make much of a difference.
It's not an unreasonable request but, to be honest, probably isn't something I'm going to get to any time soon. You might be able to hackily accomplish this my making a terraform_apply
task wherein the t.plan
is like an empty string or ./
or something.
We can leave it and have it also generate a .gitignore inside that directory similar to how Zanzibar handles the credentials file. The potential problem is that it is another moving piece that is not necessary, and if the user forgets to ignore the directory suddenly his creds are publicly available. There is no mention on the README that says the directory should be ignored.
Also now terraform has two source of truth, in the terraform directory itself and in the output directory. In theory the two should be in sync, but I have come across a case where I the tfstate on the output and the original tfstate were not the same.
Makes sense.
The security issues with plan files are well documented.
Also, it shouldn't be creating a second tfstate in the output directory - only .tf files containing plans should exist there. Can you give me repro steps that generate the second tfstate that disagrees with the main one?
Anyway, I'd certainly accept a pull request for this, but I don't personally need the feature.