Skip to content

Commit

Permalink
implement terraform support (#8)
Browse files Browse the repository at this point in the history
* implement terraform support

* close file

* use yaml matcher

* consolidate cmd flags

* document tf cmd behaviour

* refactor file finders

* remove unnecessary lines

* add more tests

* refactor crd command to use util functions where possible

* fix crd template compilation

* fix terraform templating
- add the raw flag for when only OpenAPI spec is required
- remove implicit assumption on the use of flags
- simplify the code

* combine common parts of the code across terraform and crds

* more cleanup

* further cleanup to the code

* combine more of similar code into one place

---------

Co-authored-by: Nima Kaviani <[email protected]>
  • Loading branch information
nabuskey and nimakaviani authored Sep 5, 2023
1 parent 0aa9181 commit bc321d9
Show file tree
Hide file tree
Showing 28 changed files with 1,779 additions and 349 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
cnoe*
go.sum
.vscode
19 changes: 14 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,22 @@ go 1.19
require (
github.com/fatih/color v1.15.0
github.com/hashicorp/go-multierror v1.1.1
github.com/hashicorp/terraform-config-inspect v0.0.0-20230614215431-f32df32a01cd
github.com/itchyny/gojq v0.12.13
github.com/maxbrunsfeld/counterfeiter/v6 v6.6.2
github.com/onsi/ginkgo/v2 v2.9.7
github.com/onsi/gomega v1.27.8
github.com/spf13/cobra v1.7.0
gopkg.in/yaml.v3 v3.0.1
k8s.io/api v0.27.3
k8s.io/apimachinery v0.27.3
k8s.io/client-go v0.27.3
k8s.io/api v0.27.4
k8s.io/apimachinery v0.27.4
k8s.io/client-go v0.27.4
sigs.k8s.io/yaml v1.3.0
)

require (
github.com/agext/levenshtein v1.2.2 // indirect
github.com/apparentlymart/go-textseg v1.0.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
github.com/go-logr/logr v1.2.4 // indirect
Expand All @@ -31,17 +36,22 @@ require (
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/hcl v0.0.0-20170504190234-a4b07c25de5f // indirect
github.com/hashicorp/hcl/v2 v2.0.0 // indirect
github.com/imdario/mergo v0.3.6 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/itchyny/timefmt-go v0.1.5 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.17 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mitchellh/go-wordwrap v1.0.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/zclconf/go-cty v1.1.0 // indirect
golang.org/x/mod v0.11.0 // indirect
golang.org/x/net v0.11.0 // indirect
golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect
Expand All @@ -59,5 +69,4 @@ require (
k8s.io/utils v0.0.0-20230209194617-a36077c30491 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)
1 change: 1 addition & 0 deletions hack/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

set -e -x -u

go mod tidy
# go test ./...
go fmt ./cmd/... ./pkg/...

Expand Down
Loading

0 comments on commit bc321d9

Please sign in to comment.