cf2tf
cf2tf copied to clipboard
Change how resolve values works
There are a lot of issues in how we resolve values. Mainly being how tricky it is to know if we are inside an intrinsic function or a condition.
It would be nice if we used a generator and kept track of the previous and next values.
If so we could better handle errors like this:
output "logs_bucket_name" {
description = "Name of the logs bucket."
// Unable to resolve Fn::If with value: [
// "RetainBucket",
// aws_s3_bucket.retain_logs_bucket[0].id,
// aws_s3_bucket.logs_bucket[0].id
// ]
}
Where it is currently no possible to know the "key" that had the error.