cloudposse-archives / tfmask

Terraform utility to mask select output from `terraform plan` and `terraform apply`
https://cloudposse.com/accelerate
Apache License 2.0
202 stars 27 forks source link

Bug : random_string resource mask is not working #31

Open SeemaGC-Procore opened 2 years ago

SeemaGC-Procore commented 2 years ago

Hi,

I am using the latest version "0.7.0" of tfmask in the Atlantis workflow to run terraform. But random_string will print the generated string in output as ID of the resource. Looks like code related to tfmaskResource is not working in tfmask. Can you please verify this bug.

resource "random_string" "random_password" {
  length      = 16
  upper       = true
  special     = false
  min_numeric = 8
  min_upper   = 4
}

After executing terraform plan from Atlantis workflow. output:

- resource "random_string" "random_password" {
      - id          = "Gkd4eyO56D26" -> null
      - length      = 32 -> null
      - lower       = true -> null
      - min_lower   = 0 -> null
      - min_numeric = 16 -> null
      - min_special = 0 -> null
      - min_upper   = 4 -> null
      - number      = true -> null
      - result      = "Gkd4eyO56D26" -> null
      - special     = false -> null
      - upper       = true -> null
    }

Plan: 0 to add, 1 to change, 1 to destroy.