-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Atlantis plan with terraform 1.4.0 returns zero output when nothing is changed #3200
Comments
This is an intentional change in terraform 1.4.0
If you have specified a different terraform version in Atlantis, it may be that you are also affected by #3199 where latest seems to be always used. |
Based on hashicorp/terraform#32815, hashicorp/terraform#32822 seems to have a fix |
Maybe Atlantis should use something else to see if the plan had any changes, whether that's returning a generic message if there's no diff and / or if the exit code shows no changes, or chomp off that trailing newline at least and use that to figure out if there are changes? It does look like the CLI will exit 0 if no changes, or non-zero otherwise if |
Thanks for adding those tickets. Hopefully this will be released soon in 1.4.1. We currently use a set of regex to determine no changes if I recall correctly. Perhaps using the exit code would work. Unsure how that exit code has changed across different terraform versions though. |
I don't remember exactly, but had the zip of 0.12 locally, and that's got the same info:
So I'm guessing that goes relatively far back, and is probably as stable or more stable than looking at the output. |
Does 1.4.1 fix this issue? Let's see if that fixes it before looking into the exit code |
Confirmed 1.4.1 resolves the issue |
Thank you! |
Community Note
Overview of the Issue
Atlantis plan doesn't seem to pick up the last line of plan output which contains info about nothing being changed.
Reproduction Steps
Logs
Environment details
Additional Context
The text was updated successfully, but these errors were encountered: