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
New resource 'azuread_group_member' #63
Conversation
Related: #36 |
@tombuildsstuff @katbyte |
@tiwood, we are currently busy with .12 and some work on the azurerm provider. Unfortunately I can't make any promises but I hope to earmark some time towards azuread in a couple weeks near the end of the month. |
Additionally i'd like to support setting group members via the group resource itself at the same time this is released. |
I will look into this in the next days. |
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.
Hi @tiwood,
Thanks for the resource. Overall this looks pretty good to me and i've only left a couple comment inline. I would like to see support for setting group members from the group resource at the same time we merge this. If thats to big of ask let me know and i am happy to implement it myself.
} | ||
|
||
_, err := client.AddMember(ctx, groupID, properties) | ||
if err != nil { |
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.
minor these two lines can be merged:
if _, err := client.AddMember(ctx, groupID, properties); err != nil {
} | ||
|
||
err = members.NextWithContext(ctx) | ||
if err != nil { |
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.
These two lines could be merged
} | ||
|
||
if memberObjectID == "" { | ||
log.Printf("[DEBUG] Azure AD Group Member was not found (groupObjectId:%q / memberObjectId:%q ) - removing from state!", groupID, memberID) |
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.
Is this debug log redundant as we immediately return an error?
|
||
The following arguments are supported: | ||
|
||
* `group_object_id` - (Required) The Object ID of the Azure AD Group you want to add the Member to. |
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.
Can we note that this forces a new resource?
* `group_object_id` - (Required) The Object ID of the Azure AD Group you want to add the Member to. | |
* `group_object_id` - (Required) The Object ID of the Azure AD Group you want to add the Member to. Changing this forces a new resource to be created. |
The following arguments are supported: | ||
|
||
* `group_object_id` - (Required) The Object ID of the Azure AD Group you want to add the Member to. | ||
* `member_object_id` - (Required) The Object ID of the Azure AD Object you want to add as a Member to the Group. Supported Object types are Users, Groups or Service Principals. |
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.
* `member_object_id` - (Required) The Object ID of the Azure AD Object you want to add as a Member to the Group. Supported Object types are Users, Groups or Service Principals. | |
* `member_object_id` - (Required) The Object ID of the Azure AD Object you want to add as a Member to the Group. Supported Object types are Users, Groups or Service Principals. Changing this forces a new resource to be created. |
memberID := id[1] | ||
|
||
resp, err := client.RemoveMember(ctx, groupID, memberID) | ||
|
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.
Any idea about ETA for this PR, @tiwood ? Can I help in any way? |
@landro, looks like PR comments still need to be addressed as well as adding the members property to the group resource |
@katbyte Would a new PR (based on this PR) be acceptable (with fixes)? |
@evenh, yep given this has sat for a month i think its reasonable to open a new one. |
Ok Great. You can expect a pull request from @evenh tomorrow.
… 6. jun. 2019 kl. 17:56 skrev kt ***@***.***>:
@evenh, yep given this has sat for a month i think its reasonable to open a new one.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
One thing also is i was going to use |
no bother @tiwood, thank you for starting them 🙂 |
closing in favour of #100 |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks! |
This adds a new resource to manage Azure AD Group Membership with Terraform.
Example Usage
Argument Reference
The following arguments are supported:
group_object_id
- (Required) The Object ID of the Azure AD Group you want to add the Member to.member_object_id
- (Required) The Object ID of the Azure AD Object you want to add as a Member to the Group. Supported Object types are Users, Groups or Service Principals.