GroupMember
Manages a single Group Membership within Azure Active Directory.
NOTE: Do not use this resource at the same time as
azuread_group.members.
Example Usage
using Pulumi;
using AzureAD = Pulumi.AzureAD;
class MyStack : Stack
{
public MyStack()
{
var exampleUser = Output.Create(AzureAD.GetUser.InvokeAsync(new AzureAD.GetUserArgs
{
UserPrincipalName = "jdoe@hashicorp.com",
}));
var exampleGroup = new AzureAD.Group("exampleGroup", new AzureAD.GroupArgs
{
});
var exampleGroupMember = new AzureAD.GroupMember("exampleGroupMember", new AzureAD.GroupMemberArgs
{
GroupObjectId = exampleGroup.Id,
MemberObjectId = exampleUser.Apply(exampleUser => exampleUser.Id),
});
}
}
Coming soon!
import pulumi
import pulumi_azuread as azuread
example_user = azuread.get_user(user_principal_name="jdoe@hashicorp.com")
example_group = azuread.Group("exampleGroup")
example_group_member = azuread.GroupMember("exampleGroupMember",
group_object_id=example_group.id,
member_object_id=example_user.id)import * as pulumi from "@pulumi/pulumi";
import * as azuread from "@pulumi/azuread";
const exampleUser = pulumi.output(azuread.getUser({
userPrincipalName: "jdoe@hashicorp.com",
}, { async: true }));
const exampleGroup = new azuread.Group("example", {});
const exampleGroupMember = new azuread.GroupMember("example", {
groupObjectId: exampleGroup.id,
memberObjectId: exampleUser.id,
});Create a GroupMember Resource
new GroupMember(name: string, args: GroupMemberArgs, opts?: CustomResourceOptions);def GroupMember(resource_name, opts=None, group_object_id=None, member_object_id=None, __props__=None);func NewGroupMember(ctx *Context, name string, args GroupMemberArgs, opts ...ResourceOption) (*GroupMember, error)public GroupMember(string name, GroupMemberArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args GroupMemberArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args GroupMemberArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args GroupMemberArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
GroupMember Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The GroupMember resource accepts the following input properties:
- Group
Object stringId The Object ID of the Azure AD Group you want to add the Member to. Changing this forces a new resource to be created.
- Member
Object stringId 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.
- Group
Object stringId The Object ID of the Azure AD Group you want to add the Member to. Changing this forces a new resource to be created.
- Member
Object stringId 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.
- group
Object stringId The Object ID of the Azure AD Group you want to add the Member to. Changing this forces a new resource to be created.
- member
Object stringId 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.
- group_
object_ strid The Object ID of the Azure AD Group you want to add the Member to. Changing this forces a new resource to be created.
- member_
object_ strid 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.
Outputs
All input properties are implicitly available as output properties. Additionally, the GroupMember resource produces the following output properties:
Look up an Existing GroupMember Resource
Get an existing GroupMember resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: GroupMemberState, opts?: CustomResourceOptions): GroupMemberstatic get(resource_name, id, opts=None, group_object_id=None, member_object_id=None, __props__=None);func GetGroupMember(ctx *Context, name string, id IDInput, state *GroupMemberState, opts ...ResourceOption) (*GroupMember, error)public static GroupMember Get(string name, Input<string> id, GroupMemberState? state, CustomResourceOptions? opts = null)- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
The following state arguments are supported:
- Group
Object stringId The Object ID of the Azure AD Group you want to add the Member to. Changing this forces a new resource to be created.
- Member
Object stringId 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.
- Group
Object stringId The Object ID of the Azure AD Group you want to add the Member to. Changing this forces a new resource to be created.
- Member
Object stringId 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.
- group
Object stringId The Object ID of the Azure AD Group you want to add the Member to. Changing this forces a new resource to be created.
- member
Object stringId 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.
- group_
object_ strid The Object ID of the Azure AD Group you want to add the Member to. Changing this forces a new resource to be created.
- member_
object_ strid 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.
Package Details
- Repository
- https://github.com/pulumi/pulumi-azuread
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azureadTerraform Provider.