Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Useless warning dev_url is unset #172

Open
ilya-bukinich opened this issue Oct 10, 2024 · 0 comments
Open

Useless warning dev_url is unset #172

ilya-bukinich opened this issue Oct 10, 2024 · 0 comments

Comments

@ilya-bukinich
Copy link

On configuration:

terraform {
  required_providers {
    atlas = {
      source  = "ariga/atlas"
      version = "0.9.1"
    }
  }
}

provider "atlas" {
  cloud {
    token = var.atlas_token
  }
}

locals {
  db_url          = "clickhouse://localhost:9000"
  migrations      = "${path.module}/migrations?format=atlas"
}

data "atlas_migration" "db" {
  url     = local.db_url
  dir     = local.migrations
}

resource "atlas_migration" "db" {
  dir              = local.migrations
  url              = local.db_url
  version          = data.atlas_migration.db.latest
  revisions_schema = "default"
}

terraform plan returns:

data.atlas_migration.db: Read complete after 1s [id=file://./migrations?format=atlas]

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # atlas_migration.db will be created
  + resource "atlas_migration" "db" {
      + dir              = "./migrations?format=atlas"
      + id               = (known after apply)
      + revisions_schema = "default"
      + status           = (known after apply)
      + url              = (sensitive value)
      + version          = "001"
    }

Plan: 1 to add, 0 to change, 0 to destroy.
╷
│ Warning: dev_url is unset
│ 
│   with data.atlas_migration.db,
│   on main.tf line 21, in data "atlas_migration" "db":
│   21: data "atlas_migration" "db" {
│ 
│ It is highly recommended that you use 'dev_url' to specify a dev database.
│ to learn more about it, visit: https://atlasgo.io/dev-database
│ 
│ (and one more similar warning elsewhere)

──────────────────────────────────────────────────────────

Note: You didn't use the -out option to save this plan, so Terraform can't guarantee to take exactly these actions if you run "terraform apply" now.

but for in data source atlas_migration an argument named dev_url is not expected here and is not used in any way

@ilya-bukinich ilya-bukinich changed the title Useless warning Useless warning dev_url is unset Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant