providers

package
v1.218.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package providers provides a generator for Terraform provider override files.

Index

Constants

View Source
const (
	// Name is the unique identifier for this generator.
	Name = "providers"
	// DefaultFilenameConst is the default output filename for provider overrides.
	DefaultFilenameConst = "providers_override.tf.json"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

type Generator struct{}

Generator generates Terraform provider override files (providers_override.tf.json).

func (*Generator) DefaultFilename

func (g *Generator) DefaultFilename() string

DefaultFilename returns the default output filename.

func (*Generator) Generate

func (g *Generator) Generate(ctx context.Context, genCtx *generator.GeneratorContext) (map[string]any, error)

Generate produces the provider override content. The output structure wraps providers in a "provider" key as expected by Terraform.

func (*Generator) Name

func (g *Generator) Name() string

Name returns the unique identifier for this generator.

func (*Generator) ShouldGenerate

func (g *Generator) ShouldGenerate(genCtx *generator.GeneratorContext) bool

ShouldGenerate returns true if the ProvidersSection has data.

func (*Generator) Validate

func (g *Generator) Validate(genCtx *generator.GeneratorContext) error

Validate checks if the generator context has required data.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL