Resource: awsIdentitystoreGroupMembership
Terraform resource for managing an AWS IdentityStore Group Membership.
Example Usage
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const dataAwsSsoadminInstancesExample =
new aws.dataAwsSsoadminInstances.DataAwsSsoadminInstances(
this,
"example",
{}
);
const awsIdentitystoreGroupExample =
new aws.identitystoreGroup.IdentitystoreGroup(this, "example_1", {
description: "Some group name",
displayName: "MyGroup",
identityStoreId: `\${tolist(${dataAwsSsoadminInstancesExample.identityStoreIds})[0]}`,
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsIdentitystoreGroupExample.overrideLogicalId("example");
const awsIdentitystoreUserExample = new aws.identitystoreUser.IdentitystoreUser(
this,
"example_2",
{
displayName: "John Doe",
identityStoreId: `\${tolist(${dataAwsSsoadminInstancesExample.identityStoreIds})[0]}`,
name: {
familyName: "Doe",
givenName: "John",
},
userName: "john.doe@example.com",
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsIdentitystoreUserExample.overrideLogicalId("example");
const awsIdentitystoreGroupMembershipExample =
new aws.identitystoreGroupMembership.IdentitystoreGroupMembership(
this,
"example_3",
{
groupId: awsIdentitystoreGroupExample.groupId,
identityStoreId: `\${tolist(${dataAwsSsoadminInstancesExample.identityStoreIds})[0]}`,
memberId: awsIdentitystoreUserExample.userId,
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsIdentitystoreGroupMembershipExample.overrideLogicalId("example");
Argument Reference
The following arguments are supported:
memberId
- (Required) The identifier for a user in the Identity Store.groupId
- (Required) The identifier for a group in the Identity Store.identityStoreId
- (Required) Identity Store ID associated with the Single Sign-On Instance.
Attributes Reference
In addition to all arguments above, the following attributes are exported:
membershipId
- The identifier of the newly created group membership in the Identity Store.
Import
awsIdentitystoreGroupMembership
can be imported using the identityStoreId/membershipId
, e.g.,