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

Datasource to get all environments for a given project #89

Open
jsearles opened this issue Mar 18, 2022 · 2 comments
Open

Datasource to get all environments for a given project #89

jsearles opened this issue Mar 18, 2022 · 2 comments

Comments

@jsearles
Copy link

It seems like the environments for a project should be a nested resource for the "launchdarkly_project" data source but it's not. Looking at the other available data sources I am not seeing one that returns all environments. Does this ability exist? (Using version 2.5.0 currently.)

@ldhenry
Copy link
Collaborator

ldhenry commented Mar 18, 2022

Hey @jsearles,

Thanks for bringing this to our attention. It does seem like the launchdarkly_project data source would be a good home for this. Out of curiosity, what is your use case for this? Do you need detailed environment information or just the environment keys?

Thanks,
Henry

@jsearles
Copy link
Author

Just the keys. The use case is we'd like to allow the ability for developers to opt into enabling the flag in all environments when creating the flag. Right now it looks like we'd need to maintain a hardcoded list of keys which isn't ideal as different projects may have different environments.

We should be able to achieve the same effect by flipping the on/off variation defaults when creating the flag, though I believe having them toggled on would be more intuitive to users of the LD portal.

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

2 participants