2023-05-02 10:33:06 -05:00
|
|
|
// Copyright (c) HashiCorp, Inc.
|
|
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
|
2018-12-19 13:08:25 -06:00
|
|
|
package jsonplan
|
|
|
|
|
2023-07-19 03:07:46 -05:00
|
|
|
// Module is the representation of a module in state. This can be the root
|
2018-12-19 13:08:25 -06:00
|
|
|
// module or a child module.
|
2023-07-19 03:07:46 -05:00
|
|
|
type Module struct {
|
2019-01-25 11:17:40 -06:00
|
|
|
// Resources are sorted in a user-friendly order that is undefined at this
|
|
|
|
// time, but consistent.
|
2023-07-19 03:07:46 -05:00
|
|
|
Resources []Resource `json:"resources,omitempty"`
|
2018-12-19 13:08:25 -06:00
|
|
|
|
|
|
|
// Address is the absolute module address, omitted for the root module
|
|
|
|
Address string `json:"address,omitempty"`
|
|
|
|
|
|
|
|
// Each module object can optionally have its own nested "child_modules",
|
|
|
|
// recursively describing the full module tree.
|
2023-07-19 03:07:46 -05:00
|
|
|
ChildModules []Module `json:"child_modules,omitempty"`
|
2018-12-19 13:08:25 -06:00
|
|
|
}
|