hcl2template: report localtion for cycle detection

When a datasource fails to be evaluated because a cycle has been
detected, we point out one of the links of the chain now so that users
have a better idea of what to look at.
backport_use_squash
Lucas Bajolet 3 years ago committed by Lucas Bajolet
parent 2a6ccaccab
commit 14b6ad10fe

@ -368,6 +368,7 @@ func (cfg *PackerConfig) recursivelyEvaluateDatasources(ref DatasourceRef, depen
"sources. Either your data source depends on more than ten " +
"other data sources, or your data sources have a cyclic " +
"dependency. Please simplify your config to continue. ",
Subject: &(cfg.Datasources[ref]).block.DefRange,
})
return dependencies, diags
}

Loading…
Cancel
Save