rissson / terraform-provider-rgw

Mirror for https://gitlab.com/lama-corp/infra/tools/terraform-provider-rgw
MIT License
7 stars 1 forks source link

Hide sensitive output of a resource when it is removed. #2

Closed b1ackbeardast closed 1 year ago

b1ackbeardast commented 2 years ago

I think it would be right to hide the resource's sensitive output in the plan/apply when trying to delete it:

Terraform will perform the following actions:
  # module.dev_test_delete.rgw_user.s3_user will be destroyed
  - resource "rgw_user" "s3_user" {
      - bucket_quota   = [
          - {
              - check_on_raw = false
              - enabled      = false
              - max_objects  = -1
              - max_size     = -1
              - max_size_kb  = 0
              - type         = ""
              - user_id      = "dev-dev-dev"
            },
        ] -> null
      - caps           = [] -> null
      - display_name   = "unknown, BDI-9661" -> null
      - id             = "dev-dev-dev" -> null
      - keys           = [
          - {
              - access_key = "xxxxx"
              - secret_key = "xxxxx"
              - user       = "dev-dev-dev"
            },
 ....
    }
rissson commented 2 years ago

Those are already marked as sensitive (https://github.com/rissson/terraform-provider-rgw/blob/main/rgw/resource_user.go#L92), I'm not sure if there is anything I can do about this.