How can I configure a fusionauth docker image from scrach using only terraform
-
I tried to have a fusionauth instance up and running with docker compose file as the official doc stated here. but the only problem with that is that I do not wanna use kickstart.json to configure my fusionauth. And then I realized that without a
apiKey
my terrafrom resources cannot do anything since they will get a connection refused since they do not have any apiKey, so what can I do?Is there any kind of docker env or java env to pass to the container while creating it to create the api key automatically while creating container.
-
Hiya @kasir-barati , welcome to the FusionAuth community!
Is there any kind of docker env or java env to pass to the container while creating it to create the api key automatically while creating container.
Unfortunately no. You can create a kickstart.json which has a single key. That's the recommended way to bootstrap FusionAuth if you want to manage everything through Terraform afterwards. Because you are correct, you'll need an API key.
We have a terraform guide we're about to publish, but you can view it here: https://github.com/FusionAuth/fusionauth-site/pull/2323/files . That is not fully reviewed, but should still be helpful to read.
Can you explain why you don't want to use Kickstart at all?
-
This post is deleted! -
@dan because I really feel not comfortable with configuring something partly with Terraform. As an example look at how I can configure a Postgres purely with Terraform and I just need to have it configured only with Terraform.
TBH I am not gonna be so picky about it since I know that I can actually also do configure my fusionauth only with terraform.
Why I am so sold on the idea of configuring it only through Terraform? because then I have only one location that is dealing with configuring my infrastructure and also terraform is a wonderful tool for having a better overview of everything.
I managed to keep my configurations inside the
kickstart.json
to a minimum and configure my fusionauth with terraform -
@kasir-barati Makes sense. Thanks for the feedback!