/
githubmirror
/
terraform
Обзор
Документация
Войти
/
githubmirror
/
terraform
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
internal/command/jsonformat/differ/sensitive.go
46 строк
2 KB
Radek Simko
make copyrightfix
17 фев 2026, 16:56
17 фев 2026, 16:56
0fe906f
Код
Авторство
О чём код?
// Copyright IBM Corp. 2014, 2026 // SPDX-License-Identifier: BUSL-1.1 package differ import ( "github.com/zclconf/go-cty/cty" "github.com/hashicorp/terraform/internal/command/jsonformat/computed" "github.com/hashicorp/terraform/internal/command/jsonformat/computed/renderers" "github.com/hashicorp/terraform/internal/command/jsonformat/structured" "github.com/hashicorp/terraform/internal/command/jsonprovider" "github.com/hashicorp/terraform/internal/plans" ) type CreateSensitiveRenderer func(computed.Diff, bool, bool) computed.DiffRenderer func checkForSensitiveType(change structured.Change, ctype cty.Type) (computed.Diff, bool) { return change.CheckForSensitive( func(value structured.Change) computed.Diff { return ComputeDiffForType(value, ctype) }, func(inner computed.Diff, beforeSensitive, afterSensitive bool, action plans.Action) computed.Diff { return computed.NewDiff(renderers.Sensitive(inner, beforeSensitive, afterSensitive), action, change.ReplacePaths.Matches()) }, ) } func checkForSensitiveNestedAttribute(change structured.Change, attribute *jsonprovider.NestedType) (computed.Diff, bool) { return change.CheckForSensitive( func(value structured.Change) computed.Diff { return computeDiffForNestedAttribute(value, attribute) }, func(inner computed.Diff, beforeSensitive, afterSensitive bool, action plans.Action) computed.Diff { return computed.NewDiff(renderers.Sensitive(inner, beforeSensitive, afterSensitive), action, change.ReplacePaths.Matches()) }, ) } func checkForSensitiveBlock(change structured.Change, block *jsonprovider.Block) (computed.Diff, bool) { return change.CheckForSensitive( func(value structured.Change) computed.Diff { return ComputeDiffForBlock(value, block) }, func(inner computed.Diff, beforeSensitive, afterSensitive bool, action plans.Action) computed.Diff { return computed.NewDiff(renderers.SensitiveBlock(inner, beforeSensitive, afterSensitive), action, change.ReplacePaths.Matches()) }, ) }