Help us shape the future of Go! Take the 2026 Go Developer Survey

jsonconfig

package
v0.30.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package jsonconfig implements methods for outputting a configuration snapshot in machine-readable json format

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

func Marshal(c *configs.Config, schemas *tofu.Schemas) ([]byte, error)

Marshal returns the json encoding of tofu configuration.

func MarshalSingleModule

func MarshalSingleModule(m *configs.Module) ([]byte, error)

MarshalSingleModule is a variant of Marshal that describes only a single module, without any references to its child modules or associated provider schemas.

This uses only a subset of the typical configuration representation, due to schema and child module information being unavailable:

  • Module calls omit the "module" property that would normally describe the content of the child module.
  • Resource descriptions omit the "schema_version" property because no schema-based information is included.
  • Expression-related properties are omitted in all cases. Technically only expressions passed to providers _need_ to be omitted, but for now we just consistently omit all of them because that's an easier rule to explain and avoids exposing what is and is not provider-based so that we could potentially change those details in future.

Types

This section is empty.

Jump to

Keyboard shortcuts

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