Skip to content

Commit

Permalink
fix: code gen verification (#441)
Browse files Browse the repository at this point in the history
  • Loading branch information
eddycharly authored Dec 15, 2021
1 parent 51a4edc commit be92e16
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/data-sources/kube_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ The following arguments are supported:
- `server` - (Computed) - String - Kubernetes server url.
- `context` - (Computed) - String - Kubernetes context.
- `namespace` - (Computed) - String - Kubernetes namespace.
- `kube_user` - (Computed) - String - Kubernetes user.
- `kube_user` - (Sensitive) - (Computed) - String - Kubernetes user.
- `kube_password` - (Sensitive) - (Computed) - String - Kubernetes password.
- `ca_cert` - (Sensitive) - (Computed) - String - Kubernetes cluster certificate.
- `client_cert` - (Sensitive) - (Computed) - String - Kubernetes client certificate.
Expand Down
2 changes: 1 addition & 1 deletion hack/gen-tf-code/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ func main() {
),
generate(kube.Config{},
noSchema(),
sensitive("KubeBearerToken", "KubePassword", "CaCert", "ClientCert", "ClientKey"),
sensitive("KubeUser", "KubePassword", "CaCert", "ClientCert", "ClientKey"),
),
generate(kops.ClusterSpec{},
exclude("GossipConfig", "DNSControllerGossipConfig", "Target"),
Expand Down
3 changes: 3 additions & 0 deletions hack/gen-tf-code/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ func doc(header, footer string) func(o *options) {
}

func (o *options) verify(t reflect.Type) error {
if err := verifyFields(t, o.sensitive.List()...); err != nil {
return err
}
if err := verifyFields(t, o.exclude.List()...); err != nil {
return err
}
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion pkg/schemas/datasources/DataSource_KubeConfig.generated.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func DataSourceKubeConfig() *schema.Resource {
"server": ComputedString(),
"context": ComputedString(),
"namespace": ComputedString(),
"kube_user": ComputedString(),
"kube_user": Sensitive(ComputedString()),
"kube_password": Sensitive(ComputedString()),
"ca_cert": Sensitive(ComputedString()),
"client_cert": Sensitive(ComputedString()),
Expand Down

0 comments on commit be92e16

Please sign in to comment.