-
Notifications
You must be signed in to change notification settings - Fork 137
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 new resource opsgenie_team_membership, refs #65 #167
base: master
Are you sure you want to change the base?
Conversation
old one somehow became dirty #156 |
return &schema.Resource{ | ||
Create: resourceOpsGenieTeamMembershipCreate, | ||
Read: handleNonExistentResource(resourceOpsGenieTeamMembershipRead), | ||
//Update: resourceOpsGenieTeamMembershipUpdate, // requires https://github.com/opsgenie/opsgenie-go-sdk-v2/issues/59 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pr looks good i'll talk with the internal team about go-sdk-v2 membership update status
Thank you @arnisoph
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't have update support. if we introduce this users cannot change roles in their teams. I'll create a internal ticket and let you know.
maybe we can use update function to
-> get team -> update our user role -> update team flow
This way we can update our team members ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't even plan to implement it, it's just a comment :D
1b3b3bd
to
dbb5597
Compare
any necessary changes pending? |
@ffahri any pending changes required in this PR? |
@arnisoph yes for update members please use team api it takes patch and we can pass the member inside that request |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use team api to update members (api supports)
??? |
You need the full member list for this. I don't see how we can use this for opsgenie_team_membership |
@ffahri 👋 :D |
You dont need the full member list for that as you can see endpoint is supported in PATCH operations so you just need to send changed user is enough |
Signed-off-by: Arnold Bechtoldt <[email protected]>
dbb5597
to
ac29d0d
Compare
@ffahri sorry I still don't understand. Can you please show me how a PATCH request would look like when removing a member from a team? I don't even understand this broken sentence in the docs:
To which list does the first sentence refer? Why can't we merge the current PR which is just working and meets the requirements of the initial feature request? We can still make it perfect afterwards if really necessary... |
Hi all - sorry to revive a long dead PR - this is a feature we have wanted for some time as we cannot effectively manage team membership via Terraform for OpsGenie without segmenting out membership from the team creation. Is there any chance of this PR being dusted of and merged or would I better off taking this PR as inspiration and submitting a new one? |
As an update have solved this with the
One major drawback still is that it is impossible with this provider to assert that the user is attached to the team as there is no GET request for an individual membership to the team - so its needed instead to parse out the teams API member list and check for existence in there. Its possible to check for in a bit of a difficult way like so with TF v1.2.x:
|
please, someone could merge this feature? Its very important to manage team members changes |
Signed-off-by: Arnold Bechtoldt [email protected]