Skip to main content

Atlas Configuration

atlas

The atlas is an optional block for login to Atlas Cloud.

Blocks

atlas.cloud

atlas.cloud attributes
NameRequiredValue
tokentruestring
atlas.cloud constraints
ConstraintValue
Requiredtrue
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

Constraints

ConstraintValue
Requiredfalse
Require Namefalse
Allow Qualifierfalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

data aws_rds_token

The aws_rds_token data source generates a short-lived token for an AWS RDS database using IAM Authentication.

data "aws_rds_token" "db" {
region = "us-east-1"
endpoint = local.endpoint
username = local.user
}

Attributes

NameRequiredValue
endpointtruestring
regionfalsestring
usernametruestring

Constraints

ConstraintValue
Requiredfalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

data composite_schema

The composite_schema data source allows the composition of multiple Atlas schemas into a unified schema graph.

data "composite_schema" "app" {
schema "inventory" {
url = data.external_schema.sqlalchemy.url
}
schema "graph" {
url = "ent://ent/schema"
}
...
}

Blocks

data.schema

data.schema attributes
NameRequiredValue
urltrue

Composite_schema url can be one of:

  1. Object reference
  2. string
data.schema constraints
ConstraintValue
Requiredtrue
Require Namefalse
Repeatabletrue
Allow unknown blocksfalse
Allow unknown attributesfalse

Constraints

ConstraintValue
Requiredfalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

data external

The external allows the execution of an external program and uses its output in the project.

data "external" "dot_env" {
program = [
"npm",
"run",
"load-env.js"
]
}

Attributes

NameRequiredValue
programtrue

List of strings

working_dirfalsestring

Constraints

ConstraintValue
Requiredfalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

data external_schema

The external_schema data source allows the import of an SQL schema from an external program into Atlas' desired state.

data "external_schema" "graph" {
program = [
"npm",
"run",
"generate-schema"
]
}

Attributes

NameRequiredValue
programtrue

List of strings

working_dirfalsestring

Constraints

ConstraintValue
Requiredfalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

data gcp_cloudsql_token

The gcp_cloudsql_token data source generates a short-lived token for an GCP CloudSQL database using IAM Authentication.

data "gcp_cloudsql_token" "db" {}

Attributes

NameRequiredValue
regionfalsestring

Constraints

ConstraintValue
Requiredfalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

data hcl_schema

The hcl_schema data source allows the loading of an Atlas HCL schema from a file or directory, with optional variables.

data "hcl_schema" "app" {
path = "schema.hcl"
vars = {
tenant = var.tenant
}
}

Attributes

NameRequiredValue
pathfalsestring
pathsfalse

List of strings

varsfalsemap

Constraints

ConstraintValue
Requiredfalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

data remote_dir

The remote_dir data source reads the state of a migration directory from Atlas Cloud.

data "remote_dir" "migrations" {
name = "myapp"
}

Attributes

NameRequiredValue
nametruestring
tagfalsestring

Constraints

ConstraintValue
Requiredfalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

data remote_schema

Attributes

NameRequiredValue
nametruestring
tagfalsestring
versionfalsestring

Constraints

ConstraintValue
Requiredfalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

data runtimevar

The runtimevar data source allows fetching runtime variables from a remote source.

Attributes

NameRequiredValue
urltruestring

Constraints

ConstraintValue
Requiredfalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

data sql

The sql data source allows executing SQL queries and using their result in the project.

data "sql" "tenants" {
url = var.url
query = "..."
args = [var.pattern]
}

Attributes

NameRequiredValue
argsfalse

Any value

querytruestring
urltruestring

Constraints

ConstraintValue
Requiredfalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

data template_dir

The template_dir data source renders a migration directory from a template directory.

data "template_dir" "app" {
path = var.path
vars = {
Key1 = "value1"
Key2 = "value2"
}
}

Attributes

NameRequiredValue
pathtruestring
varsfalsemap

Constraints

ConstraintValue
Requiredfalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

diff

The diff block defines the diffing configuration

diff {
concurrent_index {
add = true
drop = true
}
}

Blocks

diff.concurrent_index

diff.concurrent_index attributes
NameRequiredValue
addfalsebool
createfalsebool
dropfalsebool
diff.concurrent_index constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

diff.skip

diff.skip attributes
NameRequiredValue
add_columnfalsebool
add_foreign_keyfalsebool
add_funcfalsebool
add_indexfalsebool
add_procfalsebool
add_schemafalsebool
add_tablefalsebool
add_triggerfalsebool
add_viewfalsebool
drop_columnfalsebool
drop_foreign_keyfalsebool
drop_funcfalsebool
drop_indexfalsebool
drop_procfalsebool
drop_schemafalsebool
drop_tablefalsebool
drop_triggerfalsebool
drop_viewfalsebool
modify_columnfalsebool
modify_foreign_keyfalsebool
modify_funcfalsebool
modify_indexfalsebool
modify_procfalsebool
modify_schemafalsebool
modify_tablefalsebool
modify_triggerfalsebool
modify_viewfalsebool
rename_funcfalsebool
rename_procfalsebool
rename_tablefalsebool
rename_triggerfalsebool
rename_viewfalsebool
diff.skip constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

Constraints

ConstraintValue
Requiredfalse
Require Namefalse
Allow Qualifierfalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

docker clickhouse

Attributes

NameRequiredValue
baselinefalsestring
imagetruestring
schemafalsestring

Blocks

docker.build

The build block defines the build configuration for the Docker image. The given image is built using the provided Dockerfile and context.

docker "postgres" "pg-vn" {
image = "postgres:15-vn"
build {
context = "."
dockerfile = "locale.Dockerfile"
args = {
LOCALE = "vi-VN"
}
}
}
docker.build attributes
NameRequiredValue
argsfalsemap
contexttruestring
dockerfilefalsestring
targetfalsestring
docker.build constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

Constraints

ConstraintValue
Requiredfalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

docker mariadb

Attributes

NameRequiredValue
baselinefalsestring
imagetruestring
schemafalsestring

Blocks

docker.build

The build block defines the build configuration for the Docker image. The given image is built using the provided Dockerfile and context.

docker "postgres" "pg-vn" {
image = "postgres:15-vn"
build {
context = "."
dockerfile = "locale.Dockerfile"
args = {
LOCALE = "vi-VN"
}
}
}
docker.build attributes
NameRequiredValue
argsfalsemap
contexttruestring
dockerfilefalsestring
targetfalsestring
docker.build constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

Constraints

ConstraintValue
Requiredfalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

docker mysql

Attributes

NameRequiredValue
baselinefalsestring
imagetruestring
schemafalsestring

Blocks

docker.build

The build block defines the build configuration for the Docker image. The given image is built using the provided Dockerfile and context.

docker "postgres" "pg-vn" {
image = "postgres:15-vn"
build {
context = "."
dockerfile = "locale.Dockerfile"
args = {
LOCALE = "vi-VN"
}
}
}
docker.build attributes
NameRequiredValue
argsfalsemap
contexttruestring
dockerfilefalsestring
targetfalsestring
docker.build constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

Constraints

ConstraintValue
Requiredfalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

docker postgres

Attributes

NameRequiredValue
baselinefalsestring
databasefalsestring
imagetruestring
schemafalsestring

Blocks

docker.build

The build block defines the build configuration for the Docker image. The given image is built using the provided Dockerfile and context.

docker "postgres" "pg-vn" {
image = "postgres:15-vn"
build {
context = "."
dockerfile = "locale.Dockerfile"
args = {
LOCALE = "vi-VN"
}
}
}
docker.build attributes
NameRequiredValue
argsfalsemap
contexttruestring
dockerfilefalsestring
targetfalsestring
docker.build constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

Constraints

ConstraintValue
Requiredfalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

docker sqlserver

Attributes

NameRequiredValue
baselinefalsestring
databasefalsestring
imagetruestring
schemafalsestring

Blocks

docker.build

The build block defines the build configuration for the Docker image. The given image is built using the provided Dockerfile and context.

docker "postgres" "pg-vn" {
image = "postgres:15-vn"
build {
context = "."
dockerfile = "locale.Dockerfile"
args = {
LOCALE = "vi-VN"
}
}
}
docker.build attributes
NameRequiredValue
argsfalsemap
contexttruestring
dockerfilefalsestring
targetfalsestring
docker.build constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

Constraints

ConstraintValue
Requiredfalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

env

The env block describes an environment block that can be selected by using the --env flag.

Attributes

NameRequiredValue
devfalsestring
excludefalse

List of strings

namefalsestring
schemasfalse

List of strings

srcfalse

Schema source can be one of:

  1. Object reference
  2. string
  3. List of strings
urlfalsestring

Blocks

env.diff

The diff block defines the diffing configuration

diff {
concurrent_index {
add = true
drop = true
}
}
env.diff blocks

env.diff.concurrent_index

env.diff.concurrent_index attributes
NameRequiredValue
addfalsebool
createfalsebool
dropfalsebool
env.diff.concurrent_index constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

env.diff.skip

env.diff.skip attributes
NameRequiredValue
add_columnfalsebool
add_foreign_keyfalsebool
add_funcfalsebool
add_indexfalsebool
add_procfalsebool
add_schemafalsebool
add_tablefalsebool
add_triggerfalsebool
add_viewfalsebool
drop_columnfalsebool
drop_foreign_keyfalsebool
drop_funcfalsebool
drop_indexfalsebool
drop_procfalsebool
drop_schemafalsebool
drop_tablefalsebool
drop_triggerfalsebool
drop_viewfalsebool
modify_columnfalsebool
modify_foreign_keyfalsebool
modify_funcfalsebool
modify_indexfalsebool
modify_procfalsebool
modify_schemafalsebool
modify_tablefalsebool
modify_triggerfalsebool
modify_viewfalsebool
rename_funcfalsebool
rename_procfalsebool
rename_tablefalsebool
rename_triggerfalsebool
rename_viewfalsebool
env.diff.skip constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse
env.diff constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

env.format

The format block defines the output format of the different commands

format {
migrate {
diff = "{{ sql . \" \" }}"
}
}
env.format blocks

env.format.migrate

env.format.migrate attributes
NameRequiredValue
applyfalsestring
difffalsestring
downfalsestring
lintfalsestring
statusfalsestring
env.format.migrate constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

env.format.schema

env.format.schema attributes
NameRequiredValue
applyfalsestring
difffalsestring
inspectfalsestring
env.format.schema constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse
env.format constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

env.lint

The lint block defines the linting configuration

lint {
destructive {
error = false
}
concurrent_index {
error = true
}
}
env.lint attributes
NameRequiredValue
formatfalsestring
latestfalseint
logfalsestring
reviewfalse

enum (ALWAYS, WARNING, ERROR)

env.lint blocks

env.lint.concurrent_index

env.lint.concurrent_index attributes
NameRequiredValue
check_createfalsebool
check_dropfalsebool
check_txmodefalsebool
errorfalsebool
env.lint.concurrent_index constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

env.lint.condrop

env.lint.condrop attributes
NameRequiredValue
errorfalsebool
env.lint.condrop constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

env.lint.data_depend

env.lint.data_depend attributes
NameRequiredValue
errorfalsebool
env.lint.data_depend constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

env.lint.destructive

env.lint.destructive attributes
NameRequiredValue
errorfalsebool
env.lint.destructive constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

env.lint.git

env.lint.git attributes
NameRequiredValue
basefalsestring
dirfalsestring
env.lint.git constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

env.lint.incompatible

env.lint.incompatible attributes
NameRequiredValue
errorfalsebool
env.lint.incompatible constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

env.lint.naming

env.lint.naming attributes
NameRequiredValue
errorfalsebool
matchfalsestring
messagefalsestring
env.lint.naming blocks

env.lint.naming.check

env.lint.naming.check attributes
NameRequiredValue
matchfalsestring
messagefalsestring
env.lint.naming.check constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

env.lint.naming.column

env.lint.naming.column attributes
NameRequiredValue
matchfalsestring
messagefalsestring
env.lint.naming.column constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

env.lint.naming.foreign_key

env.lint.naming.foreign_key attributes
NameRequiredValue
matchfalsestring
messagefalsestring
env.lint.naming.foreign_key constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

env.lint.naming.index

env.lint.naming.index attributes
NameRequiredValue
matchfalsestring
messagefalsestring
env.lint.naming.index constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

env.lint.naming.schema

env.lint.naming.schema attributes
NameRequiredValue
matchfalsestring
messagefalsestring
env.lint.naming.schema constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

env.lint.naming.table

env.lint.naming.table attributes
NameRequiredValue
matchfalsestring
messagefalsestring
env.lint.naming.table constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse
env.lint.naming constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

env.lint.non_linear

env.lint.non_linear attributes
NameRequiredValue
errorfalsebool
env.lint.non_linear constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse
env.lint constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse
Mutually exclusive sets[latest, git], [log, format]

env.log

Use the format block instead

env.log blocks

env.log.migrate

env.log.migrate attributes
NameRequiredValue
applyfalsestring
difffalsestring
downfalsestring
lintfalsestring
statusfalsestring
env.log.migrate constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

env.log.schema

env.log.schema attributes
NameRequiredValue
applyfalsestring
difffalsestring
inspectfalsestring
env.log.schema constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse
env.log constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

env.migration

The migration block defines the migration configuration

migration {
dir = "file://migrations"
repo {
name = "app"
}
}
env.migration attributes
NameRequiredValue
baselinefalsestring
dirfalsestring
excludefalse

List of strings

exec_orderfalse

enum (LINEAR, linear, LINEAR_SKIP, linear-skip, NON_LINEAR, non-linear)

formatfalse

Migration format can be one of:

  1. enum (atlas, golang-migrate, goose, flyway, liquibase, dbmate)
  2. string
lock_timeoutfalsestring
revisions_schemafalsestring
env.migration blocks

env.migration.repo

The repository configuration for the migrations directory in the registry

repo {
name = "app"
}
env.migration.repo attributes
NameRequiredValue
nametruestring
env.migration.repo constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse
env.migration constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

env.schema

The configuration for the desired schema

schema {
src = "file://schema.hcl"
repo {
name = "app"
}
}
env.schema attributes
NameRequiredValue
srctruestring
env.schema blocks

env.schema.repo

The repository configuration for the desired schema in the registry

repo {
name = "app"
}
env.schema.repo attributes
NameRequiredValue
nametruestring
env.schema.repo constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse
env.schema constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

env.test

The test block defines the testing configuration

test {
schema {
src = ["schema.test.hcl"]
vars = {
seed_file = "filename.sql"
variable2 = var.name
variable3 = data.external.value
}
}
}
env.test blocks

env.test.migrate

env.test.migrate attributes
NameRequiredValue
srctrue

List of strings

varsfalsemap
env.test.migrate constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

env.test.schema

env.test.schema attributes
NameRequiredValue
srctrue

List of strings

varsfalsemap
env.test.schema constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse
env.test constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

Constraints

ConstraintValue
Requiredfalse
Require Namefalse
Allow Qualifierfalse
Repeatabletrue
Allow unknown blocksfalse
Allow unknown attributestrue

hook sql

The hook "sql" "name" block defines an SQL hook configuration.

hook "sql" "timeout" {
transaction {
after_begin = [
"SET statement_timeout TO '50ms'",
]
}
}

Attributes

NameRequiredValue
skip_errorsfalsebool

Blocks

hook.transaction

hook.transaction attributes
NameRequiredValue
after_beginfalse

List of strings

before_commitfalse

List of strings

before_rollbackfalse

List of strings

hook.transaction constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

Constraints

ConstraintValue
Requiredfalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

lint

The lint block defines the linting configuration

lint {
destructive {
error = false
}
concurrent_index {
error = true
}
}

Attributes

NameRequiredValue
formatfalsestring
latestfalseint
logfalsestring
reviewfalse

enum (ALWAYS, WARNING, ERROR)

Blocks

lint.concurrent_index

lint.concurrent_index attributes
NameRequiredValue
check_createfalsebool
check_dropfalsebool
check_txmodefalsebool
errorfalsebool
lint.concurrent_index constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

lint.condrop

lint.condrop attributes
NameRequiredValue
errorfalsebool
lint.condrop constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

lint.data_depend

lint.data_depend attributes
NameRequiredValue
errorfalsebool
lint.data_depend constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

lint.destructive

lint.destructive attributes
NameRequiredValue
errorfalsebool
lint.destructive constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

lint.git

lint.git attributes
NameRequiredValue
basefalsestring
dirfalsestring
lint.git constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

lint.incompatible

lint.incompatible attributes
NameRequiredValue
errorfalsebool
lint.incompatible constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

lint.naming

lint.naming attributes
NameRequiredValue
errorfalsebool
matchfalsestring
messagefalsestring
lint.naming blocks

lint.naming.check

lint.naming.check attributes
NameRequiredValue
matchfalsestring
messagefalsestring
lint.naming.check constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

lint.naming.column

lint.naming.column attributes
NameRequiredValue
matchfalsestring
messagefalsestring
lint.naming.column constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

lint.naming.foreign_key

lint.naming.foreign_key attributes
NameRequiredValue
matchfalsestring
messagefalsestring
lint.naming.foreign_key constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

lint.naming.index

lint.naming.index attributes
NameRequiredValue
matchfalsestring
messagefalsestring
lint.naming.index constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

lint.naming.schema

lint.naming.schema attributes
NameRequiredValue
matchfalsestring
messagefalsestring
lint.naming.schema constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

lint.naming.table

lint.naming.table attributes
NameRequiredValue
matchfalsestring
messagefalsestring
lint.naming.table constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse
lint.naming constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

lint.non_linear

lint.non_linear attributes
NameRequiredValue
errorfalsebool
lint.non_linear constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

Constraints

ConstraintValue
Requiredfalse
Require Namefalse
Allow Qualifierfalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse
Mutually exclusive sets[latest, git], [log, format]

test

The test block defines the testing configuration

test {
schema {
src = ["schema.test.hcl"]
vars = {
seed_file = "filename.sql"
variable2 = var.name
variable3 = data.external.value
}
}
}

Blocks

test.migrate

test.migrate attributes
NameRequiredValue
srctrue

List of strings

varsfalsemap
test.migrate constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

test.schema

test.schema attributes
NameRequiredValue
srctrue

List of strings

varsfalsemap
test.schema constraints
ConstraintValue
Requiredfalse
Require Namefalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse

Constraints

ConstraintValue
Requiredfalse
Require Namefalse
Allow Qualifierfalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse