You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _about/CONTRIBUTING.md
+23-21Lines changed: 23 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ If you want to learn more about developing a Terraform provider, please refer to
10
10
11
11
[Install](https://go.dev/doc/install) the version of Golang as indicated in the [go.mod](../go.mod) file.
12
12
13
-
1. Fork this repo
13
+
2. Fork this repo
14
14
15
15
[Fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo) the provider repository and clone it on your computer.
16
16
@@ -23,7 +23,7 @@ If you want to learn more about developing a Terraform provider, please refer to
23
23
24
24
From now on, we are going to assume that you have a copy of the repository on your computer and work within the `terraform-provider-kubernetes` directory.
25
25
26
-
1. Prepare a Kubernetes Cluster
26
+
3. Prepare a Kubernetes Cluster
27
27
28
28
While our preference is to use [KinD](https://kind.sigs.k8s.io/) for setting up a Kubernetes cluster for development and test purposes, feel free to opt for the solution that best suits your preferences. Please bear in mind that some acceptance tests might require specific cluster settings, which we maintain in the KinD [configuration file](../.github/config/acceptance_tests_kind_config.yaml).
29
29
@@ -55,30 +55,32 @@ If you want to learn more about developing a Terraform provider, please refer to
55
55
This quick guide covers best practices for adding a new Resource.
56
56
57
57
1. Ensure all dependncies are installed.
58
-
1. Add an SDK Client.
59
-
1. Add Resource Schema and define attributes [see Kubernetes Documentation](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs). A best and recommended practice is reuse constants from the Kuberentes packages as a default value in an attribute or within a validation function.
60
-
1. Scaffold an empty/new resource.
61
-
1. Add Acceptance Tests(s) for the resource.
62
-
1. Run Acceptance Tests(s) for this resource.
63
-
1. Add Documentation for this resource by editing the `.md.tmpl` file to include the appropriate [Data Fields](https://pkg.go.dev/text/template) and executing `tfplugindocs generate` command [see Terraform PluginDocs](https://github.com/hashicorp/terraform-plugin-docs#data-fields) then inspecting the corresponding `.md` file in the `/docs` to see all changes. The Data Fields that are currently apart of the templates are those for the Schema ({{ .SchemaMarkdown }}), Name ({{ .Name }}) and ({{ .Description }}).
64
-
1. Execute `make docs-lint` and `make tests-lint` commands
65
-
1. Create a Pull Request for your changes.
58
+
2. Add an SDK Client.
59
+
3. Add Resource Schema and define attributes [see Kubernetes Documentation](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs). A best and recommended practice is reuse constants from the Kuberentes packages as a default value in an attribute or within a validation function.
60
+
4. Scaffold an empty/new resource.
61
+
5. Add Acceptance Tests(s) for the resource.
62
+
6. Run Acceptance Tests(s) for this resource.
63
+
7. Add documentation for this resource in the appropriate `docs/resources/<TYPE>_<VERSION>.go.md` file.
64
+
<!-- 7. Add Documentation for this resource by editing the `.md.tmpl` file to include the appropriate [Data Fields](https://pkg.go.dev/text/template) and executing `tfplugindocs generate` command [see Terraform PluginDocs](https://github.com/hashicorp/terraform-plugin-docs#data-fields) then inspecting the corresponding `.md` file in the `/docs` to see all changes. The Data Fields that are currently apart of the templates are those for the Schema ({{ .SchemaMarkdown }}), Name ({{ .Name }}) and ({{ .Description }}). -->
65
+
8. Execute `make docs-lint` and `make tests-lint` commands
66
+
9. Create a Pull Request for your changes.
66
67
67
68
### Adding a New Data Source
68
69
69
70
1. Ensure all dependncies are installed.
70
-
1. Add an SDK Client.
71
-
1. Add Data Source Schema and define attributes [see Kubernetes Documentation](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs).
71
+
2. Add an SDK Client.
72
+
3. Add Data Source Schema and define attributes [see Kubernetes Documentation](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs).
72
73
A best and recommended practice is reuse constants from the Kuberentes packages as a default value in an attribute or within a validation function.
73
-
1. Scaffold an empty/new resource.
74
-
1. Add Acceptance Tests(s) for the data source.
75
-
1. Run Acceptance Tests(s) for this data source.
76
-
1. Add Documentation for this data source by editing the `.md.tmpl` file to include the appropriate [Data Fields](https://pkg.go.dev/text/template) and executing `tfplugindocs generate` command [see Terraform PluginDocs](https://github.com/hashicorp/terraform-plugin-docs#data-fields) then inspecting the corresponding `.md` file in the `/docs` to see all changes. The Data Fields that are currently apart of the templates are those for the Schema ({{ .SchemaMarkdown }}), Name ({{ .Name }}) and ({{ .Description }}).
77
-
1. Execute `make docs-lint` and `make tests-lint` commands
78
-
1. Create a Pull Request for your changes.
79
-
80
-
### Adding/Editing Documentation
81
-
All Documentation is edited in the `.md.tmpl` file. Please note that the `tfplugindocs generate` command should be executed to ensure it is updated and reflected in the `.md` files.
74
+
4. Scaffold an empty/new resource.
75
+
5. Add Acceptance Tests(s) for the data source.
76
+
6. Run Acceptance Tests(s) for this data source.
77
+
7. Add documentation for this data source in the appropriate `docs/data-sources/<TYPE>_<VERSION>.md` file.
78
+
<!-- 7. Add Documentation for this data source by editing the `.md.tmpl` file to include the appropriate [Data Fields](https://pkg.go.dev/text/template) and executing `tfplugindocs generate` command [see Terraform PluginDocs](https://github.com/hashicorp/terraform-plugin-docs#data-fields) then inspecting the corresponding `.md` file in the `/docs` to see all changes. The Data Fields that are currently apart of the templates are those for the Schema ({{ .SchemaMarkdown }}), Name ({{ .Name }}) and ({{ .Description }}). -->
79
+
8. Execute `make docs-lint` and `make tests-lint` commands
80
+
9. Create a Pull Request for your changes.
81
+
82
+
<!-- ### Adding/Editing Documentation
83
+
All Documentation is edited in the `.md.tmpl` file. Please note that the `tfplugindocs generate` command should be executed to ensure it is updated and reflected in the `.md` files. -->
0 commit comments