Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

terragen txtar archive #3

Merged
merged 2 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
153 changes: 0 additions & 153 deletions cmd/tools/filtersb/cli.go

This file was deleted.

3 changes: 1 addition & 2 deletions pkg/internal/terrajen/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ type ProviderGenerator struct {
// E.g. github.com/golingon/lingon/gen/aws
GoProviderPkgPath string
// GeneratedPackageLocation is the directory on the filesystem where the
// generated
// Go files will be created.
// generated Go files will be created.
// The GoProviderPkgPath path must match the location of the generated files
// so that they can be imported correctly.
// E.g. if we are in a Go module called "my-module" and we generate the
Expand Down
7 changes: 7 additions & 0 deletions pkg/internal/terrajen/subpkg.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ import (
"github.com/veggiemonk/strcase"
)

// SubPkgFile generates a Go file for the given schema.
// The schema should represent a sub-package or be the sub-types of a top-level
// provider/resource/data source.
//
// For example, the AWS provider has a top-level provider config, with many
// nested subtypes.
// SubPkgFile would generate a file containing all the subtypes.
func SubPkgFile(s *Schema) (*jen.File, bool) {
// Skip sub pkg if there are no blocks to render
if s.graph.isEmpty() {
Expand Down
Loading