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

backend init defaults and inputs #20480

Merged
merged 3 commits into from
Feb 26, 2019
Merged

backend init defaults and inputs #20480

merged 3 commits into from
Feb 26, 2019

Conversation

jbardin
Copy link
Member

@jbardin jbardin commented Feb 26, 2019

  • Change backend.ValidateConfig to PrepareConfig

This mirrors the change made for providers, so that default values can
be inserted into the config by the backend implementation. PrepareConfig
looks up any defaults and insert them into the config value before
validating and returning the config.

Fixes #19249

Related to #19256, but does not create a new config.Body for decoding. Currently, the PrepareConfig call (nee ValidateConfig) will fail its own validation at this point before we have the complete config to merge with the original body.

Fixing how config bodies are merged and decoded could possibly deal with future backend implementations that don't fully validate, but for now we would only be gaining an extra diagnostic with the line number of the backend block with the missing attribute[s].

This mirrors the change made for providers, so that default values can
be inserted into the config by the backend implementation. This is only
the interface and method name changes, it does not yet add any default
values.
Lookup any defaults and insert them into the config value before
validation.
@jbardin jbardin requested a review from a team February 26, 2019 17:43
@jbardin jbardin merged commit f43b87a into master Feb 26, 2019
@jbardin jbardin deleted the jbardin/backend-init branch February 26, 2019 20:04
@ghost
Copy link

ghost commented Mar 29, 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 Mar 29, 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.

Terraform init -backend-config params not used in 0.12.0-alpha2
2 participants