converter

package
v1.7.7-integrations Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConverted = func(file *hcl.File, inputVariables VariableMap) (model.Document, error) {
	inputVarMap = inputVariables
	c := converter{bytes: file.Bytes}
	body, err := c.convertBody(file.Body.(*hclsyntax.Body), 0)

	if err != nil {
		sentryReport.ReportSentry(&sentryReport.Report{
			Location: "var DefaultConverted",
			Err:      err,
			Kind:     model.KindTerraform,
			Message:  "Failed to convert body in terraform parser",
		}, false)
		if er, ok := err.(*hcl.Diagnostic); ok && er.Subject != nil {
			return nil, err
		}

		return nil, err
	}

	return body, nil
}

DefaultConverted an hcl File to a toJson serializable object This assumes that the body is a hclsyntax.Body

Functions

This section is empty.

Types

type VariableMap added in v1.4.7

type VariableMap map[string]cty.Value

VariableMap represents a set of terraform input variables

Jump to

Keyboard shortcuts

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