https://pulumi.com logo
Title
f

flat-laptop-90489

09/27/2021, 4:53 PM
Is it possible to import this resource? I don't see it on this docs page, and I'm struggling to come up with an import command: https://www.pulumi.com/docs/reference/pkg/aws/iam/groupmembership/
Interesting. Running
pulumi up
seems to have essentially imported it since it already created it. On a second run, it starts to try making changes
l

little-cartoon-10569

09/27/2021, 8:23 PM
GroupMembership isn't an AWS resource, it's a Terraform construct to support the
addUserToGroup
SDK call. I've never imported IAM groups, but hopefully when you ran that import, the GroupMembership code should have been produced at the same time?
If not, you'll have to write the GroupMembership yourself.
f

flat-laptop-90489

09/27/2021, 10:35 PM
I had already written the group membership, and was planning to import. Couldn't get the import to work, so I just ran update and it seemed to be fine. The fact that it isn't a real resource and wraps the addUser SDK makes a ton of sense and I think explains all the behavior we are seeing