Comments (4)
I have an update on this issue. The change you suggested will be included as part of this PR: https://github.com/hashicorp/go-tfe/pull/294/files . So no need to open a separate PR. Thank you for offering the help though!
from go-tfe.
@rmadamanchi Hi and thank you for bringing this up! If you are interested in working on this change, we definitely welcome your initiative. As you are making your changes and if you need assistance, please feel free to ping me directly on your PR and I'll come to your help! Does that sound good?
from go-tfe.
You have added the include
field for locked-by
, but not changed the jsonapi struct model to read the LockedBy
relationship. So this relationship is unusable
from go-tfe.
Previous commenter is correct โย this is still an outstanding omission from the API! In fact, I just ran into a situation in Terraform's cloud integration where I needed it and couldn't have it. ๐ I'm going to re-open this, and make sure it gets a dupe on our jira board.
A notable difficulty with implementing this: locked_by
is a polymorphic relationship in the API, and can be one of:
- Team
- User
- Run
- empty
(I just checked, and yes, org tokens are not allowed to lock a workspace, they get 404 even if they can read the ws.)
So, the actual value of the LockedBy relationship field on the struct will probably have to be a new "faked-up sum type", similar to what I was doing with cloud plan files in Terraform core:
- Struct with three private fields, one for each concrete type.
- Three getter methods that return something like
(*tfe.User, bool)
, to push users to check theok
value before trying to interact with the returned value. - Workspace LockedBy field has a nil pointer for the whole shebang if it ain't locked.
from go-tfe.
Related Issues (20)
- [BUG] unprocessable entity while creating the Workspace HOT 1
- Filter active runs with status exclusion or list of inclusions HOT 2
- Get CurrentUser doesn't return Permission details
- Operation failed: failed uploading filesystem: request failed: PUT, http2: timeout awaiting response headers HOT 3
- Pulling Health information from a given workspace in Terraform Cloud HOT 6
- Filtering workspaces based on tags fails if tag value contains ":" HOT 1
- `Filter` parameter in `OrganizationTagsListOptions` does not work HOT 3
- Test Issue
- AdminSAMLSetting struct does not support signature-signing-method and signature-digest-method attributes HOT 6
- Test Issue 2
- Another Jira Integration Test
- Hello, World HOT 1
- Support more error values when handling HTTP status codes
- missing function(s) to get workspace-resources HOT 2
- Project name attr is not returned properly HOT 5
- Test Bug
- Test FR
- PolicyCheck does not return results hash
- panic: runtime error in stateVersions.Upload HOT 4
- "upgrade" from golang/mock to uber-go/mock
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-tfe.