importer

package
v3.116.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Null = &model.Variable{
	Name:         "null",
	VariableType: model.NoneType,
}

Null represents Pulumi HCL2's `null` variable.

Functions

func GenerateHCL2Definition

func GenerateHCL2Definition(loader schema.Loader, state *resource.State, names NameTable) (*model.Block, error)

GenerateHCL2Definition generates a Pulumi HCL2 definition for a given resource.

func GenerateLanguageDefinitions

func GenerateLanguageDefinitions(w io.Writer, loader schema.Loader, gen LanguageGenerator, states []*resource.State,
	names NameTable,
) error

GenerateLanguageDefintions generates a list of resource definitions from the given resource states.

Types

type DiagnosticsError

type DiagnosticsError struct {
	// contains filtered or unexported fields
}

A DiagnosticsError captures HCL2 diagnostics.

func (*DiagnosticsError) Diagnostics

func (e *DiagnosticsError) Diagnostics() hcl.Diagnostics

func (*DiagnosticsError) Error

func (e *DiagnosticsError) Error() string

func (*DiagnosticsError) NewDiagnosticWriter

func (e *DiagnosticsError) NewDiagnosticWriter(w io.Writer, width uint, color bool) hcl.DiagnosticWriter

NewDiagnosticWriter returns an hcl.DiagnosticWriter that can be used to render the error's diagnostics.

func (*DiagnosticsError) String

func (e *DiagnosticsError) String() string

type LanguageGenerator

type LanguageGenerator func(w io.Writer, p *pcl.Program) error

A LangaugeGenerator generates code for a given Pulumi program to an io.Writer.

type NameTable

type NameTable map[resource.URN]string

A NameTable maps URNs to language-specific variable names.

Jump to

Keyboard shortcuts

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