Documentation ¶
Overview ¶
Package cmdext provides extensions to the Atlas CLI that may be moved to a separate repository in the future.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DataSources = []schemahcl.Option{ schemahcl.WithDataSource("sql", QuerySrc), schemahcl.WithDataSource("runtimevar", RuntimeVarSrc), }
DataSources exposes the data sources provided by this package.
Functions ¶
func QuerySrc ¶
QuerySrc exposes the database/sql.Query as a schemahcl datasource.
data "sql" "tenants" { url = var.url query = <query> args = [<arg1>, <arg2>, ...] } env "prod" { for_each = toset(data.sql.tenants.values) url = urlsetpath(var.url, each.value) }
func RuntimeVarSrc ¶
RuntimeVarSrc exposes the gocloud.dev/runtimevar as a schemahcl datasource.
data "runtimevar" "pass" { url = "driver://path?query=param" } locals { url = "mysql://root:${data.runtimevar.pass}@:3306/" }
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.