Closed kislerdm closed 7 months ago
Hi @kislerdm,
Please reconsider creating an implicit resource as mentioned in my comment.
Making a bundled resources like this is better suited to TF module, not TF resource.
How about just writing a documentation to let users to define explicit dependency like this?:
resource "neon_endpoint" "this" {
type = "read_write"
...
}
resource "neon_database" "this" {
...
+ depends_on = [neon_endpoint.main]
}
@kbumsik You are right, simplicity is more appropriate in the provider compared to a module where new branch
and endpoint
could be abstracted by a single façade.
Thank you 👍
Problem
It's allowed to create a database using a newly created branch without associated endpoint. It shall be forbidden because endpoint is required to communicate with the database.
Proposed solution
Every newly created branch will create an RW endpoint.