[FEAT]: What should github_membership do if the invitation is expired? #1518
Labels
Status: Needs info
Full requirements are not yet known, so implementation should not be started
Status: Pinned
A way to keep old or long lived issues around
Type: Feature
New feature or request
Type: Support
Any questions, information, or general needs around the SDK or GitHub APIs
Describe the need
Imagine I've invited a bunch people in the organisation at once using:
By Murphy's law of course a couple of them missed the invitation email and all the reminders, and so their invitation was expired. However, the resource doesn't report an update in the plan: it has created an invitation, it exists, it's UP-TO-DATE. On the members page, however, you can see those expired invitations.
However, I can look at that that there is an «error» in the resource: the person is not in the organisation. One can look at that like the membership is tainted: for some reason the invitation in question needs to be recreated (or at least destroyed). Even more, if I would manually
terraform taint
that membership it would be recreated on nextapply
.One way to do this could be by tracking in Terraform state the state of the invitation:
SENT
when it's created,ACCEPTED
when it was accepted in time and the person is the member,EXPIRED
when it wasn't used,MISSING
if a person is not a member and the invitation is gone.(the wording is, of course, just a draft, and I might be missing cases).
I don't know how exactly it is reported in the API, but it might be a partially client-side state.
That could provide several features:
status: EXPIRED -> SENT
(if still wanted) or dispose and destroy it (if not wanted anymore).SDK Version
No response
API Version
No response
Relevant log output
Code of Conduct
The text was updated successfully, but these errors were encountered: