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

[Feature Request] Add filter options when listing Terraform Versions #223

Open
straubt1 opened this issue May 22, 2021 · 5 comments
Open
Labels
confirmed enhancement New feature or request

Comments

@straubt1
Copy link
Contributor

Terraform Versions have several attributes that can be filtered on:

  • official (true or false)
  • enabled (true or false)
  • beta (true or false)
  • usage (when 0 or non zero)

Suggesting adding these filters to the List() function ->

func (a *adminTerraformVersions) List(ctx context.Context, options AdminTerraformVersionsListOptions) (*AdminTerraformVersionsList, error) {

@chrisarcand
Copy link
Member

This would be great, but note that they can't currently be filtered on in the API, so the platform would have to add that before anything can be done for that here. I would suggest creating a field request for this as this issue tracker does not get reviewed for potential API additions to the platform.

@chrisarcand chrisarcand added the enhancement New feature or request label May 22, 2021
@straubt1
Copy link
Contributor Author

Thanks @chrisarcand!
I thought this worked however checking again, you are correct, the enabled=true flag does not actually do anything when added to the query string :)

@uturunku1
Copy link
Collaborator

uturunku1 commented Feb 7, 2022

@straubt1 Hi Tom! We have recently added a filtering and searching functionality for listing terraform versions with go-tfe. Here is documentation for how to use those new query params: https://www.terraform.io/cloud-docs/api-docs/admin/terraform-versions#query-parameters
Now I know this not exactly the feature you requested on this Github Issue, but I thought perhaps this new functionality could be helpful to the use case you have in mind 🤞. If this doesn't help for filtering/searching for enabled, official or beta versions the way you wanted, I'd be great if you can provide me with more details on the use cases that you'd be solving for by having a boolean for additional attributes. I appreciate the feedback!

@annawinkler
Copy link
Contributor

I reached out to @straubt1 in Slack to find out if there are any remaining issues for this issue.

@annawinkler
Copy link
Contributor

Talking with @straubt1 and it sounds like the hope is that the feature could be available in the SDK one day and not just in the API, so I'll leave this open.

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

No branches or pull requests

4 participants