github.com/opentofu/opentofu@v1.7.1/internal/command/jsonplan/module.go (about)

     1  // Copyright (c) The OpenTofu Authors
     2  // SPDX-License-Identifier: MPL-2.0
     3  // Copyright (c) 2023 HashiCorp, Inc.
     4  // SPDX-License-Identifier: MPL-2.0
     5  
     6  package jsonplan
     7  
     8  // Module is the representation of a module in state. This can be the root
     9  // module or a child module.
    10  type Module struct {
    11  	// Resources are sorted in a user-friendly order that is undefined at this
    12  	// time, but consistent.
    13  	Resources []Resource `json:"resources,omitempty"`
    14  
    15  	// Address is the absolute module address, omitted for the root module
    16  	Address string `json:"address,omitempty"`
    17  
    18  	// Each module object can optionally have its own nested "child_modules",
    19  	// recursively describing the full module tree.
    20  	ChildModules []Module `json:"child_modules,omitempty"`
    21  }