noqdev / iambic

IAMbic is Version-Control for IAM. It centralizes and simplifies cloud access and permissions. It maintains an eventually consistent, human-readable, bi-directional representation of IAM in Git.

Home Page:https://iambic.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ValueError: 'SUSPENDED' is not a valid GroupMemberStatus

victorSouza-DevOPS opened this issue · comments

Describe the bug
When I've tried to run IAMbic with Google I receive this error

To Reproduce
Run iambic setup against your google workspace

  1. Follow the documentation of IAMbic to setup Google: https://docs.iambic.org/getting_started/google
  2. Run iambic setup and put the information needed
  3. See error

Expected behavior
Setup the Google with IAMbic and you can import the informations about the groups.

Screenshots

status=GroupMemberStatus(member.get("status", GroupMemberStatus.UNDEFINED)), File "/usr/lib64/python3.9/enum.py", line 384, in __call__ return cls.__new__(cls, value) File "/usr/lib64/python3.9/enum.py", line 702, in __new__ raise ve_exc ValueError: 'SUSPENDED' is not a valid GroupMemberStatus

Desktop (please complete the following information):

  • OS: Amazon-Linux
  • Version 2

What I did to resolve?
I had to add the SUSPENDED in models.py on iambic-templates/venv/lib/python3.9/site-packages/iambic/plugins/v0_1_0/google_workspace/models.py.
After I did this, I can run the setup and import smoothly! =)

commented

Nice report @victorSouza-DevOPS , thank you! Would you mind submitting a PR to resolve the issue? If you'd like us to, just say the word and we'd be happy to.

Hi @castrapel ! Ok, I've already send the PR to main branch! #483

commented

Awesome thanks @victorSouza-DevOPS ! There is a CLA it will ask you to sign, but after that it should be good to go and we can merge.

Ok, already signed in on CLA.

this is released in 0.10.3 (sorry somewhat behind on backfilling the Changelog)