cf2tf icon indicating copy to clipboard operation
cf2tf copied to clipboard

Change how resolve values works

Open shadycuz opened this issue 1 year ago • 0 comments

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.

shadycuz avatar Jul 09 '23 20:07 shadycuz