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

feat: WorkspaceResources interface and List method #820

Conversation

stefan-kiss
Copy link
Contributor

Description

Implementing missing Workspace Resources api

Testing plan

External links

Output from tests

go test ./... -run TestWorkspaceResourcesList -timeout=30m
?   	github.com/hashicorp/go-tfe/examples/backing_data	[no test files]
?   	github.com/hashicorp/go-tfe/examples/configuration_versions	[no test files]
?   	github.com/hashicorp/go-tfe/examples/organizations	[no test files]
?   	github.com/hashicorp/go-tfe/examples/registry_modules	[no test files]
?   	github.com/hashicorp/go-tfe/examples/run_errors	[no test files]
?   	github.com/hashicorp/go-tfe/examples/state_versions	[no test files]
?   	github.com/hashicorp/go-tfe/examples/users	[no test files]
?   	github.com/hashicorp/go-tfe/examples/workspaces	[no test files]
?   	github.com/hashicorp/go-tfe/mocks	[no test files]
ok  	github.com/hashicorp/go-tfe	7.276s

@stefan-kiss stefan-kiss requested a review from a team as a code owner November 18, 2023 14:19
@hashicorp-cla
Copy link

hashicorp-cla commented Nov 18, 2023

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@brandonc brandonc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! Thanks for making the contribution. I only found one very small tweak. What's really surprising is that the README says that the resource is available when it was, in fact, not.

Provider string `jsonapi:"attr,provider"`
ProviderType string `jsonapi:"attr,provider-type"`
ModifiedByStateVersionID string `jsonapi:"attr,modified-by-state-version-id"`
NameIndex string `jsonapi:"attr,name-index"`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make this field type a *string to reflect the fact that it can be null?

@brandonc brandonc linked an issue Nov 22, 2023 that may be closed by this pull request
@brandonc
Copy link
Collaborator

@stefan-kiss We're actually prepping a release right now so I'm going to bring your commits into the repo and add the quick change I recommended.

@brandonc brandonc merged commit 19f4398 into hashicorp:main Nov 22, 2023
1 check passed
Copy link

Reminder to the contributor that merged this PR: if your changes have added important functionality or fixed a relevant bug, open a follow-up PR to update CHANGELOG.md with a note on your changes.

@stefan-kiss
Copy link
Contributor Author

@stefan-kiss We're actually prepping a release right now so I'm going to bring your commits into the repo and add the quick change I recommended.

sorry, i missed the earlier comments but yes, it's perfectly fine. didnt realise it could be null :) anyway glad it was merged & thank you!

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

Successfully merging this pull request may close these issues.

missing function(s) to get workspace-resources
3 participants