-
Notifications
You must be signed in to change notification settings - Fork 13
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
First version for the provider, supports templates and variables #1
Conversation
… in go, verifying terraform outputs
ef8ea6c
to
c1fe82b
Compare
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.
Hey @shlomimatichin
So code looks good to me, albeit admittedly I could not thoroughly review this one as it is very hard to review 3K lines of code in one PR - let's not do this again.
So having said that - some general thoughts and comments on structure and tests:
- Looking at how other provider projects are structured (specifically ones with api in the same project), I would have two simply named directories at the root of the repo:
api
andprovider
. Each should have its own modules and unit tests. Under theprovider
dir, it seems like all providers common have a directory with the provider name (namelyenv0
) where the provider code will reside. - For different templates (and integration tests) - they seem to have an
examples
directory - All providers seem to have unit tests - such as https://github.com/hashicorp/terraform-provider-kubernetes/blob/master/kubernetes/data_source_kubernetes_config_map_test.go
I'm just looking at various 1st and 3rd party providers and see what the common standard is - I think our provider should try and match those.
@roni-frantchi
|
We don't dictate PR size nor content - I think splitting it up to a PR adding one general structure (like the one I had comments on), then a PR for api client, then a PR for the provider, would make perfect sense in making those very different aspects easier to review and is by no means "artificial".
From the examples I've gathered those are fairly similar. (see the example on the provided link, which isn't by Hashi)
I understand. But it does deviate from every other provider I have encountered. So please make the change.
To me those help to specify the responsibility of each component and its behavior - they help assert the chosen structure makes sense as well.
It could very well be that a bad reference was given - covering 3-4 of those helps comprehend what's common practice and should show here |
closing this, going to split to multiple smaller pull requests. |
Due to lack of bandwith in the team, we'll try to push this first and make the improvements later |
I'm gonna merge this as is, and from there I'll open other issues/PR's |
includes a test suite, plz take a look at the end of README.md for details