Skip to content
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

Inputfalse #277

Merged
merged 9 commits into from
Sep 14, 2018
Merged

Inputfalse #277

merged 9 commits into from
Sep 14, 2018

Conversation

lkysow
Copy link
Member

@lkysow lkysow commented Sep 14, 2018

From @austinorth in #276 with fixed tests

fixes #268

Motivation

Atlantis needs to fail quickly and gracefully when user input is not provided for variables that are lacking a value.

What I Did

  • Added the -input=false flag to init, plan and apply step runners. This flag is recommended by Hashicorp here.
  • Added that same flag to the corresponding test files.

Difference in Output

Before Flag Added

exit status 1: running "sh -c terraform plan -refresh -no-color -out /home/<username>/.atlantis/repos/<repo> -var atlantis_user=austinorth" in "<directory>"
var.some_variable
  Enter a value: 
var.some_variable
  Enter a value: 
var.some_variable
  Enter a value: 
var.some_variable
  Enter a value: 

Error: Error asking for user input: missing required value for "some_variable"

After Flag Added

exit status 1: running "exit status 1: running "sh -c terraform plan -input=false -refresh -no-color -out /home/<username>/.atlantis/repos/<repo> -var atlantis_user=austinorth" in "<directory>"

Error: Required variable not set: some_variable

@lkysow lkysow merged commit e8c7d81 into master Sep 14, 2018
@lkysow lkysow deleted the inputfalse branch September 14, 2018 21:47
jamengual pushed a commit that referenced this pull request Nov 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

atlantis running terraform should default to not accepting input
1 participant