atlas
The atlas
is an optional block for configuring Atlas login credentials.
atlas {
cloud {
org = "org-name"
}
}
Blocks
atlas.cloud
atlas.cloud
attributes
Name and description | Required | Value |
---|
org
The org attribute specifies the organization to log in to. If Atlas executes using atlas.hcl without logging in to the specified organization, the command will be aborted. | false | string |
token | false | string |
atlas.cloud
constraints
Constraint | Value |
---|
Required | true |
Require Name | false |
Repeatable | false |
Allow unknown blocks | false |
Allow unknown attributes | false |
One of required sets | [org, token] |
Constraints
Constraint | Value |
---|
Required | false |
Require Name | false |
Allow Qualifier | false |
Repeatable | false |
Allow unknown blocks | false |
Allow unknown attributes | false |
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
Constraints
Constraint | Value |
---|
Required | false |
Repeatable | false |
Allow unknown blocks | false |
Allow unknown attributes | false |
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
Name | Required | Value |
---|
url | true | Composite_schema url can be one of:
- Object reference
string
|
data.schema
constraints
Constraint | Value |
---|
Required | true |
Require Name | false |
Repeatable | true |
Allow unknown blocks | false |
Allow unknown attributes | false |
Constraints
Constraint | Value |
---|
Required | false |
Repeatable | false |
Allow unknown blocks | false |
Allow unknown attributes | false |
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
Constraints
Constraint | Value |
---|
Required | false |
Repeatable | false |
Allow unknown blocks | false |
Allow unknown attributes | false |
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
Constraints
Constraint | Value |
---|
Required | false |
Repeatable | false |
Allow unknown blocks | false |
Allow unknown attributes | false |
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
Name | Required | Value |
---|
region | false | string |
Constraints
Constraint | Value |
---|
Required | false |
Repeatable | false |
Allow unknown blocks | false |
Allow unknown attributes | false |
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
Name | Required | Value |
---|
path | false | string |
paths | false | List of strings |
vars | false | map |
Constraints
Constraint | Value |
---|
Required | false |
Repeatable | false |
Allow unknown blocks | false |
Allow unknown attributes | false |
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
Name | Required | Value |
---|
name | true | string |
tag | false | string |
Constraints
Constraint | Value |
---|
Required | false |
Repeatable | false |
Allow unknown blocks | false |
Allow unknown attributes | false |
data remote_schema
Attributes
Constraints
Constraint | Value |
---|
Required | false |
Repeatable | false |
Allow unknown blocks | false |
Allow unknown attributes | false |
data runtimevar
The runtimevar
data source allows fetching runtime variables from a remote source.
Attributes
Name | Required | Value |
---|
url | true | string |
Constraints
Constraint | Value |
---|
Required | false |
Repeatable | false |
Allow unknown blocks | false |
Allow unknown attributes | false |
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
Name | Required | Value |
---|
args | false | Any value |
query | true | string |
url | true | string |
Constraints
Constraint | Value |
---|
Required | false |
Repeatable | false |
Allow unknown blocks | false |
Allow unknown attributes | false |
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
Name | Required | Value |
---|
path | true | string |
vars | false | map |
Constraints
Constraint | Value |
---|
Required | false |
Repeatable | false |
Allow unknown blocks | false |
Allow unknown attributes | false |
dev clickhouse
Attributes
Constraints
Constraint | Value |
---|
Required | false |
Repeatable | false |
Allow unknown blocks | false |
Allow unknown attributes | false |
dev mariadb
Attributes
Constraints
Constraint | Value |
---|
Required | false |
Repeatable | false |
Allow unknown blocks | false |
Allow unknown attributes | false |
dev mysql
Attributes
Constraints
Constraint | Value |
---|
Required | false |
Repeatable | false |
Allow unknown blocks | false |
Allow unknown attributes | false |
dev postgres
Attributes
Constraints
Constraint | Value |
---|
Required | false |
Repeatable | false |
Allow unknown blocks | false |
Allow unknown attributes | false |
dev redshift
Attributes
Constraints
Constraint | Value |
---|
Required | false |
Repeatable | false |
Allow unknown blocks | false |
Allow unknown attributes | false |
dev sqlserver
Attributes
Constraints
Constraint | Value |
---|
Required | false |
Repeatable | false |
Allow unknown blocks | false |
Allow unknown attributes | false |
diff
The diff
block defines the diffing configuration
diff {
concurrent_index {
add = true
drop = true
}
}
Blocks
diff.concurrent_index
diff.concurrent_index
attributes
diff.concurrent_index
constraints
Constraint | Value |
---|
Required | false |
Require Name | false |
Repeatable | false |
Allow unknown blocks | false |
Allow unknown attributes | false |
diff.skip
diff.skip
attributes
diff.skip
constraints
Constraint | Value |
---|
Required | false |
Require Name | false |
Repeatable | false |
Allow unknown blocks | false |
Allow unknown attributes | false |
Constraints
Constraint | Value |
---|
Required | false |
Require Name | false |
Allow Qualifier | false |
Repeatable | false |
Allow unknown blocks | false |
Allow unknown attributes | false |
docker clickhouse
Attributes
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
docker.build
constraints
Constraint | Value |
---|
Required | false |
Require Name | false |
Repeatable | false |
Allow unknown blocks | false |
Allow unknown attributes | false |
Constraints
Constraint | Value |
---|
Required | false |
Repeatable | false |
Allow unknown blocks | false |
Allow unknown attributes | false |
docker mariadb
Attributes
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
docker.build
constraints
Constraint | Value |
---|
Required | false |
Require Name | false |
Repeatable | false |
Allow unknown blocks | false |
Allow unknown attributes | false |
Constraints
Constraint | Value |
---|
Required | false |
Repeatable | false |
Allow unknown blocks | false |
Allow unknown attributes | false |
docker mysql
Attributes
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