update to use typed sensitive marks

This commit is contained in:
James Bardin
2021-06-24 17:53:43 -04:00
parent 2c493e38c7
commit d9dfd451ea
38 changed files with 224 additions and 187 deletions

View File

@@ -4,10 +4,15 @@ import (
"strings"
)
// valueMarks allow creating strictly typed values for use as cty.Value marks.
// The variable name for new values should be the title-cased format of the
// value to better match the GoString output for debugging.
type valueMark string
func (m valueMark) GoString() string {
return "marks." + strings.Title(string(m))
}
// Sensitive indicates that this value is marked as sensitive in the context of
// Terraform.
var Sensitive = valueMark("sensitive")