mirror of
https://github.com/hashicorp/terraform.git
synced 2026-05-28 04:03:27 -04:00
Don't inspect an empty set, return false
This commit is contained in:
parent
ba9cb786c3
commit
2b8e876bdb
1 changed files with 3 additions and 2 deletions
|
|
@ -1014,8 +1014,9 @@ func (p *blockBodyDiffPrinter) writeActionSymbol(action plans.Action) {
|
|||
}
|
||||
|
||||
func (p *blockBodyDiffPrinter) pathForcesNewResource(path cty.Path) bool {
|
||||
if !p.action.IsReplace() {
|
||||
// "requiredReplace" only applies when the instance is being replaced
|
||||
if !p.action.IsReplace() || p.requiredReplace.Empty() {
|
||||
// "requiredReplace" only applies when the instance is being replaced,
|
||||
// and we should only inspect that set if it is not empty
|
||||
return false
|
||||
}
|
||||
return p.requiredReplace.Has(path)
|
||||
|
|
|
|||
Loading…
Reference in a new issue