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 List() to retreieve GPG Keys #471

Closed
straubt1 opened this issue Jul 18, 2022 · 3 comments
Closed

[Feature Request] Add List() to retreieve GPG Keys #471

straubt1 opened this issue Jul 18, 2022 · 3 comments
Labels
confirmed enhancement New feature or request

Comments

@straubt1
Copy link
Contributor

GPG key functions exist, but List() is missing.

https://github.com/hashicorp/go-tfe/blob/main/gpg_key.go

Docs: Docs: https://www.terraform.io/cloud-docs/api-docs/private-registry/gpg-keys

Potential interface change:

type GPGKeys interface {
	... existing

	// List all GPG keys.
	List(ctx context.Context, organizationName string) (*GPGKeyList, error)
}
@annawinkler
Copy link
Contributor

Thank you for submitting this issue! It is interesting that the API does not have list. It seems like a reasonable request though! I'll ask 🥳

@annawinkler annawinkler added confirmed enhancement New feature or request labels Jul 22, 2022
@straubt1
Copy link
Contributor Author

straubt1 commented Jul 25, 2022

I was able to shim this with this url format if that helps.

url := fmt.Sprintf(
  "https://%s/api/registry/private/v2/gpg-keys?filter[namespace]=%s",
  c.Hostname,
  c.OrganizationName,
)

@annawinkler
Copy link
Contributor

Addressed with merged PR.

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

2 participants