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

Better support for multiple environments via workspaces #232

Open
chimericdream opened this issue Aug 23, 2023 · 0 comments
Open

Better support for multiple environments via workspaces #232

chimericdream opened this issue Aug 23, 2023 · 0 comments

Comments

@chimericdream
Copy link
Contributor

We have been using this plugin to manage our FA themes for some time, and I recently made some improvements to that process. We now have discrete Terraform workspaces for our internal/dev FusionAuth instance and our production instance. For themes, this is working like a charm. However, I have begun looking into the possibility of using Terraform to manage more of our FA installation, such as forms and form fields. Fields don't look like they will be problematic, but forms do. The Terraform configuration for a form resource requires an array of IDs referring to the fields used by that form. However, those IDs will be different across different FusionAuth instances. I would like to avoid hardcoding environment-specific details in the Terraform configuration. Would it be possible to allow referencing those using the internal Terraform identifier?

For example, we deploy multiple themes which have a lot of common configuration. As such, I use Terraform's for_each mechanism as follows:

resource "fusionauth_theme" "namespace" {
  for_each = local.template_keys
  // ...
}

I can then target individual themes as needed by their address of fusionauth_theme.namespace["theme_key"].

I'd love to be able to do something similar with form fields (and any resource which similarly requires hard-coded IDs), where I could use fusionauth_form_field["some_key"].id, or something along those lines.

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

1 participant