Change sensitivity warning to be yellow only on 'Warning'

This commit is contained in:
Pam Selle 2020-09-25 10:22:56 -04:00
parent 4bba9a70b3
commit 634e83ab63
1 changed files with 4 additions and 4 deletions

View File

@ -1315,17 +1315,17 @@ func (p *blockBodyDiffPrinter) writeSensitivityWarning(old, new cty.Value, inden
if new.IsMarked() && !old.IsMarked() {
p.buf.WriteString(strings.Repeat(" ", indent))
p.buf.WriteString(p.color.Color("[yellow]# Warning: this attribute value will be marked as sensitive and will\n"))
p.buf.WriteString(p.color.Color("# [yellow]Warning:[reset] this attribute value will be marked as sensitive and will\n"))
p.buf.WriteString(strings.Repeat(" ", indent))
p.buf.WriteString(p.color.Color("[yellow]# not display in UI output after applying this change[reset]\n"))
p.buf.WriteString(p.color.Color("# not display in UI output after applying this change\n"))
}
// Note if changing this attribute will change its sensitivity
if old.IsMarked() && !new.IsMarked() {
p.buf.WriteString(strings.Repeat(" ", indent))
p.buf.WriteString(p.color.Color("[yellow]# Warning: this attribute value will no longer be marked as sensitive\n"))
p.buf.WriteString(p.color.Color("# [yellow]Warning:[reset] this attribute value will no longer be marked as sensitive\n"))
p.buf.WriteString(strings.Repeat(" ", indent))
p.buf.WriteString(p.color.Color("[yellow]# after applying this change[reset]\n"))
p.buf.WriteString(p.color.Color("# after applying this change\n"))
}
}