Skip to content

New Resource: role_assignment #85

@drdamour

Description

@drdamour

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:

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:

  1. (preferred) add the admin_role_id as an output of contentful_space resource (and the data contentful_space too)
  2. 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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions