terraform-plan-comment icon indicating copy to clipboard operation
terraform-plan-comment copied to clipboard

Lines in mult-line properties starting with whitespace and dash classified as deletions

Open stempler opened this issue 1 year ago • 5 comments

First of all thanks a lot for creating this nice action! It's a very nice representation of the plan.

I gave it a try today with a case where a resource is added that includes YAML as one of its properties. It seems that when a line starts with (optional?) whitespace and a dash, like in this case for lists in YAML, the representation in the comment is rendered as deletion although it is just part of the resource property.

Example in created comment:

image

Same in original plan:

image

stempler avatar Apr 30 '24 11:04 stempler

Uh, interesting case, thanks a lot for surfacing! I'll think about how to fix this, I hadn't dealt with plain YAML files in Terraform yet :eyes:

borchero avatar Apr 30 '24 12:04 borchero

Here another example where there is an update to a similar property:

  • First line wrongly classified as deletion :x:
  • Second line correctly classified as deletion :heavy_check_mark:
  • Third line correctly classified as addition/creation :heavy_check_mark:

image

Same excerpt from original plan:

image

stempler avatar Apr 30 '24 12:04 stempler

Yup, all boils down to the same issue! It should be possible to reverse-engineer this, the relevant information should be available :eyes:

borchero avatar Apr 30 '24 12:04 borchero

🤖 Stalebot

This issue hasn't seen updates in the last 60 days.

If it has been resolved or is not relevant anymore, please consider closing the issue. Otherwise, it will be closed automatically in 30 days.

github-actions[bot] avatar Feb 16 '25 06:02 github-actions[bot]

🤖 Stalebot

This issue hasn't seen updates in the last 60 days.

If it has been resolved or is not relevant anymore, please consider closing the issue. Otherwise, it will be closed automatically in 30 days.

github-actions[bot] avatar Apr 18 '25 06:04 github-actions[bot]

🤖 Stalebot

This issue hasn't seen updates in the last 60 days.

If it has been resolved or is not relevant anymore, please consider closing the issue. Otherwise, it will be closed automatically in 30 days.

github-actions[bot] avatar Jun 18 '25 06:06 github-actions[bot]

🤖 Stalebot

This issue hasn't seen updates in the last 60 days.

If it has been resolved or is not relevant anymore, please consider closing the issue. Otherwise, it will be closed automatically in 30 days.

github-actions[bot] avatar Aug 18 '25 06:08 github-actions[bot]