-
Notifications
You must be signed in to change notification settings - Fork 69
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
Add support for --provider-schema
flag and context to generate
sub-command errors
#299
Conversation
… as a parameter.
… separate folder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 🚀 Super awesome. Just some minor wording suggestions to clarify "schema generation" to mean building the provider and calling Terraform CLI.
|
||
switch { | ||
case g.websiteTmpDir == "": | ||
g.websiteTmpDir, err = os.MkdirTemp("", "tfws") | ||
if err != nil { | ||
return err | ||
return fmt.Errorf("error creating temporary website directory: %w", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️ here and below
Co-authored-by: Brian Flad <[email protected]>
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
What?
--provider-schema
argument to pass in a providers schema JSON file. This allowstfplugindocs
to skip schema generation by building the provider and running theterraform providers schema -json
command.schema-json
tests equivalents to existing acceptance testsg.providerName
instead of passing provider name in as a parametergenerate.go
Why?
The new flag simplifies acceptance testing writing and maintenance by eliminating the need include provider source code in
.txtar
files.