-
Notifications
You must be signed in to change notification settings - Fork 12
Description
i would like to be able to assign roles to teams in a space with terraform. This is kind of a followup to #58 which let me define roles, and also #84 which would let me define a team.
It's inputs would be:
- space_id
- team_id - an output attribute from New Resource: contentful_team #84
- role_id - an output attribute from Support Managing Roles #58
though the way the web gui works...i can either assign admin or a set of roles. I'd much prefer to assign 1 role per resource...but if the backing http services ONLY supports those options the inputs need to be a bit different. probalby each role would be a block identifying the roles.
for the admin role, there's a bit of trickiness because https://registry.terraform.io/providers/labd/contentful/latest/docs/resources/space results in a admin role being auto created, and doesn't provide the id of that admin role. this could be solved 2 ways:
- (preferred) add the admin_role_id as an output of contentful_space resource (and the data contentful_space too)
- have a property or block of this new role_assignemnt resource that flags it's the admin role being assigned, with some check in provider that either admin or roles are assigned mutually exclusively
it's output attributes would be:
- id - ?? i'm guessing contentful assigns the assignment an id...though this wouldnt' be use for anything yet i guess