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

Add data source for templates #341

Closed
chris-ackerman-dentsu opened this issue Apr 22, 2022 · 1 comment · Fixed by #345
Closed

Add data source for templates #341

chris-ackerman-dentsu opened this issue Apr 22, 2022 · 1 comment · Fixed by #345
Assignees
Labels
enhancement New feature or request

Comments

@chris-ackerman-dentsu
Copy link

chris-ackerman-dentsu commented Apr 22, 2022

Add a new data source to list all templates in the org.
This should provide a list of all the templates names in a given Org.

This list should be able to be used to create a template data source based on the names returned.

Usage example:

data "env0_templates" "all_templates" {
organization = "1234" # The organization is normally part of the API key, just placed this here as an example
search = "Some search text " # This is not part of the current ticket requirement, but an example of how this can be used in the future....
}

data "env0_template" "templates" {
for_each = tomap(data.env0_templates.all_templates.names)
name = each.value
}

Relevant API:

@yaronya
Copy link
Contributor

yaronya commented Apr 24, 2022

Hello @chris-ackerman-dentsu
Thanks for the suggestion! We'll put this into our ongoing issues 💪

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants