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

Reasons for using HCL ? #230

Closed
gedw99 opened this issue Nov 16, 2021 · 4 comments
Closed

Reasons for using HCL ? #230

gedw99 opened this issue Nov 16, 2021 · 4 comments

Comments

@gedw99
Copy link

gedw99 commented Nov 16, 2021

Quite curious about the potential uses cases with Atlas...

Is one of the reasons for the choice of HCL to do with being able to diff many HCL's and produce new one?

When HCL is used with Terraform, you need a central place for HCL that holds the existing state of the system.

Normally a developer would create a migration script as they work.
Alternatively, they can also diff two datebase's later to produce a migration script.

I ask this because i am facing this issue many databases at the moment. The databases are NOT controlled by a DBA or DEV; but have new data schemas being developed at runtime by users, and so using HCL provides a way to determine the difference between the actual schema of the database and the intended one.

Also JSON Schema is used by the User to describe what they want the DB to model. These JSON Schema are then translated at runtime into DB Migration scripts. So i could then instead create a HCL script and then compare that against the actual DB, and then find the diff of what needs to be applied at runtime. Very useful.

@a8m
Copy link
Member

a8m commented Nov 18, 2021

Hey @gedw99 and thanks for reaching out.

The underlying schemas specification is "generic" (language agnostic), and HCL was started as a first experiment for implementing it. We plan to provide also support for JSON, SQL, TypeScript, and a Go API for defining the schema as well. You can find more about it on atlas/schemaspec.

Normally a developer would create a migration script as they work.
Alternatively, they can also diff two databases later to produce a migration script.

Both options will be supported in the upcoming releases. A way to move from the current database state to the desired state (defined in HCL for example), and a way to generate a migration spec/script.

I ask this because i am facing this issue many databases at the moment. The databases are NOT controlled by a DBA or DEV; but have new data schemas being developed at runtime by users, and so using HCL provides a way to determine the difference between the actual schema of the database and the intended one.

Also JSON Schema is used by the User to describe what they want the DB to model. These JSON Schema are then translated at runtime into DB Migration scripts. So i could then instead create a HCL script and then compare that against the actual DB, and then find the diff of what needs to be applied at runtime. Very useful.

We plan to provide more than this. Please, if you have time to discuss this, let me know how I can contact you. I'll be happy to share with you the project roadmap and get your feedback 😃

Please, feel free to ping me on ent's Slack channel or email.

@gedw99
Copy link
Author

gedw99 commented Nov 19, 2021

thanks @a8m

Yeah i am really interested in what Atlas provides, and would love to discuss things and find out more

Telegram: http://t.me/gedw99

I also messaged you on slack too.

so take your pick :)

@a8m
Copy link
Member

a8m commented Dec 1, 2021

Hey @gedw99 and sorry for the delay. Let's continue the discussion on Slack.

@a8m a8m closed this as completed Dec 1, 2021
@gedw99
Copy link
Author

gedw99 commented Dec 1, 2021

No probs . Yep see you there sometime

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

2 participants