add deprecation warnings support for terraform_remote_state (#2679)

Signed-off-by: ollevche <ollevche@gmail.com>
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
Co-authored-by: Christian Mesh <christianmesh1@gmail.com>
This commit is contained in:
Oleksandr Levchenkov
2025-04-25 12:26:28 +03:00
committed by GitHub
parent f42dfbc497
commit 82d71e50e8
42 changed files with 334 additions and 107 deletions

View File

@@ -48,9 +48,10 @@ type StateValues struct {
}
type Output struct {
Sensitive bool `json:"sensitive"`
Value json.RawMessage `json:"value,omitempty"`
Type json.RawMessage `json:"type,omitempty"`
Sensitive bool `json:"sensitive"`
Deprecated string `json:"deprecated,omitempty"`
Value json.RawMessage `json:"value,omitempty"`
Type json.RawMessage `json:"type,omitempty"`
}
// Module is the representation of a module in state. This can be the root module
@@ -241,9 +242,10 @@ func MarshalOutputs(outputs map[string]*states.OutputValue) (map[string]Output,
return ret, err
}
ret[k] = Output{
Value: ov,
Type: ot,
Sensitive: v.Sensitive,
Value: ov,
Type: ot,
Sensitive: v.Sensitive,
Deprecated: v.Deprecated,
}
}