Skip to content

Defining databases in subfolder tree #3527

Discussion options

You must be logged in to vote

Hi @david-rowland-rozettatech,

Atlas supports the fileset function, which allows you to load multiple files matching a specific pattern. This is especially useful when you want to treat several files as a single input source.

Here’s how you can use it in your case:

data "hcl_schema" "app" {
  paths = fileset("schemas/**/*.hcl")
}

env "output" {
  schema {
    src = data.hcl_schema.app.url
  }
  dev = "sqlite://file::memory:?cache=shared"
}

Then, you can run a command like this:

atlas schema diff --env output --from "sqlite://test.db" --to env://src

To improve the developer experience, we’ve also built IDE plugins:

With the Atlas plugin for JetBrains, …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by a8m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants