turbot / powerpipe

Powerpipe: Dashboards for DevOps. Visualize cloud configurations. Assess security posture against a massive library of benchmarks. Build custom dashboards with code.
https://powerpipe.io/
GNU Affero General Public License v3.0
261 stars 17 forks source link

add support for passing in a `database` (formerly workspace_database), `search_path`, and `search_path_prefix` to child mods in the mod definition. #93

Closed kaidaguerre closed 7 months ago

kaidaguerre commented 8 months ago

e want to add support for passing in a database (formerly workspace_database), search_path, and search_path_prefix to child mods in the mod definition. By default, they inherit the active database but can be overridden in the require block:

variable "duckdb_connection_string" {
  default = "duckdb:/home/ducks/mallard.db"
}

variable "flowpipe_connection_string" {
  default = "sqlite:/./my_mod/flowpipe.db"
}

mod "local" {
  require {
    mod "github.com/turbot/my_duckdb_mod {
      version     = ">=0.66.0"
      database    = var.duckdb_connection_string
      args = {
        foo = "bar"
      }
    }

    mod "github.com/turbot/flowpipe {
      version   = ">=0.66.0"
      database  = var.flowpipe_connection_string,
    }

    mod "github.com/turbot/aws_compliance {
      version            = ">=0.66.0"
      search_path_prefix = "aws_01"

    }
  }
}
kaidaguerre commented 7 months ago

implemented in 164a87907d9a3f846d508f86a9b6eb368238dbc9