-
Notifications
You must be signed in to change notification settings - Fork 60
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
production db seeding #58
Comments
That's (separate state for data layer) definitely an option, I've done similar things and used a remote state data source to pull the resulting resource parameters. Using a postgres provider in the data layer environment, you should be able to set up the database/schemas/extensions pretty consistently and be able to either implicitly or explicitly set the dependency. |
Hey @erindatkinson, I got all excited about using the postgresql provider to do the DB seeding but then I ran into hashicorp/terraform-provider-postgresql#2 at a screaming pace. Le sigh. |
A wild blocker appeared. |
hashicorp/terraform-provider-postgresql#2 has now been closed with a fix/workaround. Im going to rework this to see if it does indeed work as advertised and will update this accordingly. |
Evening,
Quick Q. Im working on an Azure production deployment stack for TFE using this module.
The stack creates the necessary Storage Account and Postgres DB for the production deployment. I can pass the attributes for these resources into the TFE module, no problem.
The tricky part is to seed the database with the necessary SQL.
Anyone got any tips to share on solving this need?
Im going to be scouring the internet looking for a suitable and workable approach. Figured I would put it here as well to see if any Hashicorp or other TFE users have solved this?
At the back of my mind is to actually put the SA and DBS provisioning into an entirely seperate TF stack. That would give me more flexibility I think and also achieve a nice logical separation between the TFE app layer and a persistent data layer.
The text was updated successfully, but these errors were encountered: