Skip to content

Instantly share code, notes, and snippets.

@rotemtam

rotemtam/main.tf Secret

Created April 21, 2023 11:18
Show Gist options
  • Save rotemtam/5454bb4b3647bbb854446fd01b15ced7 to your computer and use it in GitHub Desktop.
Save rotemtam/5454bb4b3647bbb854446fd01b15ced7 to your computer and use it in GitHub Desktop.
Minimal TF + Atlas Example
terraform {
required_providers {
atlas = {
source = "ariga/atlas"
version = "0.4.7"
}
}
}
provider "atlas" {
dev_url = "docker://mysql/8/myapp"
}
data "atlas_schema" "sql" {
src = "file://${path.module}/schema.sql"
}
resource "atlas_schema" "myapp" {
hcl = data.atlas_schema.sql.hcl
url = "mysql://root:pass@/myapp"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment