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

core: don't prompt for variables with defaults #2613

Merged
merged 1 commit into from
Jul 2, 2015
Merged

Conversation

phinze
Copy link
Contributor

@phinze phinze commented Jul 2, 2015

In helper/schema we already makes a distinction between Default
which is always applied and InputDefault which is displayed to the
user for an empty field.

But for variables we just have Default which is treated like
InputDefault. This changes it to not prompt the user for a value
when the variable declaration includes a default.

Treating this as a UX bugfix and the "don't prompt for variables w/
defaults set" behavior as the originally expected behavior we were
failing to honor.

Added an already-passing test to verify and cover the helper/schema
behavior.

Perhaps down the road we can add a input_default attribute to
variables to allow similar behavior to helper/schema in variables, but
for now just sticking with the fix.

Fixes #2592

In `helper/schema` we already makes a distinction between `Default`
which is always applied and `InputDefault` which is displayed to the
user for an empty field.

But for variables we just have `Default` which is treated like
`InputDefault`. This changes it to _not_ prompt the user for a value
when the variable declaration includes a default.

Treating this as a UX bugfix and the "don't prompt for variables w/
defaults set" behavior as the originally expected behavior we were
failing to honor.

Added an already-passing test to verify and cover the `helper/schema`
behavior.

Perhaps down the road we can add a `input_default` attribute to
variables to allow similar behavior to `helper/schema` in variables, but
for now just sticking with the fix.

Fixes #2592
@mitchellh
Copy link
Contributor

LGTM

phinze added a commit that referenced this pull request Jul 2, 2015
core: don't prompt for variables with defaults
@phinze phinze merged commit 9de673b into master Jul 2, 2015
@phinze phinze deleted the b-input-var-default branch July 2, 2015 18:12
@ghost
Copy link

ghost commented May 1, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators May 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TF 0.6: prompting for values even though default is defined
2 participants