Describe the bug
Yor is not able to deal with statements like { for k, v in local.tags : k => v if k != "environment" } which causes problems in our pipeline. It creates wrong Terraform code:
resource "aws_security_group" "a" {
name = "b"
tags = { for k, v in local.tags : k => v if k != "environment"
yor_name = "a"
yor_trace = "c3bec54a-a976-4886-8a03-792318011ed0"
}
}
To Reproduce
Use the following Terraform file
locals {
tags = {a: "b", c: "d"}
}
resource "aws_security_group" "a" {
name = "b"
tags = { for k, v in local.tags : k => v if k != "environment" }
}
2. Run `yor tags -d .`
3. Check the file system. There is still a temporary file which shows incorrect Terraform code.
**Expected behavior**
- there should be no temp file left
- the source code should show the correct tags
**Screenshots**
none
**Desktop (please complete the following information):**
- OS: Linux, Windows
- Yor Version: 0.1.191
**Additional context**
None
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Describe the bug Yor is not able to deal with statements like
{ for k, v in local.tags : k => v if k != "environment" }
which causes problems in our pipeline. It creates wrong Terraform code:To Reproduce
resource "aws_security_group" "a" { name = "b"
tags = { for k, v in local.tags : k => v if k != "environment" } }