Skip to content

Commit e227023

Browse files
author
Paddy
authored
Merge pull request #20 from hashicorp/paddy_godoc
Add documentation.
2 parents 1c9b693 + fae49e2 commit e227023

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+2131
-139
lines changed

.github/CONTRIBUTING.md

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
# Contributing to terraform-plugin-go
2+
3+
**First:** if you're unsure or afraid of _anything_, just ask
4+
or submit the issue describing the problem you're aiming to solve.
5+
6+
Any bug fix or feature has to be considered in the context of the wider
7+
Terraform ecosystem. This is great, as your contribution can have a big
8+
positive impact, but we have to assess potential negative impact too (e.g.
9+
breaking existing providers which may not use a new feature).
10+
11+
To provide some safety to the wider provider ecosystem, we strictly follow
12+
[semantic versioning](https://semver.org/) and any changes that we consider
13+
breaking changes will only be released as part of major releases. **Note:**
14+
while we're on v0, breaking changes will be accepted during minor releases.
15+
16+
## Table of Contents
17+
18+
- [I just have a question](#i-just-have-a-question)
19+
- [I want to report a vulnerability](#i-want-to-report-a-vulnerability)
20+
- [New Issue](#new-issue)
21+
- [New Pull Request](#new-pull-request)
22+
23+
## I just have a question
24+
25+
> **Note:** We use GitHub for tracking bugs and feature requests related to
26+
> terraform-plugin-go.
27+
28+
For questions, please see relevant channels at
29+
https://www.terraform.io/community.html
30+
31+
## I want to report a vulnerability
32+
33+
Please disclose security vulnerabilities responsibly by following the procedure
34+
described at https://www.hashicorp.com/security#vulnerability-reporting
35+
36+
## New Issue
37+
38+
We welcome issues of all kinds, including feature requests, bug reports, or
39+
documentation suggestions. Below are guidelines for well-formed issues of each
40+
type.
41+
42+
### Bug Reports
43+
44+
- [ ] **Test against latest release**: Make sure you test against the latest
45+
avaiable version of both Terraform and terraform-plugin-go. It is possible
46+
we already fixed the bug you're experiencing.
47+
48+
- [ ] **Search for duplicates**: It's helpful to keep bug reports consolidated
49+
to one thread, so do a quick search on existing bug reports to check if
50+
anybody else has reported the same thing. You can scope searches by the
51+
label `bug` to help narrow things down.
52+
53+
- [ ] **Include steps to reproduce**: Provide steps to reproduce the issue,
54+
along with code examples (both HCL and Go, where applicable) and/or real
55+
code, so we can try to reproduce it. Without this, it makes it much harder
56+
(sometimes impossible) to fix the issue.
57+
58+
### Feature Requests
59+
60+
- [ ] **Search for possible duplicate requests**: It's helpful to keep
61+
requests consolidated to one thread, so do a quick search on existing
62+
requests to check if anybody else has requested the same thing. You can
63+
scope searches by the label `enhancement` to help narrow things down.
64+
65+
- [ ] **Include a use case description**: In addition to describing the
66+
behavior of the feature you'd like to see added, it's helpful to also lay
67+
out the reason why the feature would be important and how it would benefit
68+
the wider Terraform ecosystem. A use case in the context of 1 provider is
69+
good, a use case in the context of many providers is better.
70+
71+
### Documentation Suggestions
72+
73+
- [ ] **Search for possible duplicate suggestions**: It's helpful to keep
74+
suggestions consolidated to one thread, so do a quick search on existing
75+
issues to check if anybody else has suggested the same thing. You can scope
76+
searches by the label `documentation` to help narrow things down.
77+
78+
- [ ] **Describe the questions you're hoping the documentation will answer**:
79+
It's very helpful when writing documentation to have specific questions like
80+
"what is required of the response to ApplyResourceChange?" in mind. This
81+
helps us ensure the documentation is targeted, specific, and framed in a
82+
useful way.
83+
84+
## New Pull Request
85+
86+
Thank you for contributing!
87+
88+
We are happy to review pull requests without associated issues, but we highly
89+
recommend starting by describing and discussing your problem or feature and
90+
attaching use cases to an issue first before raising a pull request.
91+
92+
- [ ] **Early validation of idea and implementation plan**: terraform-plugin-go
93+
is complicated enough that there are often several ways to implement
94+
something, each of which has different implications and tradeoffs. Working
95+
through a plan of attack with the team before you dive into implementation
96+
will help ensure that you're working in the right direction.
97+
98+
- [ ] **Unit Tests**: It may go without saying, but every new patch should be
99+
covered by tests wherever possible.
100+
101+
- [ ] **Integration Tests**: Not all tests are appropriate to surface as unit
102+
tests. We use
103+
[`terraform-provider-corner`](https://github.com/hashicorp/terraform-provider-corner)
104+
to gather use cases that get run as part of our test suite. These real-world
105+
test cases are run by an actual Terraform binary and help us verify that
106+
end-to-end behavior as observed by users is retained. We encourage
107+
contributors to add test cases to `terraform-provider-corner` when
108+
contributing new features or submitting bug fixes. We love to see links to
109+
`terraform-provider-corner` PRs from `terraform-plugin-go` PRs.
110+
111+
- [ ] **Go Modules**: We use [Go
112+
Modules](https://github.com/golang/go/wiki/Modules) to manage and version all
113+
our dependencies. Please make sure that you reflect dependency changes in
114+
your pull requests appropriately (e.g. `go get`, `go mod tidy` or other
115+
commands). Where possible it is better to raise a separate pull request with
116+
just dependency changes as it's easier to review such PR(s).
117+
118+
### Cosmetic changes, code formatting, and typos
119+
120+
In general we do not accept PRs containing only the following changes:
121+
122+
- Correcting spelling or typos
123+
- Code formatting, including whitespace
124+
- Other cosmetic changes that do not affect functionality
125+
126+
While we appreciate the effort that goes into preparing PRs, there is always a
127+
tradeoff between benefit and cost. The costs involved in accepting such
128+
contributions include the time taken for thorough review, the noise created in
129+
the git history, and the increased number of GitHub notifications that
130+
maintainers must attend to.
131+
132+
#### Exceptions
133+
134+
We belive that one should "leave the campsite cleaner than you found it", so
135+
you are welcome to clean up cosmetic issues in the neighbourhood when
136+
submitting a patch that makes functional changes or fixes.
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
name: 🐛 Bug report
3+
about: Let us know about an unexpected error, a crash, or an incorrect behavior.
4+
labels: bug
5+
---
6+
7+
### terraform-plugin-go version
8+
<!---
9+
Inspect your go.mod as below to find the version, and paste the result between
10+
the ``` marks below.
11+
12+
go mod edit -json | jq '.Require[] | select(.Path=="github.com/hashicorp/terraform-plugin-go")'
13+
14+
If you are not running the latest version of terraform-plugin-go, please try
15+
upgrading because your bug may have already been fixed.
16+
-->
17+
18+
```
19+
insert version here
20+
```
21+
22+
### Relevant provider source code
23+
24+
<!--
25+
Paste any Go code that you believe to be relevant to the bug
26+
When in doubt, a minimal reproduction is best
27+
-->
28+
```go
29+
30+
// insert code here
31+
32+
```
33+
34+
### Terraform Configuration Files
35+
<!--
36+
Paste the relevant parts of your Terraform configuration between the ``` marks below.
37+
-->
38+
39+
```tf
40+
# insert config here
41+
```
42+
43+
44+
### Expected Behavior
45+
<!--
46+
What should have happened?
47+
-->
48+
49+
### Actual Behavior
50+
<!--
51+
What actually happened?
52+
-->
53+
54+
### Steps to Reproduce
55+
<!--
56+
Please list the full steps required to reproduce the issue, for example:
57+
1. `terraform init`
58+
2. `terraform apply`
59+
-->
60+
61+
### References
62+
<!--
63+
Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here? For example:
64+
65+
- #6017
66+
-->

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Terraform Language or Workflow Feedback and Questions
4+
url: https://github.com/hashicorp/terraform/issues/new/choose
5+
about: Terraform Core has its own repository, any language (HCL) or workflow related issues or questions should be directed there.
6+
- name: Terraform Plugin SDK Feedback
7+
url: https://github.com/hashicorp/terraform-plugin-sdk/issues/new/choose
8+
about: The Terraform Plugin SDK has its own repository, any feedback related to the SDK should be directed there.
9+
- name: ❓ Provider Development Questions
10+
url: https://discuss.hashicorp.com/c/terraform-providers/tf-plugin-sdk
11+
about: Please ask and answer questions about provider development through the Plugin SDK Community Forum.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
name: Documentation suggestion
3+
about: Suggest new documentation or an enhancement to existing documentation.
4+
labels: documentation
5+
---
6+
7+
### Does this documenation exist?
8+
9+
* [ ] This is new documentation
10+
* [ ] This is an enhancement to existing documentation
11+
12+
### Where would you expect to find this documentation?
13+
14+
* [ ] On terraform.io
15+
* [ ] In the GoDoc for this module
16+
* [ ] In this repo as a markdown file
17+
* [ ] Somewhere else
18+
19+
#### Details
20+
21+
<!---
22+
Please supply as much information about where you'd expect to find this
23+
documentation as possible. Specific functions or variables you would look for
24+
the GoDoc, specific pages or sections of terraform.io, etc.
25+
-->
26+
27+
### Description
28+
<!---
29+
Describe the documentation you were looking for or are proposing. What
30+
questions would it answer? What would it help users do? Who is the intended
31+
audience? What bugs, misunderstandings, or confusion would it prevent?
32+
Specific, concrete examples help us understand the desired impact you're going
33+
for.
34+
-->
35+
36+
### References
37+
<!--
38+
Are there any other GitHub issues, whether open or closed, that are related to
39+
the documentation you're suggesting? If so, please create a list below that
40+
mentions each of them. For example:
41+
42+
- #6017
43+
-->
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
name: Feature request
3+
about: Suggest a new feature or other enhancement.
4+
labels: enhancement
5+
---
6+
7+
### SDK version
8+
<!--
9+
Inspect your go.mod as below to find the version, and paste the result between the ``` marks below.
10+
11+
go mod edit -json | jq '.Require[] | select(.Path=="github.com/hashicorp/terraform-plugin-go")'
12+
13+
If you are not running the latest version of terraform-plugin-go, please try
14+
upgrading because your feature may have already been implemented.
15+
-->
16+
```
17+
insert version here
18+
```
19+
20+
### Use cases
21+
<!---
22+
In order to properly evaluate a feature request, it is necessary to understand
23+
the use cases for it. Please describe below the _end goal_ you are trying to
24+
achieve that has led you to request this feature. Please keep this section
25+
focused on the problem and not on the suggested solution. We'll get to that in
26+
a moment, below!
27+
-->
28+
29+
### Attempted solutions
30+
<!---
31+
If you've already tried to solve the problem within terraform-plugin-go's
32+
existing features and found a limitation that prevented you from succeeding,
33+
please describe it below in as much detail as possible.
34+
35+
Ideally, this would include real HCL configuration that you tried, real
36+
Terraform commands you ran, relevant snippet of code from your provider
37+
codebase and what results you got in each case.
38+
39+
Please remove any sensitive information such as passwords before sharing
40+
configuration snippets and commands.
41+
--->
42+
43+
### Proposal
44+
<!---
45+
If you have an idea for a way to address the problem via a change to
46+
terraform-plugin-go, please describe it below.
47+
48+
In this section, it's helpful to include specific examples of how what you are
49+
suggesting might look like in configuration files, on the command line, or in
50+
providers, since that allows us to understand the full picture of what you are
51+
proposing.
52+
53+
If you're not sure of some details, don't worry! When we evaluate the feature
54+
request we may suggest modifications as necessary to work within the design
55+
constraints of the Terraform ecosystem.
56+
-->
57+
58+
### References
59+
<!--
60+
Are there any other GitHub issues, whether open or closed, that are related to
61+
the problem you've described above or to the suggested solution? If so, please
62+
create a list below that mentions each of them. For example:
63+
64+
- #6017
65+
-->

0 commit comments

Comments
 (0)