-
Notifications
You must be signed in to change notification settings - Fork 71
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
Utility to autogenerate a terraform module #1518
Comments
Thank you for reporting us your feedback! The internal ticket has been created: https://warthogs.atlassian.net/browse/CRAFT-2492.
|
Thanks @sed-i for opening the issue. That's great idea to generate Terraform modules of each charm by the help of charmcraft. As a Telco team, we manually produced the Terraform modules for each SD-Core charms as we are aiming to replace the bundles with high level Terraform modules. We tried to keep the things as much as generic to reduce the maintenance cost. For example, used monolithic configuration instead of expanding each config parameters. However, we still need to maintain the relation endpoints manually. The charms' Terraform modules could be used in the integration tests. Setting a an integration environment and testing the scenarios using Terraform will be quite straightforward. The Terraform module's structure seems explicit. I hope it will be feasible to generate them automatically. |
I think it would be really cool to have it. This would significantly minimize the effort of creating modules. Having that said, I see two things worth mentioning:
|
I've never actually created a terraform module so I'm not sure how feasible this is, but looking at the source docs I don't see why not. My main concern is that Charmcraft will probably need to generate pretty opinionated versions of these, and if I used my own novice opinions it would probably produce some bad ones, so I'd like to get stakeholder feedback on it. Would it be reasonable to use jinja templates to generate the Terraform modules? We're already using them for |
What needs to get done
Terraform modules for charms seem to be quite deterministic and repeatable, for example:
If indeed possible, it would be great to enable this for the entire ecosystem with something like
charmcraft terraform
tox -e terraform
And have it evolve organically with each charm.
Why it needs to get done
A uniform solution for the entire ecosystem, simplifying maintenance overhead for multiple teams.
The text was updated successfully, but these errors were encountered: