Skip to content

Commit 460e96f

Browse files
add schema instructions to contributing
1 parent 3279f2c commit 460e96f

File tree

1 file changed

+18
-14
lines changed

1 file changed

+18
-14
lines changed

contributing.md

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ If you want to jump in and help out, here's the best way to get started
66

77
## Prerequisites
88

9-
* [docker](https://www.docker.com/get-started/)
10-
* [golang](https://go.dev/)
11-
* [terraform 1.* and onwards](https://www.terraform.io/)
12-
* make
13-
* Windows: http://gnuwin32.sourceforge.net/packages/make.htm
14-
* OSX: `brew install make`
15-
* Debian/Ubuntu: `apt-get make`
16-
* [minikube](https://minikube.sigs.k8s.io/docs/start/) (for testing)
9+
- [docker](https://www.docker.com/get-started/)
10+
- [golang](https://go.dev/)
11+
- [terraform 1.\* and onwards](https://www.terraform.io/)
12+
- make
13+
- Windows: http://gnuwin32.sourceforge.net/packages/make.htm
14+
- OSX: `brew install make`
15+
- Debian/Ubuntu: `apt-get make`
16+
- [minikube](https://minikube.sigs.k8s.io/docs/start/) (for testing)
1717

18-
## Package dependencies
18+
## Package dependencies
1919

2020
```console
2121
make init
@@ -31,7 +31,6 @@ make build
3131

3232
### Unit Tests
3333

34-
3534
```console
3635
make test
3736
```
@@ -55,17 +54,22 @@ or
5554

5655
```console
5756
make set-local
58-
make build
59-
terraform -chdir=examples/resources/minikube_cluster apply
57+
make build
58+
terraform -chdir=examples/resources/minikube_cluster apply
6059
```
6160

61+
## Regenerating Schema
62+
63+
[schema_cluster.go](./minikube/schema_cluster.go) is generated via the `make schema` command which will use the output of your currently installed minikube version i.e. `minikube --help` to generate the terraform schema.
64+
65+
There are a few cases where the cli output doesn't map well to terraform. In these cases, we specify overrides in [schema_builder.go](./minikube/generator/schema_builder.go) to make sure the parameters make sense in the context of terraform
66+
6267
## Debugging via vscode
6368

6469
### Attaching to the terraform provider binary
6570

6671
To debug your terraform provider, run the `Debug Terraform Provider` vscode task. This will then output an environment variable that you will need to set in a new shell like so
6772

68-
6973
```console
7074
export TF_REATTACH_PROVIDERS='*output from vscode debug session'
7175
make set-local
@@ -87,4 +91,4 @@ reflected in their generated counter parts
8791

8892
```console
8993
make configure
90-
```
94+
```

0 commit comments

Comments
 (0)