tryretool / terraform-retool-modules

MIT License
23 stars 39 forks source link

User-defined environment vars should be loaded after ones defined in this module #43

Open dmattia opened 6 months ago

dmattia commented 6 months ago

Right now, there is no way to override environment variables this module sets.

This is especially problematic given that ENCRYPTION_KEY is always the random string: https://github.com/tryretool/terraform-retool-modules/blob/main/modules/aws_ecs/locals.tf#L42-L45

I would like a way to customize the ENCRYPTION_KEY, but this does not seem possible with this module right now

samsternatretool commented 6 months ago

@dmattia thanks for the feedback! Two questions:

  1. Can you elaborate a bit more on why you need to customize the encryption key? I want to make sure I understand your use case.
  2. Would you be willing to submit a PR implementing this change?
lynnwellhausen commented 6 months ago

@samsternatretool here is the ticket that documents our discovery of the issue. I think that will be helpful for giving you greater context.

samsternatretool commented 6 months ago

@lynnwellhausen thanks for providing that intercom link, that gives me a lot more background. I'm not personally familiar with this behavior but it does seem wrong to me, I'll ask around the team.

In the meantime if you or anyone on your end wants to send a PR with a proposed fix (even if it's just a partial fix that you'd like us to complete), I'd be happy to review.