flagr icon indicating copy to clipboard operation
flagr copied to clipboard

Terraform module

Open kbariotis opened this issue 1 year ago • 3 comments

Hey everyone and thank you for this project.

This is a feature request to have a terraform module so we can keep our flags under version control. I'm not sure if this has been discussed before, please let me know if it has.

Thank you

kbariotis avatar Sep 20 '22 12:09 kbariotis

@kbariotis thanks for your request.

Actually, I have a prototype with a few functions working for the terraform module. However, there are a few things in the API that make this slightly difficult.

In any case, to be able to make a targeted trial with you, could you share your usecase? e.g.: what types of flags and how are you going to integrate them with terraform?

I have just made the repo public, I haven't actually worked on it during 2022 because I wasn't using it but I am happy to experiment an alpha version.

https://github.com/openflagr/terraform-provider-flagr

marceloboeira avatar Sep 21 '22 08:09 marceloboeira

oh that looks great @marceloboeira , thank you for that.

So what I'm thinking is that I would like to automate the creation of the flag and its initial values across different environments (staging, prod, etc), but not necessarily dictate the distributions and leave those to be changed through the UI.

I guess there are multiple use cases there, one would also want to set those distributions and have them set only through the code.

what do you think?

kbariotis avatar Sep 21 '22 09:09 kbariotis

Yes, the idea is to make it possible to automate things without requiring others. Since most of them are different resources on flagr backend, it is fairly easy to do that (creating flags but not necessarily managing the distributions ...). We can allow ignoring/not-managing such attributes.

I'll see if I can get an alpha "0.0.1" published so that we can start testing it over the weekend. Right now it only works building from source. I believe I need to check if @zhouzhuojie can create the terraform provider org with openflagr github org and then I can generate the private keys and publish the terraform provider version.

marceloboeira avatar Sep 21 '22 11:09 marceloboeira