-
Notifications
You must be signed in to change notification settings - Fork 20
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
Support setting url in sql_migrate ressource #52
Comments
I just want to underline that this is a requirement for using this provider in many public cloud use cases. In such use cases, the database will be created within the same Terraform configuration as the SQL provider is invoked and the database URL cannot be known in advance. In such use cases, the URL will have to be built from properties read from the database resource. |
I just ran into the same issue. Until I can provide a URL in the resource from a terraform var, I will be using local_exec :( |
I love the concept of this provider but we would need this too - we provision db instances automatically and would like to run some post-setup SQL against the instance. Current url declaration in the provider makes that impossible. |
The ability to specify a URL will not align with the Terraform providers concept. What behavior would you expect if the URL is changed in the Additionally, the use case of "provision database, then apply migration" would not work in a single Terraform execution, because it would fail at the plan stage. Should |
provider "sql" {
alias = "DB_A"
url = "sql url goes here"
}
resource "sql_migrate" "a" {
provider = sql.DB_A
migration {
up = "a.sql.up"
down = "a.sql.down"
}
}
provider "sql" {
alias = "DB_B"
url = "sql url goes here"
}
resource "sql_migrate" "b" {
provider = sql.DB_B
migration {
up = "b.sql.up"
down = "b.sql.down"
}
} |
Follow opentofu/opentofu#300 for a proper solution to cases like this. |
Hi,
Great provider ! I'm really missing to be able to specify the url in the ressource.
Basically I want to be able to do something like this:
Thanks in advance :)
The text was updated successfully, but these errors were encountered: