Merge pull request #26374 from hashicorp/pselle/sens-warning-color

Change sensitivity warning to be yellow only on 'Warning'
This commit is contained in:
Pam Selle 2020-09-25 11:42:36 -04:00 committed by GitHub
commit 715821a327
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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"))
}
}