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

Manage Kinds using Terraform #183

Open
atalema opened this issue Sep 13, 2023 · 7 comments
Open

Manage Kinds using Terraform #183

atalema opened this issue Sep 13, 2023 · 7 comments

Comments

@atalema
Copy link

atalema commented Sep 13, 2023

Is there a way to manage to LaunchDarkly context kinds using the terraform LD provider?

@ldhenry
Copy link
Collaborator

ldhenry commented Sep 13, 2023

Hey @atalema,

Currently this is not possible today, but we do have plans to add support for this in the future. We'll be sure to update this issue when it's available.

Thanks,
Henry

@atalema
Copy link
Author

atalema commented Sep 14, 2023

Thanks Henry for getting back to me. Do you've a suggestion on how to manage kinds using terraform, till we get the support using LD provider? One idea came to my mind, is to use terraform HTTP provider to communicate with LD API https://registry.terraform.io/providers/hashicorp/http/latest/docs/data-sources/http any thoughts on this one?

@ldhenry
Copy link
Collaborator

ldhenry commented Sep 14, 2023

I don't have an experience with the HTTP provider but it looks like you can only use it to make GET requests. This could be useful if you want to reference an existing context kind in your Terraform config, however you would need to use something else to create and update the context kinds.

Do you have an idea on the number of context kinds you plan to manage? If the number is small you could use the LaunchDarkly UI to create and update your context kinds until the new Terraform provider resource is available.

@atalema
Copy link
Author

atalema commented Sep 15, 2023

you're right, it's allows POST but for readonly urls. Which means only supports GET scenarios. Alternatively, I found this provider https://registry.terraform.io/providers/Mastercard/restapi/latest/docs which is a full rest api provider. I believe I can use to create / update the context kind. Another option, I could write a python script which could do the job creating the kind.

They're not huge it could end up as 20+ but the problem is not about the number, is around:

  • How can we maintain some consistency across, so we don't end up with different kinds trying to achieve the same thing. Which it would end up eating our MAU quota quickly.
  • How can we govern these changes through Infra-structure as code. We do today allow creating projects only through raising a PR for our terraform project. Which enables us to have a point of discussion with teams.

Thanks for taking the time to give your thoughts on this issue.

@ldhenry
Copy link
Collaborator

ldhenry commented Sep 15, 2023

That makes sense. For now, I would recommend enforcing a custom role on most members that prevents them from creating context kinds. Hopefully this can tide you over until we have a dedicated terraform provider resource available.

@EDN-liamkelly
Copy link

EDN-liamkelly commented Mar 21, 2024

Any progress on this?

Just to extend on @atalema response. I attempted to use the Mastercard provider but the response does not return anything unique (such as the context key) which can be used to manage Terraform state. As a temporary patch, it would be good to include this so that we can at least use third party providers.

@drewpc
Copy link

drewpc commented May 30, 2024

+1

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

4 participants