-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathatlas.hcl
45 lines (37 loc) · 899 Bytes
/
atlas.hcl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
variable "url" {
type = string
default = getenv("DATABASE_URL")
}
variable "port" {
type = string
default = getenv("DB_PORT")
}
variable "host" {
type = string
default = getenv("DB_HOST")
}
variable "user" {
type = string
default = getenv("DB_USER")
}
variable "name" {
type = string
default = getenv("DB_NAME")
}
variable "password" {
type = string
default = getenv("DB_PASSWORD")
}
// Define an environment named "local"
env "local" {
// Declare where the schema definition resides.
// Also supported:
// src = "./dir/with/schema"
// src = ["multi.hcl", "file.hcl"]
src = "./schema.hcl"
// Define the URL of the database which is managed in
// this environment.
url = "postgres://${var.user}:${var.password}@${var.host}:${var.port}/${var.name}?sslmode=disable"
// The schemas in the database that are managed by Atlas.
schemas = ["public"]
}