Page MenuHomePhabricator

[terraform] [services] [8/n] Add lambda trigger for reserved usernames
ClosedPublic

Authored by will on Jan 1 2024, 9:31 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 9, 11:05 PM
Unknown Object (File)
Sat, Nov 9, 12:40 PM
Unknown Object (File)
Oct 14 2024, 11:26 PM
Unknown Object (File)
Oct 14 2024, 11:26 PM
Unknown Object (File)
Oct 14 2024, 11:26 PM
Unknown Object (File)
Oct 14 2024, 11:25 PM
Unknown Object (File)
Oct 14 2024, 11:25 PM
Unknown Object (File)
Oct 14 2024, 11:25 PM
Subscribers

Details

Summary

This adds an event trigger to have the lambda function add userID and usernames

Test Plan

Tested on staging with successful insertion

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Jan 1 2024, 9:37 PM
Harbormaster failed remote builds in B25417: Diff 35118!

Rebase resolve build errors

will requested review of this revision.Jan 3 2024, 5:43 PM
varun requested changes to this revision.Jan 4 2024, 3:17 PM
varun added inline comments.
services/terraform/remote/aws_iam.tf
260 ↗(On Diff #35180)

the read_identity_users_stream policy document includes the resource module.shared.dynamodb_tables["identity-users"].arn. why don't we have an equivalent resource here?

266 ↗(On Diff #35180)

why do we need a new iam policy? can't we use a single policy for reading both streams?

This revision now requires changes to proceed.Jan 4 2024, 3:17 PM
services/terraform/remote/aws_iam.tf
260 ↗(On Diff #35180)

After testing, this resource arn doesn't seem to be necessary for the lambda to read the stream records. I'll need to remove its equivalent for identity-users before landing.

266 ↗(On Diff #35180)

We definitely can. I'll combine them

Combine reserved username stream policy into identity users policy

This comment was removed by will.
will planned changes to this revision.Jan 5 2024, 11:22 AM
will planned changes to this revision.Jan 5 2024, 7:54 PM
This revision is now accepted and ready to land.Jan 16 2024, 3:48 PM
This revision now requires review to proceed.Jan 16 2024, 4:03 PM
This revision is now accepted and ready to land.Jan 16 2024, 10:05 PM