From af69dda359e79bf2b49bacd4539d0683cf9cfe63 Mon Sep 17 00:00:00 2001 From: Elad Ben-Israel Date: Thu, 6 Jun 2024 16:03:18 +0300 Subject: [PATCH] feat: show connections for token references (#6602) Resolves #6433 by adding a connection edge when resources reference each other through tokens (e.g. a function references `api.url`). The fact that these are implicit references doesn't mean they are not references... ## Console UI Tweaks * Remove the `()` from the connection operations because oftentimes they do not represent an actual method name. If we want to distinguish between operations and other types of connections, we should add this to the model and then display. * Only show the operation when there's a `sourceOp` in the connection. Do not default to the connection name. * In the navigation pane, change the label from "Access" to "Connections". * Restore connections for `invokeAsync()`. Not sure why they were removed (resolves #6607) * Change the node title of topics created for bucket notifications to `OnXxx` instead of `onxxx` (all lowercase). * Change the lift-based connection name to `call`. * Change the title for the queue consumer function to `Consumer` instead of `SetConsumer()`, also `Tick` (for schedules), `Subscriber` (for topics). ## Misc * Make the `source` property of `nodeof(x).addConnection()` optional and default to `this`. ## Checklist - [ ] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted) - [ ] Description explains motivation and solution - [ ] Tests added (always) - [ ] Docs updated (only required for features) - [ ] Added `pr/e2e-full` label if this feature requires end-to-end testing *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*. --- .../console/ui/src/features/map-view.tsx | 2 +- .../console/ui/src/services/use-map.ts | 6 - .../console/ui/src/ui/edge-metadata.tsx | 2 +- docs/docs/04-standard-library/std/node.md | 15 +- examples/tests/sdk_tests/bucket/events.test.w | 27 +- .../test/__snapshots__/bucket.test.ts.snap | 120 +-- libs/wingsdk/src/cloud/bucket.ts | 8 +- libs/wingsdk/src/std/node.ts | 8 +- libs/wingsdk/src/std/resource.ts | 2 +- libs/wingsdk/src/target-sim/app.ts | 37 +- libs/wingsdk/src/target-sim/queue.ts | 4 +- libs/wingsdk/src/target-sim/schedule.ts | 4 +- libs/wingsdk/src/target-sim/topic.ts | 9 +- libs/wingsdk/src/target-tf-aws/queue.ts | 2 +- libs/wingsdk/src/target-tf-aws/schedule.ts | 2 +- libs/wingsdk/src/target-tf-aws/topic.ts | 2 +- libs/wingsdk/src/target-tf-gcp/schedule.ts | 2 +- .../__snapshots__/connections.test.ts.snap | 13 + libs/wingsdk/test/core/connections.test.ts | 43 +- .../target-sim/__snapshots__/api.test.ts.snap | 99 ++- .../__snapshots__/bucket.test.ts.snap | 80 +- .../__snapshots__/file-counter.test.ts.snap | 12 +- .../__snapshots__/queue.test.ts.snap | 12 +- .../__snapshots__/redis.test.ts.snap | 9 +- .../__snapshots__/schedule.test.ts.snap | 12 +- .../__snapshots__/bucket.test.ts.snap | 756 +++++++++--------- .../bucket/events.test.w_compile_tf-aws.md | 486 +++++------ ..._after_class_init.test.w_compile_tf-aws.md | 92 +-- .../valid/resource.test.w_compile_tf-aws.md | 92 +-- tools/hangar/__snapshots__/tree_json.ts.snap | 56 +- 30 files changed, 1104 insertions(+), 910 deletions(-) diff --git a/apps/wing-console/console/ui/src/features/map-view.tsx b/apps/wing-console/console/ui/src/features/map-view.tsx index ef57d63688f..5daf94be144 100644 --- a/apps/wing-console/console/ui/src/features/map-view.tsx +++ b/apps/wing-console/console/ui/src/features/map-view.tsx @@ -352,7 +352,7 @@ const ConstructNode: FunctionComponent> = "font-mono", )} > - {inflight.name}() + {inflight.name} diff --git a/apps/wing-console/console/ui/src/services/use-map.ts b/apps/wing-console/console/ui/src/services/use-map.ts index 1fb7009f98b..a7ee36c77a6 100644 --- a/apps/wing-console/console/ui/src/services/use-map.ts +++ b/apps/wing-console/console/ui/src/services/use-map.ts @@ -228,12 +228,6 @@ export const useMap = ({ expandedItems }: UseMapOptions) => { return bridgeConnections({ connections: rawConnections - .filter((connection) => { - return ( - connection.sourceOp !== "invokeAsync" && - connection.targetOp !== "invokeAsync" - ); - }) .filter((connection) => { return connection.source !== connection.target; }) diff --git a/apps/wing-console/console/ui/src/ui/edge-metadata.tsx b/apps/wing-console/console/ui/src/ui/edge-metadata.tsx index 2812a35e4cd..c64b3cdf881 100644 --- a/apps/wing-console/console/ui/src/ui/edge-metadata.tsx +++ b/apps/wing-console/console/ui/src/ui/edge-metadata.tsx @@ -144,7 +144,7 @@ export const EdgeMetadata = ({
- +
name | str | A name for the connection. | -| source | constructs.IConstruct | The source of the connection. | | target | constructs.IConstruct | The target of the connection. | +| source | constructs.IConstruct | The source of the connection. | | sourceOp | str | An operation that the source construct supports. | | targetOp | str | An operation that the target construct supports. | @@ -590,27 +590,28 @@ A name for the connection. --- -##### `source`Required +##### `target`Required ```wing -source: IConstruct; +target: IConstruct; ``` - *Type:* constructs.IConstruct -The source of the connection. +The target of the connection. --- -##### `target`Required +##### `source`Optional ```wing -target: IConstruct; +source: IConstruct; ``` - *Type:* constructs.IConstruct +- *Default:* this -The target of the connection. +The source of the connection. --- diff --git a/examples/tests/sdk_tests/bucket/events.test.w b/examples/tests/sdk_tests/bucket/events.test.w index 2bebbf6b622..df4a1e82d02 100644 --- a/examples/tests/sdk_tests/bucket/events.test.w +++ b/examples/tests/sdk_tests/bucket/events.test.w @@ -29,15 +29,15 @@ let logHistory = inflight (key: str, operation: str, source: Source) => { b.onDelete(inflight (key: str) => { - logHistory(key, "onDelete()", Source.anyEvent); + logHistory(key, "OnDelete()", Source.anyEvent); }); b.onUpdate(inflight (key: str) => { - logHistory(key, "onUpdate()", Source.anyEvent); + logHistory(key, "OnUpdate()", Source.anyEvent); }); b.onCreate(inflight (key: str) => { - logHistory(key, "onCreate()", Source.anyEvent); + logHistory(key, "OnCreate()", Source.anyEvent); }); b.onEvent(inflight (key: str, event: cloud.BucketEventType) => { @@ -54,6 +54,7 @@ struct CheckHitCountOptions { let checkHitCount = inflight (opts: CheckHitCountOptions): void => { util.waitUntil(inflight () => { let var count = 0; + for u in table.list() { if (u.get("key") == opts.key && u.get("operation") == opts.type && u.get("source") == "{opts.source}") { count = count + 1; @@ -74,19 +75,19 @@ new std.Test(inflight () => { // https://github.com/winglang/wing/issues/2724 if (util.env("WING_TARGET") != "tf-aws") { // assert that onCreate events about the "a", "b", and "c" objects were each produced exactly 1 time - checkHitCount(key: "a", type: "onCreate()", source: Source.anyEvent, count: 1); - checkHitCount(key: "b", type: "onCreate()", source: Source.anyEvent, count: 1); - checkHitCount(key: "c", type: "onCreate()", source: Source.anyEvent, count: 1); + checkHitCount(key: "a", type: "OnCreate()", source: Source.anyEvent, count: 1); + checkHitCount(key: "b", type: "OnCreate()", source: Source.anyEvent, count: 1); + checkHitCount(key: "c", type: "OnCreate()", source: Source.anyEvent, count: 1); - checkHitCount(key: "a", type: "onCreate()", source: Source.onEvent, count: 1); - checkHitCount(key: "b", type: "onCreate()", source: Source.onEvent, count: 1); - checkHitCount(key: "c", type: "onCreate()", source: Source.onEvent, count: 1); + checkHitCount(key: "a", type: "OnCreate()", source: Source.onEvent, count: 1); + checkHitCount(key: "b", type: "OnCreate()", source: Source.onEvent, count: 1); + checkHitCount(key: "c", type: "OnCreate()", source: Source.onEvent, count: 1); - checkHitCount(key: "b", type: "onUpdate()", source: Source.anyEvent, count: 1); - checkHitCount(key: "c", type: "onDelete()", source: Source.anyEvent, count: 1); + checkHitCount(key: "b", type: "OnUpdate()", source: Source.anyEvent, count: 1); + checkHitCount(key: "c", type: "OnDelete()", source: Source.anyEvent, count: 1); - checkHitCount(key: "b", type: "onUpdate()", source: Source.onEvent, count: 1); - checkHitCount(key: "c", type: "onDelete()", source: Source.onEvent, count: 1); + checkHitCount(key: "b", type: "OnUpdate()", source: Source.onEvent, count: 1); + checkHitCount(key: "c", type: "OnDelete()", source: Source.onEvent, count: 1); } }, timeout: 8m) as "hitCount is incremented according to the bucket event"; diff --git a/libs/awscdk/test/__snapshots__/bucket.test.ts.snap b/libs/awscdk/test/__snapshots__/bucket.test.ts.snap index 6fbbfd7d938..a89a7a0028e 100644 --- a/libs/awscdk/test/__snapshots__/bucket.test.ts.snap +++ b/libs/awscdk/test/__snapshots__/bucket.test.ts.snap @@ -270,12 +270,12 @@ def submit_response(event: dict, context, response_status: str, error_message: s }, "Type": "AWS::IAM::Policy", }, - "mybucketAllowBucketNotificationsTomyprojectmybucketonCreate09D19557ECA49DF15": { + "mybucketAllowBucketNotificationsTomyprojectmybucketOnCreate0523E7CD109C74964": { "Properties": { "Action": "lambda:InvokeFunction", "FunctionName": { "Fn::GetAtt": [ - "mybucketonCreate0503ECF25", + "mybucketOnCreate071865324", "Arn", ], }, @@ -316,7 +316,7 @@ def submit_response(event: dict, context, response_status: str, error_message: s }, "mybucketNotificationsB76B6B79": { "DependsOn": [ - "mybucketAllowBucketNotificationsTomyprojectmybucketonCreate09D19557ECA49DF15", + "mybucketAllowBucketNotificationsTomyprojectmybucketOnCreate0523E7CD109C74964", ], "Properties": { "BucketName": { @@ -331,7 +331,7 @@ def submit_response(event: dict, context, response_status: str, error_message: s ], "LambdaFunctionArn": { "Fn::GetAtt": [ - "mybucketonCreate0503ECF25", + "mybucketOnCreate071865324", "Arn", ], }, @@ -347,9 +347,9 @@ def submit_response(event: dict, context, response_status: str, error_message: s }, "Type": "Custom::S3BucketNotifications", }, - "mybucketonCreate0503ECF25": { + "mybucketOnCreate071865324": { "DependsOn": [ - "mybucketonCreate0ServiceRole7D97CBD8", + "mybucketOnCreate0ServiceRole8EB9AE15", ], "Properties": { "Architectures": [ @@ -369,13 +369,13 @@ def submit_response(event: dict, context, response_status: str, error_message: s "Handler": "index.handler", "LoggingConfig": { "LogGroup": { - "Ref": "mybucketonCreate0LogGroup56018191", + "Ref": "mybucketOnCreate0LogGroup8E3C4A72", }, }, "MemorySize": 1024, "Role": { "Fn::GetAtt": [ - "mybucketonCreate0ServiceRole7D97CBD8", + "mybucketOnCreate0ServiceRole8EB9AE15", "Arn", ], }, @@ -384,7 +384,7 @@ def submit_response(event: dict, context, response_status: str, error_message: s }, "Type": "AWS::Lambda::Function", }, - "mybucketonCreate0LogGroup56018191": { + "mybucketOnCreate0LogGroup8E3C4A72": { "DeletionPolicy": "Retain", "Properties": { "RetentionInDays": 30, @@ -392,7 +392,7 @@ def submit_response(event: dict, context, response_status: str, error_message: s "Type": "AWS::Logs::LogGroup", "UpdateReplacePolicy": "Retain", }, - "mybucketonCreate0ServiceRole7D97CBD8": { + "mybucketOnCreate0ServiceRole8EB9AE15": { "Properties": { "AssumeRolePolicyDocument": { "Statement": [ @@ -627,12 +627,12 @@ def submit_response(event: dict, context, response_status: str, error_message: s }, "Type": "AWS::IAM::Policy", }, - "mybucketAllowBucketNotificationsTomyprojectmybucketonDelete057F4EEBE2F8EA524": { + "mybucketAllowBucketNotificationsTomyprojectmybucketOnDelete07E2A93E8688C7533": { "Properties": { "Action": "lambda:InvokeFunction", "FunctionName": { "Fn::GetAtt": [ - "mybucketonDelete091EC820E", + "mybucketOnDelete0BC86CC27", "Arn", ], }, @@ -673,7 +673,7 @@ def submit_response(event: dict, context, response_status: str, error_message: s }, "mybucketNotificationsB76B6B79": { "DependsOn": [ - "mybucketAllowBucketNotificationsTomyprojectmybucketonDelete057F4EEBE2F8EA524", + "mybucketAllowBucketNotificationsTomyprojectmybucketOnDelete07E2A93E8688C7533", ], "Properties": { "BucketName": { @@ -688,7 +688,7 @@ def submit_response(event: dict, context, response_status: str, error_message: s ], "LambdaFunctionArn": { "Fn::GetAtt": [ - "mybucketonDelete091EC820E", + "mybucketOnDelete0BC86CC27", "Arn", ], }, @@ -704,9 +704,9 @@ def submit_response(event: dict, context, response_status: str, error_message: s }, "Type": "Custom::S3BucketNotifications", }, - "mybucketonDelete091EC820E": { + "mybucketOnDelete0BC86CC27": { "DependsOn": [ - "mybucketonDelete0ServiceRole20B2A547", + "mybucketOnDelete0ServiceRole57A03DE1", ], "Properties": { "Architectures": [ @@ -726,13 +726,13 @@ def submit_response(event: dict, context, response_status: str, error_message: s "Handler": "index.handler", "LoggingConfig": { "LogGroup": { - "Ref": "mybucketonDelete0LogGroupD9E8D54C", + "Ref": "mybucketOnDelete0LogGroup44992347", }, }, "MemorySize": 1024, "Role": { "Fn::GetAtt": [ - "mybucketonDelete0ServiceRole20B2A547", + "mybucketOnDelete0ServiceRole57A03DE1", "Arn", ], }, @@ -741,7 +741,7 @@ def submit_response(event: dict, context, response_status: str, error_message: s }, "Type": "AWS::Lambda::Function", }, - "mybucketonDelete0LogGroupD9E8D54C": { + "mybucketOnDelete0LogGroup44992347": { "DeletionPolicy": "Retain", "Properties": { "RetentionInDays": 30, @@ -749,7 +749,7 @@ def submit_response(event: dict, context, response_status: str, error_message: s "Type": "AWS::Logs::LogGroup", "UpdateReplacePolicy": "Retain", }, - "mybucketonDelete0ServiceRole20B2A547": { + "mybucketOnDelete0ServiceRole57A03DE1": { "Properties": { "AssumeRolePolicyDocument": { "Statement": [ @@ -984,12 +984,12 @@ def submit_response(event: dict, context, response_status: str, error_message: s }, "Type": "AWS::IAM::Policy", }, - "mybucketAllowBucketNotificationsTomyprojectmybucketonCreate09D19557ECA49DF15": { + "mybucketAllowBucketNotificationsTomyprojectmybucketOnCreate0523E7CD109C74964": { "Properties": { "Action": "lambda:InvokeFunction", "FunctionName": { "Fn::GetAtt": [ - "mybucketonCreate0503ECF25", + "mybucketOnCreate071865324", "Arn", ], }, @@ -1006,12 +1006,12 @@ def submit_response(event: dict, context, response_status: str, error_message: s }, "Type": "AWS::Lambda::Permission", }, - "mybucketAllowBucketNotificationsTomyprojectmybucketonDelete057F4EEBE2F8EA524": { + "mybucketAllowBucketNotificationsTomyprojectmybucketOnDelete07E2A93E8688C7533": { "Properties": { "Action": "lambda:InvokeFunction", "FunctionName": { "Fn::GetAtt": [ - "mybucketonDelete091EC820E", + "mybucketOnDelete0BC86CC27", "Arn", ], }, @@ -1028,12 +1028,12 @@ def submit_response(event: dict, context, response_status: str, error_message: s }, "Type": "AWS::Lambda::Permission", }, - "mybucketAllowBucketNotificationsTomyprojectmybucketonUpdate0DA830360476798FF": { + "mybucketAllowBucketNotificationsTomyprojectmybucketOnUpdate036B5F47FED7981DE": { "Properties": { "Action": "lambda:InvokeFunction", "FunctionName": { "Fn::GetAtt": [ - "mybucketonUpdate02A38D403", + "mybucketOnUpdate06503D6F0", "Arn", ], }, @@ -1074,9 +1074,9 @@ def submit_response(event: dict, context, response_status: str, error_message: s }, "mybucketNotificationsB76B6B79": { "DependsOn": [ - "mybucketAllowBucketNotificationsTomyprojectmybucketonCreate09D19557ECA49DF15", - "mybucketAllowBucketNotificationsTomyprojectmybucketonDelete057F4EEBE2F8EA524", - "mybucketAllowBucketNotificationsTomyprojectmybucketonUpdate0DA830360476798FF", + "mybucketAllowBucketNotificationsTomyprojectmybucketOnCreate0523E7CD109C74964", + "mybucketAllowBucketNotificationsTomyprojectmybucketOnDelete07E2A93E8688C7533", + "mybucketAllowBucketNotificationsTomyprojectmybucketOnUpdate036B5F47FED7981DE", ], "Properties": { "BucketName": { @@ -1091,7 +1091,7 @@ def submit_response(event: dict, context, response_status: str, error_message: s ], "LambdaFunctionArn": { "Fn::GetAtt": [ - "mybucketonCreate0503ECF25", + "mybucketOnCreate071865324", "Arn", ], }, @@ -1102,7 +1102,7 @@ def submit_response(event: dict, context, response_status: str, error_message: s ], "LambdaFunctionArn": { "Fn::GetAtt": [ - "mybucketonDelete091EC820E", + "mybucketOnDelete0BC86CC27", "Arn", ], }, @@ -1113,7 +1113,7 @@ def submit_response(event: dict, context, response_status: str, error_message: s ], "LambdaFunctionArn": { "Fn::GetAtt": [ - "mybucketonUpdate02A38D403", + "mybucketOnUpdate06503D6F0", "Arn", ], }, @@ -1129,9 +1129,9 @@ def submit_response(event: dict, context, response_status: str, error_message: s }, "Type": "Custom::S3BucketNotifications", }, - "mybucketonCreate0503ECF25": { + "mybucketOnCreate071865324": { "DependsOn": [ - "mybucketonCreate0ServiceRole7D97CBD8", + "mybucketOnCreate0ServiceRole8EB9AE15", ], "Properties": { "Architectures": [ @@ -1151,13 +1151,13 @@ def submit_response(event: dict, context, response_status: str, error_message: s "Handler": "index.handler", "LoggingConfig": { "LogGroup": { - "Ref": "mybucketonCreate0LogGroup56018191", + "Ref": "mybucketOnCreate0LogGroup8E3C4A72", }, }, "MemorySize": 1024, "Role": { "Fn::GetAtt": [ - "mybucketonCreate0ServiceRole7D97CBD8", + "mybucketOnCreate0ServiceRole8EB9AE15", "Arn", ], }, @@ -1166,7 +1166,7 @@ def submit_response(event: dict, context, response_status: str, error_message: s }, "Type": "AWS::Lambda::Function", }, - "mybucketonCreate0LogGroup56018191": { + "mybucketOnCreate0LogGroup8E3C4A72": { "DeletionPolicy": "Retain", "Properties": { "RetentionInDays": 30, @@ -1174,7 +1174,7 @@ def submit_response(event: dict, context, response_status: str, error_message: s "Type": "AWS::Logs::LogGroup", "UpdateReplacePolicy": "Retain", }, - "mybucketonCreate0ServiceRole7D97CBD8": { + "mybucketOnCreate0ServiceRole8EB9AE15": { "Properties": { "AssumeRolePolicyDocument": { "Statement": [ @@ -1205,9 +1205,9 @@ def submit_response(event: dict, context, response_status: str, error_message: s }, "Type": "AWS::IAM::Role", }, - "mybucketonDelete091EC820E": { + "mybucketOnDelete0BC86CC27": { "DependsOn": [ - "mybucketonDelete0ServiceRole20B2A547", + "mybucketOnDelete0ServiceRole57A03DE1", ], "Properties": { "Architectures": [ @@ -1227,13 +1227,13 @@ def submit_response(event: dict, context, response_status: str, error_message: s "Handler": "index.handler", "LoggingConfig": { "LogGroup": { - "Ref": "mybucketonDelete0LogGroupD9E8D54C", + "Ref": "mybucketOnDelete0LogGroup44992347", }, }, "MemorySize": 1024, "Role": { "Fn::GetAtt": [ - "mybucketonDelete0ServiceRole20B2A547", + "mybucketOnDelete0ServiceRole57A03DE1", "Arn", ], }, @@ -1242,7 +1242,7 @@ def submit_response(event: dict, context, response_status: str, error_message: s }, "Type": "AWS::Lambda::Function", }, - "mybucketonDelete0LogGroupD9E8D54C": { + "mybucketOnDelete0LogGroup44992347": { "DeletionPolicy": "Retain", "Properties": { "RetentionInDays": 30, @@ -1250,7 +1250,7 @@ def submit_response(event: dict, context, response_status: str, error_message: s "Type": "AWS::Logs::LogGroup", "UpdateReplacePolicy": "Retain", }, - "mybucketonDelete0ServiceRole20B2A547": { + "mybucketOnDelete0ServiceRole57A03DE1": { "Properties": { "AssumeRolePolicyDocument": { "Statement": [ @@ -1281,9 +1281,9 @@ def submit_response(event: dict, context, response_status: str, error_message: s }, "Type": "AWS::IAM::Role", }, - "mybucketonUpdate02A38D403": { + "mybucketOnUpdate06503D6F0": { "DependsOn": [ - "mybucketonUpdate0ServiceRole6E92AC54", + "mybucketOnUpdate0ServiceRoleAF91E9C7", ], "Properties": { "Architectures": [ @@ -1303,13 +1303,13 @@ def submit_response(event: dict, context, response_status: str, error_message: s "Handler": "index.handler", "LoggingConfig": { "LogGroup": { - "Ref": "mybucketonUpdate0LogGroupDA44D636", + "Ref": "mybucketOnUpdate0LogGroupFDC75EA3", }, }, "MemorySize": 1024, "Role": { "Fn::GetAtt": [ - "mybucketonUpdate0ServiceRole6E92AC54", + "mybucketOnUpdate0ServiceRoleAF91E9C7", "Arn", ], }, @@ -1318,7 +1318,7 @@ def submit_response(event: dict, context, response_status: str, error_message: s }, "Type": "AWS::Lambda::Function", }, - "mybucketonUpdate0LogGroupDA44D636": { + "mybucketOnUpdate0LogGroupFDC75EA3": { "DeletionPolicy": "Retain", "Properties": { "RetentionInDays": 30, @@ -1326,7 +1326,7 @@ def submit_response(event: dict, context, response_status: str, error_message: s "Type": "AWS::Logs::LogGroup", "UpdateReplacePolicy": "Retain", }, - "mybucketonUpdate0ServiceRole6E92AC54": { + "mybucketOnUpdate0ServiceRoleAF91E9C7": { "Properties": { "AssumeRolePolicyDocument": { "Statement": [ @@ -1561,12 +1561,12 @@ def submit_response(event: dict, context, response_status: str, error_message: s }, "Type": "AWS::IAM::Policy", }, - "mybucketAllowBucketNotificationsTomyprojectmybucketonUpdate0DA830360476798FF": { + "mybucketAllowBucketNotificationsTomyprojectmybucketOnUpdate036B5F47FED7981DE": { "Properties": { "Action": "lambda:InvokeFunction", "FunctionName": { "Fn::GetAtt": [ - "mybucketonUpdate02A38D403", + "mybucketOnUpdate06503D6F0", "Arn", ], }, @@ -1607,7 +1607,7 @@ def submit_response(event: dict, context, response_status: str, error_message: s }, "mybucketNotificationsB76B6B79": { "DependsOn": [ - "mybucketAllowBucketNotificationsTomyprojectmybucketonUpdate0DA830360476798FF", + "mybucketAllowBucketNotificationsTomyprojectmybucketOnUpdate036B5F47FED7981DE", ], "Properties": { "BucketName": { @@ -1622,7 +1622,7 @@ def submit_response(event: dict, context, response_status: str, error_message: s ], "LambdaFunctionArn": { "Fn::GetAtt": [ - "mybucketonUpdate02A38D403", + "mybucketOnUpdate06503D6F0", "Arn", ], }, @@ -1638,9 +1638,9 @@ def submit_response(event: dict, context, response_status: str, error_message: s }, "Type": "Custom::S3BucketNotifications", }, - "mybucketonUpdate02A38D403": { + "mybucketOnUpdate06503D6F0": { "DependsOn": [ - "mybucketonUpdate0ServiceRole6E92AC54", + "mybucketOnUpdate0ServiceRoleAF91E9C7", ], "Properties": { "Architectures": [ @@ -1660,13 +1660,13 @@ def submit_response(event: dict, context, response_status: str, error_message: s "Handler": "index.handler", "LoggingConfig": { "LogGroup": { - "Ref": "mybucketonUpdate0LogGroupDA44D636", + "Ref": "mybucketOnUpdate0LogGroupFDC75EA3", }, }, "MemorySize": 1024, "Role": { "Fn::GetAtt": [ - "mybucketonUpdate0ServiceRole6E92AC54", + "mybucketOnUpdate0ServiceRoleAF91E9C7", "Arn", ], }, @@ -1675,7 +1675,7 @@ def submit_response(event: dict, context, response_status: str, error_message: s }, "Type": "AWS::Lambda::Function", }, - "mybucketonUpdate0LogGroupDA44D636": { + "mybucketOnUpdate0LogGroupFDC75EA3": { "DeletionPolicy": "Retain", "Properties": { "RetentionInDays": 30, @@ -1683,7 +1683,7 @@ def submit_response(event: dict, context, response_status: str, error_message: s "Type": "AWS::Logs::LogGroup", "UpdateReplacePolicy": "Retain", }, - "mybucketonUpdate0ServiceRole6E92AC54": { + "mybucketOnUpdate0ServiceRoleAF91E9C7": { "Properties": { "AssumeRolePolicyDocument": { "Statement": [ diff --git a/libs/wingsdk/src/cloud/bucket.ts b/libs/wingsdk/src/cloud/bucket.ts index 2372be10269..28583912b55 100644 --- a/libs/wingsdk/src/cloud/bucket.ts +++ b/libs/wingsdk/src/cloud/bucket.ts @@ -89,7 +89,7 @@ export class Bucket extends Resource { * @returns the created topic */ protected createTopic(actionType: BucketEventType): Topic { - const topic = new Topic(this, actionType.toLowerCase()); + const topic = new Topic(this, actionType); this.node.addDependency(topic); return topic; } @@ -524,15 +524,15 @@ export enum BucketEventType { /** * Create */ - CREATE = "onCreate", + CREATE = "OnCreate", /** * Delete */ - DELETE = "onDelete", + DELETE = "OnDelete", /** * Update */ - UPDATE = "onUpdate", + UPDATE = "OnUpdate", } /** diff --git a/libs/wingsdk/src/std/node.ts b/libs/wingsdk/src/std/node.ts index 778f49ef316..e34074001c4 100644 --- a/libs/wingsdk/src/std/node.ts +++ b/libs/wingsdk/src/std/node.ts @@ -104,7 +104,10 @@ export class Node { * metadata describing how one construct is related to another construct. */ public addConnection(props: AddConnectionProps) { - this._connections.add(props); + this._connections.add({ + source: props.source ?? this.construct, + ...props, + }); } // ---- constructs 10.x APIs ---- @@ -423,8 +426,9 @@ export class Node { export interface AddConnectionProps { /** * The source of the connection. + * @default this */ - readonly source: IConstruct; + readonly source?: IConstruct; /** * An operation that the source construct supports. diff --git a/libs/wingsdk/src/std/resource.ts b/libs/wingsdk/src/std/resource.ts index 3573d0d7e20..bd28fed4286 100644 --- a/libs/wingsdk/src/std/resource.ts +++ b/libs/wingsdk/src/std/resource.ts @@ -228,7 +228,7 @@ function addConnectionsFromLiftMap( sourceOp: baseOp ?? op, target: dep, targetOp: depOp, - name: depOp, + name: "call", }); } } else if (hasLiftMap(dep)) { diff --git a/libs/wingsdk/src/target-sim/app.ts b/libs/wingsdk/src/target-sim/app.ts index fcdc41cc0a6..9299aaf7186 100644 --- a/libs/wingsdk/src/target-sim/app.ts +++ b/libs/wingsdk/src/target-sim/app.ts @@ -1,5 +1,6 @@ import * as fs from "fs"; import * as path from "path"; +import { IConstruct } from "constructs"; import { Api } from "./api"; import { Bucket } from "./bucket"; import { SIM_CONTAINER_FQN } from "./container"; @@ -47,6 +48,7 @@ import { TypeSchema, WingSimulatorSchema, } from "../simulator"; +import { resolveTokens } from "../simulator/tokens"; import { TEST_RUNNER_FQN } from "../std"; /** @@ -248,7 +250,9 @@ export class App extends core.App { } // write simulator.json file into workdir - this.synthSimulatorFile(this.outdir); + const spec = this.synthSimulatorFile(this.outdir); + + this.addTokenConnections(spec); // write tree.json file into workdir core.synthesizeTree(this, this.outdir); @@ -265,6 +269,35 @@ export class App extends core.App { return this.outdir; } + /** + * Scans the app spec for token references and adds connections to reflect + * this relationship. + * + * @param spec The simulator spec + */ + private addTokenConnections(spec: WingSimulatorSchema) { + const map: Record = {}; + for (const c of this.node.findAll()) { + map[c.node.path] = c; + } + + for (const [from, resource] of Object.entries(spec.resources)) { + resolveTokens(resource.props, (to) => { + // skip references to the "handle" of the target resource because it would be reflected by + // the connections created by inflight method calls. + if (to.attr !== "handle") { + core.Connections.of(this).add({ + source: map[from], + target: map[to.path], + targetOp: to.attr, + name: "", + }); + } + return ""; // <-- not used + }); + } + } + private synthSimulatorFile(outdir: string) { const resources: Record = {}; for (const r of new core.DependencyGraph(this.node).topology()) { @@ -304,5 +337,7 @@ export class App extends core.App { JSON.stringify(contents, undefined, 2), { encoding: "utf8" } ); + + return contents; } } diff --git a/libs/wingsdk/src/target-sim/queue.ts b/libs/wingsdk/src/target-sim/queue.ts index 8e6eab981a3..650473372cb 100644 --- a/libs/wingsdk/src/target-sim/queue.ts +++ b/libs/wingsdk/src/target-sim/queue.ts @@ -87,7 +87,7 @@ export class Queue extends cloud.Queue implements ISimulatorResource { ); const fnNode = Node.of(fn); fnNode.sourceModule = SDK_SOURCE_MODULE; - fnNode.title = "setConsumer()"; + fnNode.title = "Consumer"; const mapping = new EventMapping( this, @@ -113,7 +113,7 @@ export class Queue extends cloud.Queue implements ISimulatorResource { sourceOp: cloud.QueueInflightMethods.PUSH, target: fn, targetOp: cloud.FunctionInflightMethods.INVOKE, - name: "setConsumer()", + name: "consumer", }); return fn; diff --git a/libs/wingsdk/src/target-sim/schedule.ts b/libs/wingsdk/src/target-sim/schedule.ts index c324ba15673..20d90270633 100644 --- a/libs/wingsdk/src/target-sim/schedule.ts +++ b/libs/wingsdk/src/target-sim/schedule.ts @@ -44,7 +44,7 @@ export class Schedule extends cloud.Schedule implements ISimulatorResource { props ); Node.of(fn).sourceModule = SDK_SOURCE_MODULE; - Node.of(fn).title = "onTick()"; + Node.of(fn).title = "Tick"; new EventMapping(this, App.of(this).makeId(this, "OnTickMapping"), { subscriber: fn, @@ -57,7 +57,7 @@ export class Schedule extends cloud.Schedule implements ISimulatorResource { sourceOp: cloud.ScheduleInflightMethods.TICK, target: fn, targetOp: cloud.FunctionInflightMethods.INVOKE, - name: "onTick()", + name: "tick", }); this.policy.addStatement(fn, cloud.FunctionInflightMethods.INVOKE); diff --git a/libs/wingsdk/src/target-sim/topic.ts b/libs/wingsdk/src/target-sim/topic.ts index 75b3ea26f38..db2e153327e 100644 --- a/libs/wingsdk/src/target-sim/topic.ts +++ b/libs/wingsdk/src/target-sim/topic.ts @@ -35,7 +35,7 @@ export class Topic extends cloud.Topic implements ISimulatorResource { props ); Node.of(fn).sourceModule = SDK_SOURCE_MODULE; - Node.of(fn).title = "onMessage()"; + Node.of(fn).title = "Subscriber"; new EventMapping(this, App.of(this).makeId(this, "TopicEventMapping"), { subscriber: fn, @@ -48,7 +48,7 @@ export class Topic extends cloud.Topic implements ISimulatorResource { sourceOp: cloud.TopicInflightMethods.PUBLISH, target: fn, targetOp: cloud.FunctionInflightMethods.INVOKE, - name: "onMessage()", + name: "subscriber", }); this.policy.addStatement(fn, cloud.FunctionInflightMethods.INVOKE_ASYNC); @@ -69,7 +69,8 @@ export class Topic extends cloud.Topic implements ISimulatorResource { {} ); Node.of(fn).sourceModule = SDK_SOURCE_MODULE; - Node.of(fn).title = "subscribeQueue()"; + Node.of(fn).title = "QueueSubscriber"; + Node.of(fn).hidden = true; new EventMapping(this, App.of(this).makeId(this, "TopicEventMapping"), { subscriber: fn, @@ -82,7 +83,7 @@ export class Topic extends cloud.Topic implements ISimulatorResource { sourceOp: cloud.TopicInflightMethods.PUBLISH, target: fn, targetOp: cloud.FunctionInflightMethods.INVOKE_ASYNC, - name: "subscribeQueue()", + name: "push", }); this.policy.addStatement(fn, cloud.FunctionInflightMethods.INVOKE_ASYNC); diff --git a/libs/wingsdk/src/target-tf-aws/queue.ts b/libs/wingsdk/src/target-tf-aws/queue.ts index 299d1e582bb..e1e3bbd6006 100644 --- a/libs/wingsdk/src/target-tf-aws/queue.ts +++ b/libs/wingsdk/src/target-tf-aws/queue.ts @@ -117,7 +117,7 @@ export class Queue extends cloud.Queue implements IAwsQueue { sourceOp: cloud.QueueInflightMethods.PUSH, target: fn, targetOp: cloud.FunctionInflightMethods.INVOKE, - name: "setConsumer()", + name: "consumer", }); return fn; diff --git a/libs/wingsdk/src/target-tf-aws/schedule.ts b/libs/wingsdk/src/target-tf-aws/schedule.ts index f0a6bc1edaa..2a09b2aaed2 100644 --- a/libs/wingsdk/src/target-tf-aws/schedule.ts +++ b/libs/wingsdk/src/target-tf-aws/schedule.ts @@ -78,7 +78,7 @@ export class Schedule extends cloud.Schedule { sourceOp: cloud.ScheduleInflightMethods.TICK, target: fn, targetOp: cloud.FunctionInflightMethods.INVOKE, - name: "onTick()", + name: "tick", }); return fn; diff --git a/libs/wingsdk/src/target-tf-aws/topic.ts b/libs/wingsdk/src/target-tf-aws/topic.ts index 40b2fdb31ea..793d6ccc63b 100644 --- a/libs/wingsdk/src/target-tf-aws/topic.ts +++ b/libs/wingsdk/src/target-tf-aws/topic.ts @@ -86,7 +86,7 @@ export class Topic extends cloud.Topic implements IAwsTopic { sourceOp: cloud.TopicInflightMethods.PUBLISH, target: fn, targetOp: cloud.FunctionInflightMethods.INVOKE_ASYNC, - name: "onMessage()", + name: "subscriber", }); return fn; diff --git a/libs/wingsdk/src/target-tf-gcp/schedule.ts b/libs/wingsdk/src/target-tf-gcp/schedule.ts index fe4494853f2..7a9609605de 100644 --- a/libs/wingsdk/src/target-tf-gcp/schedule.ts +++ b/libs/wingsdk/src/target-tf-gcp/schedule.ts @@ -89,7 +89,7 @@ export class Schedule extends cloud.Schedule { sourceOp: cloud.ScheduleInflightMethods.TICK, target: cronFunction, targetOp: cloud.FunctionInflightMethods.INVOKE, - name: "onTick()", + name: "tick", }); return cronFunction; diff --git a/libs/wingsdk/test/core/__snapshots__/connections.test.ts.snap b/libs/wingsdk/test/core/__snapshots__/connections.test.ts.snap index 758b2123b89..1a7c3e15a81 100644 --- a/libs/wingsdk/test/core/__snapshots__/connections.test.ts.snap +++ b/libs/wingsdk/test/core/__snapshots__/connections.test.ts.snap @@ -203,3 +203,16 @@ exports.handler = async function(event) { }, } `; + +exports[`source can be omitted from \`nodeof(x).addConnection()\` 1`] = ` +{ + "connections": [ + { + "name": "my_connection", + "source": "root/B1", + "target": "root/B2", + }, + ], + "version": "connections-0.1", +} +`; diff --git a/libs/wingsdk/test/core/connections.test.ts b/libs/wingsdk/test/core/connections.test.ts index fc00b2bd2f3..633b5d2b742 100644 --- a/libs/wingsdk/test/core/connections.test.ts +++ b/libs/wingsdk/test/core/connections.test.ts @@ -1,6 +1,12 @@ import { test, expect } from "vitest"; import * as cloud from "../../src/cloud"; -import { Connections, inflight } from "../../src/core"; +import { + CONNECTIONS_FILE_PATH, + Connections, + inflight, + lift, +} from "../../src/core"; +import { Node } from "../../src/std"; import { SimApp } from "../sim-app"; test("create a bucket", async () => { @@ -22,3 +28,38 @@ test("create a bucket", async () => { // THEN expect(app.snapshot()).toMatchSnapshot(); }); + +test("implict connections based on tokens", async () => { + const app = new SimApp(); + + const api = new cloud.Api(app, "Api"); + + new cloud.Function( + app, + "Function", + lift({ url: api.url }).inflight(async (ctx) => { + console.log(ctx.url); + return undefined; + }) + ); + + expect(app.snapshot()[CONNECTIONS_FILE_PATH].connections).containSubset([ + { + name: "", + source: "root/Function", + target: "root/Api", + targetOp: "url", + }, + ]); +}); + +test("source can be omitted from `nodeof(x).addConnection()`", async () => { + const app = new SimApp(); + + const b1 = new cloud.Bucket(app, "B1"); + const b2 = new cloud.Bucket(app, "B2"); + + Node.of(b1).addConnection({ target: b2, name: "my_connection" }); + + expect(app.snapshot()[CONNECTIONS_FILE_PATH]).toMatchSnapshot(); +}); diff --git a/libs/wingsdk/test/target-sim/__snapshots__/api.test.ts.snap b/libs/wingsdk/test/target-sim/__snapshots__/api.test.ts.snap index 6f853be3c33..259bcdf577a 100644 --- a/libs/wingsdk/test/target-sim/__snapshots__/api.test.ts.snap +++ b/libs/wingsdk/test/target-sim/__snapshots__/api.test.ts.snap @@ -61,6 +61,12 @@ exports.handler = async function(event) { "target": "root/my_api/OnRequestHandler0", "targetOp": "invoke", }, + { + "name": "", + "source": "root/my_api/Endpoint", + "target": "root/my_api", + "targetOp": "url", + }, ], "version": "connections-0.1", }, @@ -402,6 +408,12 @@ exports.handler = async function(event) { "target": "root/my_api/OnRequestHandler0", "targetOp": "invoke", }, + { + "name": "", + "source": "root/my_api/Endpoint", + "target": "root/my_api", + "targetOp": "url", + }, ], "version": "connections-0.1", }, @@ -728,6 +740,12 @@ exports.handler = async function(event) { "target": "root/my_api/OnRequestHandler0", "targetOp": "invoke", }, + { + "name": "", + "source": "root/my_api/Endpoint", + "target": "root/my_api", + "targetOp": "url", + }, ], "version": "connections-0.1", }, @@ -1055,6 +1073,12 @@ exports.handler = async function(event) { "target": "root/my_api/OnRequestHandler0", "targetOp": "invoke", }, + { + "name": "", + "source": "root/my_api/Endpoint", + "target": "root/my_api", + "targetOp": "url", + }, ], "version": "connections-0.1", }, @@ -1382,6 +1406,12 @@ exports.handler = async function(event) { "target": "root/my_api/OnRequestHandler0", "targetOp": "invoke", }, + { + "name": "", + "source": "root/my_api/Endpoint", + "target": "root/my_api", + "targetOp": "url", + }, ], "version": "connections-0.1", }, @@ -1709,6 +1739,12 @@ exports.handler = async function(event) { "target": "root/my_api/OnRequestHandler0", "targetOp": "invoke", }, + { + "name": "", + "source": "root/my_api/Endpoint", + "target": "root/my_api", + "targetOp": "url", + }, ], "version": "connections-0.1", }, @@ -2095,6 +2131,12 @@ exports.handler = async function(event) { "target": "root/my_api/OnRequestHandler0", "targetOp": "invoke", }, + { + "name": "", + "source": "root/my_api/Endpoint", + "target": "root/my_api", + "targetOp": "url", + }, ], "version": "connections-0.1", }, @@ -2505,6 +2547,12 @@ exports.handler = async function(event) { "target": "root/my_api/OnRequestHandler0", "targetOp": "invoke", }, + { + "name": "", + "source": "root/my_api/Endpoint", + "target": "root/my_api", + "targetOp": "url", + }, ], "version": "connections-0.1", }, @@ -2848,6 +2896,12 @@ exports.handler = async function(event) { "target": "root/my_api/OnRequestHandler0", "targetOp": "invoke", }, + { + "name": "", + "source": "root/my_api/Endpoint", + "target": "root/my_api", + "targetOp": "url", + }, ], "version": "connections-0.1", }, @@ -3171,6 +3225,12 @@ exports.handler = async function(event) { "target": "root/my_api/OnRequestHandler0", "targetOp": "invoke", }, + { + "name": "", + "source": "root/my_api/Endpoint", + "target": "root/my_api", + "targetOp": "url", + }, ], "version": "connections-0.1", }, @@ -3569,6 +3629,12 @@ exports.handler = async function(event) { "target": "root/my_api/OnRequestHandler1", "targetOp": "invoke", }, + { + "name": "", + "source": "root/my_api/Endpoint", + "target": "root/my_api", + "targetOp": "url", + }, ], "version": "connections-0.1", }, @@ -4023,6 +4089,12 @@ exports.handler = async function(event) { "target": "root/my_api/OnRequestHandler1", "targetOp": "invoke", }, + { + "name": "", + "source": "root/my_api/Endpoint", + "target": "root/my_api", + "targetOp": "url", + }, ], "version": "connections-0.1", }, @@ -4423,6 +4495,12 @@ exports.handler = async function(event) { "target": "root/my_api/OnRequestHandler0", "targetOp": "invoke", }, + { + "name": "", + "source": "root/my_api/Endpoint", + "target": "root/my_api", + "targetOp": "url", + }, ], "version": "connections-0.1", }, @@ -4749,6 +4827,12 @@ exports.handler = async function(event) { "target": "root/my_api/OnRequestHandler0", "targetOp": "invoke", }, + { + "name": "", + "source": "root/my_api/Endpoint", + "target": "root/my_api", + "targetOp": "url", + }, ], "version": "connections-0.1", }, @@ -5085,6 +5169,12 @@ exports.handler = async function(event) { "target": "root/my_api/OnRequestHandler0", "targetOp": "invoke", }, + { + "name": "", + "source": "root/my_api/Endpoint", + "target": "root/my_api", + "targetOp": "url", + }, ], "version": "connections-0.1", }, @@ -5341,7 +5431,14 @@ exports.handler = async function(event) { exports[`create an api 1`] = ` { "connections.json": { - "connections": [], + "connections": [ + { + "name": "", + "source": "root/my_api/Endpoint", + "target": "root/my_api", + "targetOp": "url", + }, + ], "version": "connections-0.1", }, "simulator.json": { diff --git a/libs/wingsdk/test/target-sim/__snapshots__/bucket.test.ts.snap b/libs/wingsdk/test/target-sim/__snapshots__/bucket.test.ts.snap index 57ef79fb33a..22cceb4f71c 100644 --- a/libs/wingsdk/test/target-sim/__snapshots__/bucket.test.ts.snap +++ b/libs/wingsdk/test/target-sim/__snapshots__/bucket.test.ts.snap @@ -2,21 +2,21 @@ exports[`bucket on event creates 3 topics, and sends the right event and key in the event handlers 1`] = ` [ - "root/my_bucket/oncreate started", - "root/my_bucket/onupdate started", - "root/my_bucket/ondelete started", + "root/my_bucket/OnCreate started", + "root/my_bucket/OnUpdate started", + "root/my_bucket/OnDelete started", "root/my_bucket started", "root/my_bucket/Policy started", "root/log_bucket started", - "root/my_bucket/oncreate/OnMessage0 started", - "root/my_bucket/oncreate/Policy started", - "root/my_bucket/oncreate/TopicEventMapping0 started", - "root/my_bucket/onupdate/OnMessage0 started", - "root/my_bucket/onupdate/Policy started", - "root/my_bucket/onupdate/TopicEventMapping0 started", - "root/my_bucket/ondelete/OnMessage0 started", - "root/my_bucket/ondelete/Policy started", - "root/my_bucket/ondelete/TopicEventMapping0 started", + "root/my_bucket/OnCreate/OnMessage0 started", + "root/my_bucket/OnCreate/Policy started", + "root/my_bucket/OnCreate/TopicEventMapping0 started", + "root/my_bucket/OnUpdate/OnMessage0 started", + "root/my_bucket/OnUpdate/Policy started", + "root/my_bucket/OnUpdate/TopicEventMapping0 started", + "root/my_bucket/OnDelete/OnMessage0 started", + "root/my_bucket/OnDelete/Policy started", + "root/my_bucket/OnDelete/TopicEventMapping0 started", "root/log_bucket/Policy started", "Sending message (message=a, subscriber=sim-6).", "InvokeAsync (payload="a").", @@ -41,18 +41,18 @@ exports[`bucket on event creates 3 topics, and sends the right event and key in "Get (key=a).", "root/my_bucket/Policy stopped", "root/my_bucket stopped", - "root/my_bucket/oncreate/Policy stopped", - "root/my_bucket/oncreate/TopicEventMapping0 stopped", - "root/my_bucket/oncreate stopped", - "root/my_bucket/onupdate/Policy stopped", - "root/my_bucket/onupdate/TopicEventMapping0 stopped", - "root/my_bucket/onupdate stopped", - "root/my_bucket/ondelete/Policy stopped", - "root/my_bucket/ondelete/TopicEventMapping0 stopped", - "root/my_bucket/ondelete stopped", - "root/my_bucket/oncreate/OnMessage0 stopped", - "root/my_bucket/onupdate/OnMessage0 stopped", - "root/my_bucket/ondelete/OnMessage0 stopped", + "root/my_bucket/OnCreate/Policy stopped", + "root/my_bucket/OnCreate/TopicEventMapping0 stopped", + "root/my_bucket/OnCreate stopped", + "root/my_bucket/OnUpdate/Policy stopped", + "root/my_bucket/OnUpdate/TopicEventMapping0 stopped", + "root/my_bucket/OnUpdate stopped", + "root/my_bucket/OnDelete/Policy stopped", + "root/my_bucket/OnDelete/TopicEventMapping0 stopped", + "root/my_bucket/OnDelete stopped", + "root/my_bucket/OnCreate/OnMessage0 stopped", + "root/my_bucket/OnUpdate/OnMessage0 stopped", + "root/my_bucket/OnDelete/OnMessage0 stopped", "root/log_bucket/Policy stopped", "root/log_bucket stopped", ] @@ -833,12 +833,12 @@ exports[`remove object from a bucket with mustExist as option 1`] = ` exports[`removing a key will call onDelete method 1`] = ` [ - "root/my_bucket/ondelete started", + "root/my_bucket/OnDelete started", "root/my_bucket started", "root/my_bucket/Policy started", - "root/my_bucket/ondelete/OnMessage0 started", - "root/my_bucket/ondelete/Policy started", - "root/my_bucket/ondelete/TopicEventMapping0 started", + "root/my_bucket/OnDelete/OnMessage0 started", + "root/my_bucket/OnDelete/Policy started", + "root/my_bucket/OnDelete/TopicEventMapping0 started", "Put (key=unknown.txt).", "Sending message (message=unknown.txt, subscriber=sim-3).", "InvokeAsync (payload="unknown.txt").", @@ -847,21 +847,21 @@ exports[`removing a key will call onDelete method 1`] = ` "Received unknown.txt", "root/my_bucket/Policy stopped", "root/my_bucket stopped", - "root/my_bucket/ondelete/Policy stopped", - "root/my_bucket/ondelete/TopicEventMapping0 stopped", - "root/my_bucket/ondelete stopped", - "root/my_bucket/ondelete/OnMessage0 stopped", + "root/my_bucket/OnDelete/Policy stopped", + "root/my_bucket/OnDelete/TopicEventMapping0 stopped", + "root/my_bucket/OnDelete stopped", + "root/my_bucket/OnDelete/OnMessage0 stopped", ] `; exports[`update an object in bucket 1`] = ` [ - "root/my_bucket/oncreate started", + "root/my_bucket/OnCreate started", "root/my_bucket started", "root/my_bucket/Policy started", - "root/my_bucket/oncreate/OnMessage0 started", - "root/my_bucket/oncreate/Policy started", - "root/my_bucket/oncreate/TopicEventMapping0 started", + "root/my_bucket/OnCreate/OnMessage0 started", + "root/my_bucket/OnCreate/Policy started", + "root/my_bucket/OnCreate/TopicEventMapping0 started", "Sending message (message=1.txt, subscriber=sim-3).", "InvokeAsync (payload="1.txt").", "Publish (messages=1.txt).", @@ -870,9 +870,9 @@ exports[`update an object in bucket 1`] = ` "I am done", "root/my_bucket/Policy stopped", "root/my_bucket stopped", - "root/my_bucket/oncreate/Policy stopped", - "root/my_bucket/oncreate/TopicEventMapping0 stopped", - "root/my_bucket/oncreate stopped", - "root/my_bucket/oncreate/OnMessage0 stopped", + "root/my_bucket/OnCreate/Policy stopped", + "root/my_bucket/OnCreate/TopicEventMapping0 stopped", + "root/my_bucket/OnCreate stopped", + "root/my_bucket/OnCreate/OnMessage0 stopped", ] `; diff --git a/libs/wingsdk/test/target-sim/__snapshots__/file-counter.test.ts.snap b/libs/wingsdk/test/target-sim/__snapshots__/file-counter.test.ts.snap index 99876988ed4..165f544cd25 100644 --- a/libs/wingsdk/test/target-sim/__snapshots__/file-counter.test.ts.snap +++ b/libs/wingsdk/test/target-sim/__snapshots__/file-counter.test.ts.snap @@ -162,7 +162,7 @@ bucket: (function() { "connections.json": { "connections": [ { - "name": "setConsumer()", + "name": "consumer", "source": "root/HelloWorld/Queue", "sourceOp": "push", "target": "root/HelloWorld/Queue/Consumer0", @@ -197,28 +197,28 @@ bucket: (function() { "targetOp": "call", }, { - "name": "inc", + "name": "call", "source": "root/HelloWorld/Queue/Consumer0", "sourceOp": "invoke", "target": "root/HelloWorld/Counter", "targetOp": "inc", }, { - "name": "put", + "name": "call", "source": "root/HelloWorld/Queue/Consumer0", "sourceOp": "invoke", "target": "root/HelloWorld/Bucket", "targetOp": "put", }, { - "name": "inc", + "name": "call", "source": "root/HelloWorld/Queue/Consumer0", "sourceOp": "invokeAsync", "target": "root/HelloWorld/Counter", "targetOp": "inc", }, { - "name": "put", + "name": "call", "source": "root/HelloWorld/Queue/Consumer0", "sourceOp": "invokeAsync", "target": "root/HelloWorld/Bucket", @@ -492,7 +492,7 @@ bucket: (function() { "display": { "description": "A cloud function (FaaS)", "sourceModule": "@winglang/sdk", - "title": "setConsumer()", + "title": "Consumer", }, "id": "Consumer0", "path": "root/HelloWorld/Queue/Consumer0", diff --git a/libs/wingsdk/test/target-sim/__snapshots__/queue.test.ts.snap b/libs/wingsdk/test/target-sim/__snapshots__/queue.test.ts.snap index 1f5e4cc0b18..21df1d0e50b 100644 --- a/libs/wingsdk/test/target-sim/__snapshots__/queue.test.ts.snap +++ b/libs/wingsdk/test/target-sim/__snapshots__/queue.test.ts.snap @@ -1032,21 +1032,21 @@ exports.handler = async function(event) { "connections.json": { "connections": [ { - "name": "setConsumer()", + "name": "consumer", "source": "root/my_queue", "sourceOp": "push", "target": "root/my_queue/Consumer0", "targetOp": "invoke", }, { - "name": "push", + "name": "call", "source": "root/my_queue_messages/Function", "sourceOp": "invoke", "target": "root/my_queue", "targetOp": "push", }, { - "name": "push", + "name": "call", "source": "root/my_queue_messages/Function", "sourceOp": "invokeAsync", "target": "root/my_queue", @@ -1246,7 +1246,7 @@ exports.handler = async function(event) { "display": { "description": "A cloud function (FaaS)", "sourceModule": "@winglang/sdk", - "title": "setConsumer()", + "title": "Consumer", }, "id": "Consumer0", "path": "root/my_queue/Consumer0", @@ -1382,7 +1382,7 @@ exports.handler = async function(event) { "connections.json": { "connections": [ { - "name": "setConsumer()", + "name": "consumer", "source": "root/my_queue", "sourceOp": "push", "target": "root/my_queue/Consumer0", @@ -1548,7 +1548,7 @@ exports.handler = async function(event) { "display": { "description": "A cloud function (FaaS)", "sourceModule": "@winglang/sdk", - "title": "setConsumer()", + "title": "Consumer", }, "id": "Consumer0", "path": "root/my_queue/Consumer0", diff --git a/libs/wingsdk/test/target-sim/__snapshots__/redis.test.ts.snap b/libs/wingsdk/test/target-sim/__snapshots__/redis.test.ts.snap index 715c2a43ed0..26d92bb5662 100644 --- a/libs/wingsdk/test/target-sim/__snapshots__/redis.test.ts.snap +++ b/libs/wingsdk/test/target-sim/__snapshots__/redis.test.ts.snap @@ -3,7 +3,14 @@ exports[`create a Redis resource 1`] = ` { "connections.json": { - "connections": [], + "connections": [ + { + "name": "", + "source": "root/my_redis", + "target": "root/my_redis/Container", + "targetOp": "host_port", + }, + ], "version": "connections-0.1", }, "simulator.json": { diff --git a/libs/wingsdk/test/target-sim/__snapshots__/schedule.test.ts.snap b/libs/wingsdk/test/target-sim/__snapshots__/schedule.test.ts.snap index f2a1a4e74a2..123af737016 100644 --- a/libs/wingsdk/test/target-sim/__snapshots__/schedule.test.ts.snap +++ b/libs/wingsdk/test/target-sim/__snapshots__/schedule.test.ts.snap @@ -192,7 +192,7 @@ exports.handler = async function(event) { "connections.json": { "connections": [ { - "name": "onTick()", + "name": "tick", "source": "root/my_schedule", "sourceOp": "tick", "target": "root/my_schedule/OnTick0", @@ -350,7 +350,7 @@ exports.handler = async function(event) { "display": { "description": "A cloud function (FaaS)", "sourceModule": "@winglang/sdk", - "title": "onTick()", + "title": "Tick", }, "id": "OnTick0", "path": "root/my_schedule/OnTick0", @@ -443,7 +443,7 @@ exports.handler = async function(event) { "connections.json": { "connections": [ { - "name": "onTick()", + "name": "tick", "source": "root/my_schedule", "sourceOp": "tick", "target": "root/my_schedule/OnTick0", @@ -601,7 +601,7 @@ exports.handler = async function(event) { "display": { "description": "A cloud function (FaaS)", "sourceModule": "@winglang/sdk", - "title": "onTick()", + "title": "Tick", }, "id": "OnTick0", "path": "root/my_schedule/OnTick0", @@ -694,7 +694,7 @@ exports.handler = async function(event) { "connections.json": { "connections": [ { - "name": "onTick()", + "name": "tick", "source": "root/my_schedule", "sourceOp": "tick", "target": "root/my_schedule/OnTick0", @@ -852,7 +852,7 @@ exports.handler = async function(event) { "display": { "description": "A cloud function (FaaS)", "sourceModule": "@winglang/sdk", - "title": "onTick()", + "title": "Tick", }, "id": "OnTick0", "path": "root/my_schedule/OnTick0", diff --git a/libs/wingsdk/test/target-tf-aws/__snapshots__/bucket.test.ts.snap b/libs/wingsdk/test/target-tf-aws/__snapshots__/bucket.test.ts.snap index 05db4b72192..2457f05f584 100644 --- a/libs/wingsdk/test/target-tf-aws/__snapshots__/bucket.test.ts.snap +++ b/libs/wingsdk/test/target-tf-aws/__snapshots__/bucket.test.ts.snap @@ -319,47 +319,47 @@ exports[`bucket with onCreate method 1`] = ` { "resource": { "aws_cloudwatch_log_group": { - "my_bucket_oncreate-OnMessage0_CloudwatchLogGroup_E35B13F5": { - "name": "/aws/lambda/oncreate-OnMessage0-c874e955", + "my_bucket_OnCreate-OnMessage0_CloudwatchLogGroup_E3DA1BCC": { + "name": "/aws/lambda/OnCreate-OnMessage0-c8b6ea23", "retention_in_days": 30, }, }, "aws_iam_role": { - "my_bucket_oncreate-OnMessage0_IamRole_9CAD40D5": { + "my_bucket_OnCreate-OnMessage0_IamRole_A815D0BA": { "assume_role_policy": "{"Version":"2012-10-17","Statement":[{"Action":"sts:AssumeRole","Principal":{"Service":"lambda.amazonaws.com"},"Effect":"Allow"}]}", }, }, "aws_iam_role_policy": { - "my_bucket_oncreate-OnMessage0_IamRolePolicy_CDE0CB68": { + "my_bucket_OnCreate-OnMessage0_IamRolePolicy_8D03B4D5": { "policy": "{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Action":"none:null","Resource":"*"}]}", - "role": "\${aws_iam_role.my_bucket_oncreate-OnMessage0_IamRole_9CAD40D5.name}", + "role": "\${aws_iam_role.my_bucket_OnCreate-OnMessage0_IamRole_A815D0BA.name}", }, }, "aws_iam_role_policy_attachment": { - "my_bucket_oncreate-OnMessage0_IamRolePolicyAttachment_085EB554": { + "my_bucket_OnCreate-OnMessage0_IamRolePolicyAttachment_4F57A9D0": { "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "\${aws_iam_role.my_bucket_oncreate-OnMessage0_IamRole_9CAD40D5.name}", + "role": "\${aws_iam_role.my_bucket_OnCreate-OnMessage0_IamRole_A815D0BA.name}", }, }, "aws_lambda_function": { - "my_bucket_oncreate-OnMessage0_773D84E9": { + "my_bucket_OnCreate-OnMessage0_8A9D7A6E": { "architectures": [ "arm64", ], "environment": { "variables": { "NODE_OPTIONS": "--enable-source-maps", - "WING_FUNCTION_NAME": "oncreate-OnMessage0-c874e955", + "WING_FUNCTION_NAME": "OnCreate-OnMessage0-c8b6ea23", }, }, - "function_name": "oncreate-OnMessage0-c874e955", + "function_name": "OnCreate-OnMessage0-c8b6ea23", "handler": "index.handler", "memory_size": 1024, "publish": true, - "role": "\${aws_iam_role.my_bucket_oncreate-OnMessage0_IamRole_9CAD40D5.arn}", + "role": "\${aws_iam_role.my_bucket_OnCreate-OnMessage0_IamRole_A815D0BA.arn}", "runtime": "nodejs20.x", "s3_bucket": "\${aws_s3_bucket.Code.bucket}", - "s3_key": "\${aws_s3_object.my_bucket_oncreate-OnMessage0_S3Object_AF838DF5.key}", + "s3_key": "\${aws_s3_object.my_bucket_OnCreate-OnMessage0_S3Object_02866773.key}", "timeout": 60, "vpc_config": { "security_group_ids": [], @@ -368,11 +368,11 @@ exports[`bucket with onCreate method 1`] = ` }, }, "aws_lambda_permission": { - "my_bucket_oncreate-OnMessage0_InvokePermission-c8ad674c480f4e6c0a6bf1a492e393e9ccaed211a1_7675EF40": { + "my_bucket_OnCreate-OnMessage0_InvokePermission-c88b8dd64481dc3b326d5e0afc3b583852a5c383f8_60C310A7": { "action": "lambda:InvokeFunction", - "function_name": "\${aws_lambda_function.my_bucket_oncreate-OnMessage0_773D84E9.function_name}", + "function_name": "\${aws_lambda_function.my_bucket_OnCreate-OnMessage0_8A9D7A6E.function_name}", "principal": "sns.amazonaws.com", - "source_arn": "\${aws_sns_topic.my_bucket_oncreate_EF5D7ECA.arn}", + "source_arn": "\${aws_sns_topic.my_bucket_OnCreate_14226F85.arn}", }, }, "aws_s3_bucket": { @@ -388,7 +388,7 @@ exports[`bucket with onCreate method 1`] = ` "my_bucket_S3BucketNotification_DDA29E8F": { "bucket": "\${aws_s3_bucket.my_bucket.id}", "depends_on": [ - "aws_sns_topic_policy.my_bucket_oncreate_PublishPermission-c8045fccc85a7ef42d5391d87958e5ce36c53a401a_CE3B77A7", + "aws_sns_topic_policy.my_bucket_OnCreate_PublishPermission-c8045fccc85a7ef42d5391d87958e5ce36c53a401a_F8789A85", ], "topic": [ { @@ -396,7 +396,7 @@ exports[`bucket with onCreate method 1`] = ` "s3:ObjectCreated:Put", ], "id": "on-oncreate-notification", - "topic_arn": "\${aws_sns_topic.my_bucket_oncreate_EF5D7ECA.arn}", + "topic_arn": "\${aws_sns_topic.my_bucket_OnCreate_14226F85.arn}", }, ], }, @@ -420,28 +420,28 @@ exports[`bucket with onCreate method 1`] = ` }, }, "aws_s3_object": { - "my_bucket_oncreate-OnMessage0_S3Object_AF838DF5": { + "my_bucket_OnCreate-OnMessage0_S3Object_02866773": { "bucket": "\${aws_s3_bucket.Code.bucket}", "key": "", "source": "", }, }, "aws_sns_topic": { - "my_bucket_oncreate_EF5D7ECA": { - "name": "oncreate-c8ad674c", + "my_bucket_OnCreate_14226F85": { + "name": "OnCreate-c88b8dd6", }, }, "aws_sns_topic_policy": { - "my_bucket_oncreate_PublishPermission-c8045fccc85a7ef42d5391d87958e5ce36c53a401a_CE3B77A7": { - "arn": "\${aws_sns_topic.my_bucket_oncreate_EF5D7ECA.arn}", - "policy": "{"Statement":[{"Effect":"Allow","Principal":{"Service":"s3.amazonaws.com"},"Action":"sns:Publish","Resource":"\${aws_sns_topic.my_bucket_oncreate_EF5D7ECA.arn}","Condition":{"ArnEquals":{"aws:SourceArn":"\${aws_s3_bucket.my_bucket.arn}"}}}]}", + "my_bucket_OnCreate_PublishPermission-c8045fccc85a7ef42d5391d87958e5ce36c53a401a_F8789A85": { + "arn": "\${aws_sns_topic.my_bucket_OnCreate_14226F85.arn}", + "policy": "{"Statement":[{"Effect":"Allow","Principal":{"Service":"s3.amazonaws.com"},"Action":"sns:Publish","Resource":"\${aws_sns_topic.my_bucket_OnCreate_14226F85.arn}","Condition":{"ArnEquals":{"aws:SourceArn":"\${aws_s3_bucket.my_bucket.arn}"}}}]}", }, }, "aws_sns_topic_subscription": { - "my_bucket_oncreate_TopicSubscription0_0EC6A2F3": { - "endpoint": "\${aws_lambda_function.my_bucket_oncreate-OnMessage0_773D84E9.arn}", + "my_bucket_OnCreate_TopicSubscription0_4D6EC9AA": { + "endpoint": "\${aws_lambda_function.my_bucket_OnCreate-OnMessage0_8A9D7A6E.arn}", "protocol": "lambda", - "topic_arn": "\${aws_sns_topic.my_bucket_oncreate_EF5D7ECA.arn}", + "topic_arn": "\${aws_sns_topic.my_bucket_OnCreate_14226F85.arn}", }, }, }, @@ -496,34 +496,7 @@ exports[`bucket with onCreate method 2`] = ` "id": "Default", "path": "root/Default/my_bucket/Default", }, - "PublicAccessBlock": { - "constructInfo": { - "fqn": "cdktf.TerraformResource", - "version": "0.20.3", - }, - "display": {}, - "id": "PublicAccessBlock", - "path": "root/Default/my_bucket/PublicAccessBlock", - }, - "PublicPolicy": { - "constructInfo": { - "fqn": "cdktf.TerraformResource", - "version": "0.20.3", - }, - "display": {}, - "id": "PublicPolicy", - "path": "root/Default/my_bucket/PublicPolicy", - }, - "S3BucketNotification": { - "constructInfo": { - "fqn": "cdktf.TerraformResource", - "version": "0.20.3", - }, - "display": {}, - "id": "S3BucketNotification", - "path": "root/Default/my_bucket/S3BucketNotification", - }, - "oncreate": { + "OnCreate": { "children": { "Default": { "constructInfo": { @@ -532,7 +505,7 @@ exports[`bucket with onCreate method 2`] = ` }, "display": {}, "id": "Default", - "path": "root/Default/my_bucket/oncreate/Default", + "path": "root/Default/my_bucket/OnCreate/Default", }, "PublishPermission-c8045fccc85a7ef42d5391d87958e5ce36c53a401a": { "constructInfo": { @@ -541,7 +514,7 @@ exports[`bucket with onCreate method 2`] = ` }, "display": {}, "id": "PublishPermission-c8045fccc85a7ef42d5391d87958e5ce36c53a401a", - "path": "root/Default/my_bucket/oncreate/PublishPermission-c8045fccc85a7ef42d5391d87958e5ce36c53a401a", + "path": "root/Default/my_bucket/OnCreate/PublishPermission-c8045fccc85a7ef42d5391d87958e5ce36c53a401a", }, "TopicSubscription0": { "constructInfo": { @@ -550,7 +523,7 @@ exports[`bucket with onCreate method 2`] = ` }, "display": {}, "id": "TopicSubscription0", - "path": "root/Default/my_bucket/oncreate/TopicSubscription0", + "path": "root/Default/my_bucket/OnCreate/TopicSubscription0", }, }, "constructInfo": { @@ -561,10 +534,10 @@ exports[`bucket with onCreate method 2`] = ` "description": "A pub/sub notification topic", "title": "Topic", }, - "id": "oncreate", - "path": "root/Default/my_bucket/oncreate", + "id": "OnCreate", + "path": "root/Default/my_bucket/OnCreate", }, - "oncreate-OnMessage0": { + "OnCreate-OnMessage0": { "children": { "Asset": { "constructInfo": { @@ -573,7 +546,7 @@ exports[`bucket with onCreate method 2`] = ` }, "display": {}, "id": "Asset", - "path": "root/Default/my_bucket/oncreate-OnMessage0/Asset", + "path": "root/Default/my_bucket/OnCreate-OnMessage0/Asset", }, "CloudwatchLogGroup": { "constructInfo": { @@ -582,7 +555,7 @@ exports[`bucket with onCreate method 2`] = ` }, "display": {}, "id": "CloudwatchLogGroup", - "path": "root/Default/my_bucket/oncreate-OnMessage0/CloudwatchLogGroup", + "path": "root/Default/my_bucket/OnCreate-OnMessage0/CloudwatchLogGroup", }, "Default": { "constructInfo": { @@ -591,7 +564,7 @@ exports[`bucket with onCreate method 2`] = ` }, "display": {}, "id": "Default", - "path": "root/Default/my_bucket/oncreate-OnMessage0/Default", + "path": "root/Default/my_bucket/OnCreate-OnMessage0/Default", }, "IamRole": { "constructInfo": { @@ -600,7 +573,7 @@ exports[`bucket with onCreate method 2`] = ` }, "display": {}, "id": "IamRole", - "path": "root/Default/my_bucket/oncreate-OnMessage0/IamRole", + "path": "root/Default/my_bucket/OnCreate-OnMessage0/IamRole", }, "IamRolePolicy": { "constructInfo": { @@ -609,7 +582,7 @@ exports[`bucket with onCreate method 2`] = ` }, "display": {}, "id": "IamRolePolicy", - "path": "root/Default/my_bucket/oncreate-OnMessage0/IamRolePolicy", + "path": "root/Default/my_bucket/OnCreate-OnMessage0/IamRolePolicy", }, "IamRolePolicyAttachment": { "constructInfo": { @@ -618,16 +591,16 @@ exports[`bucket with onCreate method 2`] = ` }, "display": {}, "id": "IamRolePolicyAttachment", - "path": "root/Default/my_bucket/oncreate-OnMessage0/IamRolePolicyAttachment", + "path": "root/Default/my_bucket/OnCreate-OnMessage0/IamRolePolicyAttachment", }, - "InvokePermission-c8ad674c480f4e6c0a6bf1a492e393e9ccaed211a1": { + "InvokePermission-c88b8dd64481dc3b326d5e0afc3b583852a5c383f8": { "constructInfo": { "fqn": "cdktf.TerraformResource", "version": "0.20.3", }, "display": {}, - "id": "InvokePermission-c8ad674c480f4e6c0a6bf1a492e393e9ccaed211a1", - "path": "root/Default/my_bucket/oncreate-OnMessage0/InvokePermission-c8ad674c480f4e6c0a6bf1a492e393e9ccaed211a1", + "id": "InvokePermission-c88b8dd64481dc3b326d5e0afc3b583852a5c383f8", + "path": "root/Default/my_bucket/OnCreate-OnMessage0/InvokePermission-c88b8dd64481dc3b326d5e0afc3b583852a5c383f8", }, "S3Object": { "constructInfo": { @@ -636,7 +609,7 @@ exports[`bucket with onCreate method 2`] = ` }, "display": {}, "id": "S3Object", - "path": "root/Default/my_bucket/oncreate-OnMessage0/S3Object", + "path": "root/Default/my_bucket/OnCreate-OnMessage0/S3Object", }, }, "constructInfo": { @@ -647,8 +620,35 @@ exports[`bucket with onCreate method 2`] = ` "description": "A cloud function (FaaS)", "title": "Function", }, - "id": "oncreate-OnMessage0", - "path": "root/Default/my_bucket/oncreate-OnMessage0", + "id": "OnCreate-OnMessage0", + "path": "root/Default/my_bucket/OnCreate-OnMessage0", + }, + "PublicAccessBlock": { + "constructInfo": { + "fqn": "cdktf.TerraformResource", + "version": "0.20.3", + }, + "display": {}, + "id": "PublicAccessBlock", + "path": "root/Default/my_bucket/PublicAccessBlock", + }, + "PublicPolicy": { + "constructInfo": { + "fqn": "cdktf.TerraformResource", + "version": "0.20.3", + }, + "display": {}, + "id": "PublicPolicy", + "path": "root/Default/my_bucket/PublicPolicy", + }, + "S3BucketNotification": { + "constructInfo": { + "fqn": "cdktf.TerraformResource", + "version": "0.20.3", + }, + "display": {}, + "id": "S3BucketNotification", + "path": "root/Default/my_bucket/S3BucketNotification", }, }, "constructInfo": { @@ -706,47 +706,47 @@ exports[`bucket with onDelete method 1`] = ` { "resource": { "aws_cloudwatch_log_group": { - "my_bucket_ondelete-OnMessage0_CloudwatchLogGroup_420A05F2": { - "name": "/aws/lambda/ondelete-OnMessage0-c8772675", + "my_bucket_OnDelete-OnMessage0_CloudwatchLogGroup_24024A4B": { + "name": "/aws/lambda/OnDelete-OnMessage0-c804d7e9", "retention_in_days": 30, }, }, "aws_iam_role": { - "my_bucket_ondelete-OnMessage0_IamRole_04EA7EBC": { + "my_bucket_OnDelete-OnMessage0_IamRole_F99741C4": { "assume_role_policy": "{"Version":"2012-10-17","Statement":[{"Action":"sts:AssumeRole","Principal":{"Service":"lambda.amazonaws.com"},"Effect":"Allow"}]}", }, }, "aws_iam_role_policy": { - "my_bucket_ondelete-OnMessage0_IamRolePolicy_635C2064": { + "my_bucket_OnDelete-OnMessage0_IamRolePolicy_B1B53387": { "policy": "{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Action":"none:null","Resource":"*"}]}", - "role": "\${aws_iam_role.my_bucket_ondelete-OnMessage0_IamRole_04EA7EBC.name}", + "role": "\${aws_iam_role.my_bucket_OnDelete-OnMessage0_IamRole_F99741C4.name}", }, }, "aws_iam_role_policy_attachment": { - "my_bucket_ondelete-OnMessage0_IamRolePolicyAttachment_C985200D": { + "my_bucket_OnDelete-OnMessage0_IamRolePolicyAttachment_221C4BFC": { "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "\${aws_iam_role.my_bucket_ondelete-OnMessage0_IamRole_04EA7EBC.name}", + "role": "\${aws_iam_role.my_bucket_OnDelete-OnMessage0_IamRole_F99741C4.name}", }, }, "aws_lambda_function": { - "my_bucket_ondelete-OnMessage0_9871443D": { + "my_bucket_OnDelete-OnMessage0_DB633A4C": { "architectures": [ "arm64", ], "environment": { "variables": { "NODE_OPTIONS": "--enable-source-maps", - "WING_FUNCTION_NAME": "ondelete-OnMessage0-c8772675", + "WING_FUNCTION_NAME": "OnDelete-OnMessage0-c804d7e9", }, }, - "function_name": "ondelete-OnMessage0-c8772675", + "function_name": "OnDelete-OnMessage0-c804d7e9", "handler": "index.handler", "memory_size": 1024, "publish": true, - "role": "\${aws_iam_role.my_bucket_ondelete-OnMessage0_IamRole_04EA7EBC.arn}", + "role": "\${aws_iam_role.my_bucket_OnDelete-OnMessage0_IamRole_F99741C4.arn}", "runtime": "nodejs20.x", "s3_bucket": "\${aws_s3_bucket.Code.bucket}", - "s3_key": "\${aws_s3_object.my_bucket_ondelete-OnMessage0_S3Object_BB790A1F.key}", + "s3_key": "\${aws_s3_object.my_bucket_OnDelete-OnMessage0_S3Object_B50900E0.key}", "timeout": 60, "vpc_config": { "security_group_ids": [], @@ -755,11 +755,11 @@ exports[`bucket with onDelete method 1`] = ` }, }, "aws_lambda_permission": { - "my_bucket_ondelete-OnMessage0_InvokePermission-c8142b51acc0b500d0402de71ecbd0ecf4977ec315_E690DB87": { + "my_bucket_OnDelete-OnMessage0_InvokePermission-c818f13827fc0721db2eca69eab078997f6f9a8c7a_63129B62": { "action": "lambda:InvokeFunction", - "function_name": "\${aws_lambda_function.my_bucket_ondelete-OnMessage0_9871443D.function_name}", + "function_name": "\${aws_lambda_function.my_bucket_OnDelete-OnMessage0_DB633A4C.function_name}", "principal": "sns.amazonaws.com", - "source_arn": "\${aws_sns_topic.my_bucket_ondelete_C2E093CB.arn}", + "source_arn": "\${aws_sns_topic.my_bucket_OnDelete_E3DBFE86.arn}", }, }, "aws_s3_bucket": { @@ -775,7 +775,7 @@ exports[`bucket with onDelete method 1`] = ` "my_bucket_S3BucketNotification_DDA29E8F": { "bucket": "\${aws_s3_bucket.my_bucket.id}", "depends_on": [ - "aws_sns_topic_policy.my_bucket_ondelete_PublishPermission-c8045fccc85a7ef42d5391d87958e5ce36c53a401a_1B83A43C", + "aws_sns_topic_policy.my_bucket_OnDelete_PublishPermission-c8045fccc85a7ef42d5391d87958e5ce36c53a401a_54A5EE56", ], "topic": [ { @@ -783,7 +783,7 @@ exports[`bucket with onDelete method 1`] = ` "s3:ObjectRemoved:*", ], "id": "on-ondelete-notification", - "topic_arn": "\${aws_sns_topic.my_bucket_ondelete_C2E093CB.arn}", + "topic_arn": "\${aws_sns_topic.my_bucket_OnDelete_E3DBFE86.arn}", }, ], }, @@ -807,28 +807,28 @@ exports[`bucket with onDelete method 1`] = ` }, }, "aws_s3_object": { - "my_bucket_ondelete-OnMessage0_S3Object_BB790A1F": { + "my_bucket_OnDelete-OnMessage0_S3Object_B50900E0": { "bucket": "\${aws_s3_bucket.Code.bucket}", "key": "", "source": "", }, }, "aws_sns_topic": { - "my_bucket_ondelete_C2E093CB": { - "name": "ondelete-c8142b51", + "my_bucket_OnDelete_E3DBFE86": { + "name": "OnDelete-c818f138", }, }, "aws_sns_topic_policy": { - "my_bucket_ondelete_PublishPermission-c8045fccc85a7ef42d5391d87958e5ce36c53a401a_1B83A43C": { - "arn": "\${aws_sns_topic.my_bucket_ondelete_C2E093CB.arn}", - "policy": "{"Statement":[{"Effect":"Allow","Principal":{"Service":"s3.amazonaws.com"},"Action":"sns:Publish","Resource":"\${aws_sns_topic.my_bucket_ondelete_C2E093CB.arn}","Condition":{"ArnEquals":{"aws:SourceArn":"\${aws_s3_bucket.my_bucket.arn}"}}}]}", + "my_bucket_OnDelete_PublishPermission-c8045fccc85a7ef42d5391d87958e5ce36c53a401a_54A5EE56": { + "arn": "\${aws_sns_topic.my_bucket_OnDelete_E3DBFE86.arn}", + "policy": "{"Statement":[{"Effect":"Allow","Principal":{"Service":"s3.amazonaws.com"},"Action":"sns:Publish","Resource":"\${aws_sns_topic.my_bucket_OnDelete_E3DBFE86.arn}","Condition":{"ArnEquals":{"aws:SourceArn":"\${aws_s3_bucket.my_bucket.arn}"}}}]}", }, }, "aws_sns_topic_subscription": { - "my_bucket_ondelete_TopicSubscription0_E374967A": { - "endpoint": "\${aws_lambda_function.my_bucket_ondelete-OnMessage0_9871443D.arn}", + "my_bucket_OnDelete_TopicSubscription0_7974ED63": { + "endpoint": "\${aws_lambda_function.my_bucket_OnDelete-OnMessage0_DB633A4C.arn}", "protocol": "lambda", - "topic_arn": "\${aws_sns_topic.my_bucket_ondelete_C2E093CB.arn}", + "topic_arn": "\${aws_sns_topic.my_bucket_OnDelete_E3DBFE86.arn}", }, }, }, @@ -883,34 +883,7 @@ exports[`bucket with onDelete method 2`] = ` "id": "Default", "path": "root/Default/my_bucket/Default", }, - "PublicAccessBlock": { - "constructInfo": { - "fqn": "cdktf.TerraformResource", - "version": "0.20.3", - }, - "display": {}, - "id": "PublicAccessBlock", - "path": "root/Default/my_bucket/PublicAccessBlock", - }, - "PublicPolicy": { - "constructInfo": { - "fqn": "cdktf.TerraformResource", - "version": "0.20.3", - }, - "display": {}, - "id": "PublicPolicy", - "path": "root/Default/my_bucket/PublicPolicy", - }, - "S3BucketNotification": { - "constructInfo": { - "fqn": "cdktf.TerraformResource", - "version": "0.20.3", - }, - "display": {}, - "id": "S3BucketNotification", - "path": "root/Default/my_bucket/S3BucketNotification", - }, - "ondelete": { + "OnDelete": { "children": { "Default": { "constructInfo": { @@ -919,7 +892,7 @@ exports[`bucket with onDelete method 2`] = ` }, "display": {}, "id": "Default", - "path": "root/Default/my_bucket/ondelete/Default", + "path": "root/Default/my_bucket/OnDelete/Default", }, "PublishPermission-c8045fccc85a7ef42d5391d87958e5ce36c53a401a": { "constructInfo": { @@ -928,7 +901,7 @@ exports[`bucket with onDelete method 2`] = ` }, "display": {}, "id": "PublishPermission-c8045fccc85a7ef42d5391d87958e5ce36c53a401a", - "path": "root/Default/my_bucket/ondelete/PublishPermission-c8045fccc85a7ef42d5391d87958e5ce36c53a401a", + "path": "root/Default/my_bucket/OnDelete/PublishPermission-c8045fccc85a7ef42d5391d87958e5ce36c53a401a", }, "TopicSubscription0": { "constructInfo": { @@ -937,7 +910,7 @@ exports[`bucket with onDelete method 2`] = ` }, "display": {}, "id": "TopicSubscription0", - "path": "root/Default/my_bucket/ondelete/TopicSubscription0", + "path": "root/Default/my_bucket/OnDelete/TopicSubscription0", }, }, "constructInfo": { @@ -948,10 +921,10 @@ exports[`bucket with onDelete method 2`] = ` "description": "A pub/sub notification topic", "title": "Topic", }, - "id": "ondelete", - "path": "root/Default/my_bucket/ondelete", + "id": "OnDelete", + "path": "root/Default/my_bucket/OnDelete", }, - "ondelete-OnMessage0": { + "OnDelete-OnMessage0": { "children": { "Asset": { "constructInfo": { @@ -960,7 +933,7 @@ exports[`bucket with onDelete method 2`] = ` }, "display": {}, "id": "Asset", - "path": "root/Default/my_bucket/ondelete-OnMessage0/Asset", + "path": "root/Default/my_bucket/OnDelete-OnMessage0/Asset", }, "CloudwatchLogGroup": { "constructInfo": { @@ -969,7 +942,7 @@ exports[`bucket with onDelete method 2`] = ` }, "display": {}, "id": "CloudwatchLogGroup", - "path": "root/Default/my_bucket/ondelete-OnMessage0/CloudwatchLogGroup", + "path": "root/Default/my_bucket/OnDelete-OnMessage0/CloudwatchLogGroup", }, "Default": { "constructInfo": { @@ -978,7 +951,7 @@ exports[`bucket with onDelete method 2`] = ` }, "display": {}, "id": "Default", - "path": "root/Default/my_bucket/ondelete-OnMessage0/Default", + "path": "root/Default/my_bucket/OnDelete-OnMessage0/Default", }, "IamRole": { "constructInfo": { @@ -987,7 +960,7 @@ exports[`bucket with onDelete method 2`] = ` }, "display": {}, "id": "IamRole", - "path": "root/Default/my_bucket/ondelete-OnMessage0/IamRole", + "path": "root/Default/my_bucket/OnDelete-OnMessage0/IamRole", }, "IamRolePolicy": { "constructInfo": { @@ -996,7 +969,7 @@ exports[`bucket with onDelete method 2`] = ` }, "display": {}, "id": "IamRolePolicy", - "path": "root/Default/my_bucket/ondelete-OnMessage0/IamRolePolicy", + "path": "root/Default/my_bucket/OnDelete-OnMessage0/IamRolePolicy", }, "IamRolePolicyAttachment": { "constructInfo": { @@ -1005,16 +978,16 @@ exports[`bucket with onDelete method 2`] = ` }, "display": {}, "id": "IamRolePolicyAttachment", - "path": "root/Default/my_bucket/ondelete-OnMessage0/IamRolePolicyAttachment", + "path": "root/Default/my_bucket/OnDelete-OnMessage0/IamRolePolicyAttachment", }, - "InvokePermission-c8142b51acc0b500d0402de71ecbd0ecf4977ec315": { + "InvokePermission-c818f13827fc0721db2eca69eab078997f6f9a8c7a": { "constructInfo": { "fqn": "cdktf.TerraformResource", "version": "0.20.3", }, "display": {}, - "id": "InvokePermission-c8142b51acc0b500d0402de71ecbd0ecf4977ec315", - "path": "root/Default/my_bucket/ondelete-OnMessage0/InvokePermission-c8142b51acc0b500d0402de71ecbd0ecf4977ec315", + "id": "InvokePermission-c818f13827fc0721db2eca69eab078997f6f9a8c7a", + "path": "root/Default/my_bucket/OnDelete-OnMessage0/InvokePermission-c818f13827fc0721db2eca69eab078997f6f9a8c7a", }, "S3Object": { "constructInfo": { @@ -1023,7 +996,7 @@ exports[`bucket with onDelete method 2`] = ` }, "display": {}, "id": "S3Object", - "path": "root/Default/my_bucket/ondelete-OnMessage0/S3Object", + "path": "root/Default/my_bucket/OnDelete-OnMessage0/S3Object", }, }, "constructInfo": { @@ -1034,8 +1007,35 @@ exports[`bucket with onDelete method 2`] = ` "description": "A cloud function (FaaS)", "title": "Function", }, - "id": "ondelete-OnMessage0", - "path": "root/Default/my_bucket/ondelete-OnMessage0", + "id": "OnDelete-OnMessage0", + "path": "root/Default/my_bucket/OnDelete-OnMessage0", + }, + "PublicAccessBlock": { + "constructInfo": { + "fqn": "cdktf.TerraformResource", + "version": "0.20.3", + }, + "display": {}, + "id": "PublicAccessBlock", + "path": "root/Default/my_bucket/PublicAccessBlock", + }, + "PublicPolicy": { + "constructInfo": { + "fqn": "cdktf.TerraformResource", + "version": "0.20.3", + }, + "display": {}, + "id": "PublicPolicy", + "path": "root/Default/my_bucket/PublicPolicy", + }, + "S3BucketNotification": { + "constructInfo": { + "fqn": "cdktf.TerraformResource", + "version": "0.20.3", + }, + "display": {}, + "id": "S3BucketNotification", + "path": "root/Default/my_bucket/S3BucketNotification", }, }, "constructInfo": { @@ -1093,125 +1093,125 @@ exports[`bucket with onEvent method 1`] = ` { "resource": { "aws_cloudwatch_log_group": { - "my_bucket_oncreate-OnMessage0_CloudwatchLogGroup_E35B13F5": { - "name": "/aws/lambda/oncreate-OnMessage0-c874e955", + "my_bucket_OnCreate-OnMessage0_CloudwatchLogGroup_E3DA1BCC": { + "name": "/aws/lambda/OnCreate-OnMessage0-c8b6ea23", "retention_in_days": 30, }, - "my_bucket_ondelete-OnMessage0_CloudwatchLogGroup_420A05F2": { - "name": "/aws/lambda/ondelete-OnMessage0-c8772675", + "my_bucket_OnDelete-OnMessage0_CloudwatchLogGroup_24024A4B": { + "name": "/aws/lambda/OnDelete-OnMessage0-c804d7e9", "retention_in_days": 30, }, - "my_bucket_onupdate-OnMessage0_CloudwatchLogGroup_25463B70": { - "name": "/aws/lambda/onupdate-OnMessage0-c8a1be62", + "my_bucket_OnUpdate-OnMessage0_CloudwatchLogGroup_CA36F40B": { + "name": "/aws/lambda/OnUpdate-OnMessage0-c81076cf", "retention_in_days": 30, }, }, "aws_iam_role": { - "my_bucket_oncreate-OnMessage0_IamRole_9CAD40D5": { + "my_bucket_OnCreate-OnMessage0_IamRole_A815D0BA": { "assume_role_policy": "{"Version":"2012-10-17","Statement":[{"Action":"sts:AssumeRole","Principal":{"Service":"lambda.amazonaws.com"},"Effect":"Allow"}]}", }, - "my_bucket_ondelete-OnMessage0_IamRole_04EA7EBC": { + "my_bucket_OnDelete-OnMessage0_IamRole_F99741C4": { "assume_role_policy": "{"Version":"2012-10-17","Statement":[{"Action":"sts:AssumeRole","Principal":{"Service":"lambda.amazonaws.com"},"Effect":"Allow"}]}", }, - "my_bucket_onupdate-OnMessage0_IamRole_9C1FBCBE": { + "my_bucket_OnUpdate-OnMessage0_IamRole_846F92CF": { "assume_role_policy": "{"Version":"2012-10-17","Statement":[{"Action":"sts:AssumeRole","Principal":{"Service":"lambda.amazonaws.com"},"Effect":"Allow"}]}", }, }, "aws_iam_role_policy": { - "my_bucket_oncreate-OnMessage0_IamRolePolicy_CDE0CB68": { + "my_bucket_OnCreate-OnMessage0_IamRolePolicy_8D03B4D5": { "policy": "{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Action":"none:null","Resource":"*"}]}", - "role": "\${aws_iam_role.my_bucket_oncreate-OnMessage0_IamRole_9CAD40D5.name}", + "role": "\${aws_iam_role.my_bucket_OnCreate-OnMessage0_IamRole_A815D0BA.name}", }, - "my_bucket_ondelete-OnMessage0_IamRolePolicy_635C2064": { + "my_bucket_OnDelete-OnMessage0_IamRolePolicy_B1B53387": { "policy": "{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Action":"none:null","Resource":"*"}]}", - "role": "\${aws_iam_role.my_bucket_ondelete-OnMessage0_IamRole_04EA7EBC.name}", + "role": "\${aws_iam_role.my_bucket_OnDelete-OnMessage0_IamRole_F99741C4.name}", }, - "my_bucket_onupdate-OnMessage0_IamRolePolicy_27D30DCE": { + "my_bucket_OnUpdate-OnMessage0_IamRolePolicy_94D2868B": { "policy": "{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Action":"none:null","Resource":"*"}]}", - "role": "\${aws_iam_role.my_bucket_onupdate-OnMessage0_IamRole_9C1FBCBE.name}", + "role": "\${aws_iam_role.my_bucket_OnUpdate-OnMessage0_IamRole_846F92CF.name}", }, }, "aws_iam_role_policy_attachment": { - "my_bucket_oncreate-OnMessage0_IamRolePolicyAttachment_085EB554": { + "my_bucket_OnCreate-OnMessage0_IamRolePolicyAttachment_4F57A9D0": { "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "\${aws_iam_role.my_bucket_oncreate-OnMessage0_IamRole_9CAD40D5.name}", + "role": "\${aws_iam_role.my_bucket_OnCreate-OnMessage0_IamRole_A815D0BA.name}", }, - "my_bucket_ondelete-OnMessage0_IamRolePolicyAttachment_C985200D": { + "my_bucket_OnDelete-OnMessage0_IamRolePolicyAttachment_221C4BFC": { "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "\${aws_iam_role.my_bucket_ondelete-OnMessage0_IamRole_04EA7EBC.name}", + "role": "\${aws_iam_role.my_bucket_OnDelete-OnMessage0_IamRole_F99741C4.name}", }, - "my_bucket_onupdate-OnMessage0_IamRolePolicyAttachment_E4288C48": { + "my_bucket_OnUpdate-OnMessage0_IamRolePolicyAttachment_5073159D": { "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "\${aws_iam_role.my_bucket_onupdate-OnMessage0_IamRole_9C1FBCBE.name}", + "role": "\${aws_iam_role.my_bucket_OnUpdate-OnMessage0_IamRole_846F92CF.name}", }, }, "aws_lambda_function": { - "my_bucket_oncreate-OnMessage0_773D84E9": { + "my_bucket_OnCreate-OnMessage0_8A9D7A6E": { "architectures": [ "arm64", ], "environment": { "variables": { "NODE_OPTIONS": "--enable-source-maps", - "WING_FUNCTION_NAME": "oncreate-OnMessage0-c874e955", + "WING_FUNCTION_NAME": "OnCreate-OnMessage0-c8b6ea23", }, }, - "function_name": "oncreate-OnMessage0-c874e955", + "function_name": "OnCreate-OnMessage0-c8b6ea23", "handler": "index.handler", "memory_size": 1024, "publish": true, - "role": "\${aws_iam_role.my_bucket_oncreate-OnMessage0_IamRole_9CAD40D5.arn}", + "role": "\${aws_iam_role.my_bucket_OnCreate-OnMessage0_IamRole_A815D0BA.arn}", "runtime": "nodejs20.x", "s3_bucket": "\${aws_s3_bucket.Code.bucket}", - "s3_key": "\${aws_s3_object.my_bucket_oncreate-OnMessage0_S3Object_AF838DF5.key}", + "s3_key": "\${aws_s3_object.my_bucket_OnCreate-OnMessage0_S3Object_02866773.key}", "timeout": 60, "vpc_config": { "security_group_ids": [], "subnet_ids": [], }, }, - "my_bucket_ondelete-OnMessage0_9871443D": { + "my_bucket_OnDelete-OnMessage0_DB633A4C": { "architectures": [ "arm64", ], "environment": { "variables": { "NODE_OPTIONS": "--enable-source-maps", - "WING_FUNCTION_NAME": "ondelete-OnMessage0-c8772675", + "WING_FUNCTION_NAME": "OnDelete-OnMessage0-c804d7e9", }, }, - "function_name": "ondelete-OnMessage0-c8772675", + "function_name": "OnDelete-OnMessage0-c804d7e9", "handler": "index.handler", "memory_size": 1024, "publish": true, - "role": "\${aws_iam_role.my_bucket_ondelete-OnMessage0_IamRole_04EA7EBC.arn}", + "role": "\${aws_iam_role.my_bucket_OnDelete-OnMessage0_IamRole_F99741C4.arn}", "runtime": "nodejs20.x", "s3_bucket": "\${aws_s3_bucket.Code.bucket}", - "s3_key": "\${aws_s3_object.my_bucket_ondelete-OnMessage0_S3Object_BB790A1F.key}", + "s3_key": "\${aws_s3_object.my_bucket_OnDelete-OnMessage0_S3Object_B50900E0.key}", "timeout": 60, "vpc_config": { "security_group_ids": [], "subnet_ids": [], }, }, - "my_bucket_onupdate-OnMessage0_EB805895": { + "my_bucket_OnUpdate-OnMessage0_B4C11A28": { "architectures": [ "arm64", ], "environment": { "variables": { "NODE_OPTIONS": "--enable-source-maps", - "WING_FUNCTION_NAME": "onupdate-OnMessage0-c8a1be62", + "WING_FUNCTION_NAME": "OnUpdate-OnMessage0-c81076cf", }, }, - "function_name": "onupdate-OnMessage0-c8a1be62", + "function_name": "OnUpdate-OnMessage0-c81076cf", "handler": "index.handler", "memory_size": 1024, "publish": true, - "role": "\${aws_iam_role.my_bucket_onupdate-OnMessage0_IamRole_9C1FBCBE.arn}", + "role": "\${aws_iam_role.my_bucket_OnUpdate-OnMessage0_IamRole_846F92CF.arn}", "runtime": "nodejs20.x", "s3_bucket": "\${aws_s3_bucket.Code.bucket}", - "s3_key": "\${aws_s3_object.my_bucket_onupdate-OnMessage0_S3Object_CD6EE6AF.key}", + "s3_key": "\${aws_s3_object.my_bucket_OnUpdate-OnMessage0_S3Object_1E352BCE.key}", "timeout": 60, "vpc_config": { "security_group_ids": [], @@ -1220,23 +1220,23 @@ exports[`bucket with onEvent method 1`] = ` }, }, "aws_lambda_permission": { - "my_bucket_oncreate-OnMessage0_InvokePermission-c8ad674c480f4e6c0a6bf1a492e393e9ccaed211a1_7675EF40": { + "my_bucket_OnCreate-OnMessage0_InvokePermission-c88b8dd64481dc3b326d5e0afc3b583852a5c383f8_60C310A7": { "action": "lambda:InvokeFunction", - "function_name": "\${aws_lambda_function.my_bucket_oncreate-OnMessage0_773D84E9.function_name}", + "function_name": "\${aws_lambda_function.my_bucket_OnCreate-OnMessage0_8A9D7A6E.function_name}", "principal": "sns.amazonaws.com", - "source_arn": "\${aws_sns_topic.my_bucket_oncreate_EF5D7ECA.arn}", + "source_arn": "\${aws_sns_topic.my_bucket_OnCreate_14226F85.arn}", }, - "my_bucket_ondelete-OnMessage0_InvokePermission-c8142b51acc0b500d0402de71ecbd0ecf4977ec315_E690DB87": { + "my_bucket_OnDelete-OnMessage0_InvokePermission-c818f13827fc0721db2eca69eab078997f6f9a8c7a_63129B62": { "action": "lambda:InvokeFunction", - "function_name": "\${aws_lambda_function.my_bucket_ondelete-OnMessage0_9871443D.function_name}", + "function_name": "\${aws_lambda_function.my_bucket_OnDelete-OnMessage0_DB633A4C.function_name}", "principal": "sns.amazonaws.com", - "source_arn": "\${aws_sns_topic.my_bucket_ondelete_C2E093CB.arn}", + "source_arn": "\${aws_sns_topic.my_bucket_OnDelete_E3DBFE86.arn}", }, - "my_bucket_onupdate-OnMessage0_InvokePermission-c810a1e91f70a36a50557a2c23bc28c96365a22f22_7EE27EAF": { + "my_bucket_OnUpdate-OnMessage0_InvokePermission-c84ec84688efaa3bd78e7099e53e40fb2fe4ca5229_327F1182": { "action": "lambda:InvokeFunction", - "function_name": "\${aws_lambda_function.my_bucket_onupdate-OnMessage0_EB805895.function_name}", + "function_name": "\${aws_lambda_function.my_bucket_OnUpdate-OnMessage0_B4C11A28.function_name}", "principal": "sns.amazonaws.com", - "source_arn": "\${aws_sns_topic.my_bucket_onupdate_DF9292B4.arn}", + "source_arn": "\${aws_sns_topic.my_bucket_OnUpdate_0AC450AE.arn}", }, }, "aws_s3_bucket": { @@ -1252,9 +1252,9 @@ exports[`bucket with onEvent method 1`] = ` "my_bucket_S3BucketNotification_DDA29E8F": { "bucket": "\${aws_s3_bucket.my_bucket.id}", "depends_on": [ - "aws_sns_topic_policy.my_bucket_oncreate_PublishPermission-c8045fccc85a7ef42d5391d87958e5ce36c53a401a_CE3B77A7", - "aws_sns_topic_policy.my_bucket_onupdate_PublishPermission-c8045fccc85a7ef42d5391d87958e5ce36c53a401a_C89A58B9", - "aws_sns_topic_policy.my_bucket_ondelete_PublishPermission-c8045fccc85a7ef42d5391d87958e5ce36c53a401a_1B83A43C", + "aws_sns_topic_policy.my_bucket_OnCreate_PublishPermission-c8045fccc85a7ef42d5391d87958e5ce36c53a401a_F8789A85", + "aws_sns_topic_policy.my_bucket_OnUpdate_PublishPermission-c8045fccc85a7ef42d5391d87958e5ce36c53a401a_A302B66A", + "aws_sns_topic_policy.my_bucket_OnDelete_PublishPermission-c8045fccc85a7ef42d5391d87958e5ce36c53a401a_54A5EE56", ], "topic": [ { @@ -1262,21 +1262,21 @@ exports[`bucket with onEvent method 1`] = ` "s3:ObjectCreated:Put", ], "id": "on-oncreate-notification", - "topic_arn": "\${aws_sns_topic.my_bucket_oncreate_EF5D7ECA.arn}", + "topic_arn": "\${aws_sns_topic.my_bucket_OnCreate_14226F85.arn}", }, { "events": [ "s3:ObjectCreated:Post", ], "id": "on-onupdate-notification", - "topic_arn": "\${aws_sns_topic.my_bucket_onupdate_DF9292B4.arn}", + "topic_arn": "\${aws_sns_topic.my_bucket_OnUpdate_0AC450AE.arn}", }, { "events": [ "s3:ObjectRemoved:*", ], "id": "on-ondelete-notification", - "topic_arn": "\${aws_sns_topic.my_bucket_ondelete_C2E093CB.arn}", + "topic_arn": "\${aws_sns_topic.my_bucket_OnDelete_E3DBFE86.arn}", }, ], }, @@ -1300,62 +1300,62 @@ exports[`bucket with onEvent method 1`] = ` }, }, "aws_s3_object": { - "my_bucket_oncreate-OnMessage0_S3Object_AF838DF5": { + "my_bucket_OnCreate-OnMessage0_S3Object_02866773": { "bucket": "\${aws_s3_bucket.Code.bucket}", "key": "", "source": "", }, - "my_bucket_ondelete-OnMessage0_S3Object_BB790A1F": { + "my_bucket_OnDelete-OnMessage0_S3Object_B50900E0": { "bucket": "\${aws_s3_bucket.Code.bucket}", "key": "", "source": "", }, - "my_bucket_onupdate-OnMessage0_S3Object_CD6EE6AF": { + "my_bucket_OnUpdate-OnMessage0_S3Object_1E352BCE": { "bucket": "\${aws_s3_bucket.Code.bucket}", "key": "", "source": "", }, }, "aws_sns_topic": { - "my_bucket_oncreate_EF5D7ECA": { - "name": "oncreate-c8ad674c", + "my_bucket_OnCreate_14226F85": { + "name": "OnCreate-c88b8dd6", }, - "my_bucket_ondelete_C2E093CB": { - "name": "ondelete-c8142b51", + "my_bucket_OnDelete_E3DBFE86": { + "name": "OnDelete-c818f138", }, - "my_bucket_onupdate_DF9292B4": { - "name": "onupdate-c810a1e9", + "my_bucket_OnUpdate_0AC450AE": { + "name": "OnUpdate-c84ec846", }, }, "aws_sns_topic_policy": { - "my_bucket_oncreate_PublishPermission-c8045fccc85a7ef42d5391d87958e5ce36c53a401a_CE3B77A7": { - "arn": "\${aws_sns_topic.my_bucket_oncreate_EF5D7ECA.arn}", - "policy": "{"Statement":[{"Effect":"Allow","Principal":{"Service":"s3.amazonaws.com"},"Action":"sns:Publish","Resource":"\${aws_sns_topic.my_bucket_oncreate_EF5D7ECA.arn}","Condition":{"ArnEquals":{"aws:SourceArn":"\${aws_s3_bucket.my_bucket.arn}"}}}]}", + "my_bucket_OnCreate_PublishPermission-c8045fccc85a7ef42d5391d87958e5ce36c53a401a_F8789A85": { + "arn": "\${aws_sns_topic.my_bucket_OnCreate_14226F85.arn}", + "policy": "{"Statement":[{"Effect":"Allow","Principal":{"Service":"s3.amazonaws.com"},"Action":"sns:Publish","Resource":"\${aws_sns_topic.my_bucket_OnCreate_14226F85.arn}","Condition":{"ArnEquals":{"aws:SourceArn":"\${aws_s3_bucket.my_bucket.arn}"}}}]}", }, - "my_bucket_ondelete_PublishPermission-c8045fccc85a7ef42d5391d87958e5ce36c53a401a_1B83A43C": { - "arn": "\${aws_sns_topic.my_bucket_ondelete_C2E093CB.arn}", - "policy": "{"Statement":[{"Effect":"Allow","Principal":{"Service":"s3.amazonaws.com"},"Action":"sns:Publish","Resource":"\${aws_sns_topic.my_bucket_ondelete_C2E093CB.arn}","Condition":{"ArnEquals":{"aws:SourceArn":"\${aws_s3_bucket.my_bucket.arn}"}}}]}", + "my_bucket_OnDelete_PublishPermission-c8045fccc85a7ef42d5391d87958e5ce36c53a401a_54A5EE56": { + "arn": "\${aws_sns_topic.my_bucket_OnDelete_E3DBFE86.arn}", + "policy": "{"Statement":[{"Effect":"Allow","Principal":{"Service":"s3.amazonaws.com"},"Action":"sns:Publish","Resource":"\${aws_sns_topic.my_bucket_OnDelete_E3DBFE86.arn}","Condition":{"ArnEquals":{"aws:SourceArn":"\${aws_s3_bucket.my_bucket.arn}"}}}]}", }, - "my_bucket_onupdate_PublishPermission-c8045fccc85a7ef42d5391d87958e5ce36c53a401a_C89A58B9": { - "arn": "\${aws_sns_topic.my_bucket_onupdate_DF9292B4.arn}", - "policy": "{"Statement":[{"Effect":"Allow","Principal":{"Service":"s3.amazonaws.com"},"Action":"sns:Publish","Resource":"\${aws_sns_topic.my_bucket_onupdate_DF9292B4.arn}","Condition":{"ArnEquals":{"aws:SourceArn":"\${aws_s3_bucket.my_bucket.arn}"}}}]}", + "my_bucket_OnUpdate_PublishPermission-c8045fccc85a7ef42d5391d87958e5ce36c53a401a_A302B66A": { + "arn": "\${aws_sns_topic.my_bucket_OnUpdate_0AC450AE.arn}", + "policy": "{"Statement":[{"Effect":"Allow","Principal":{"Service":"s3.amazonaws.com"},"Action":"sns:Publish","Resource":"\${aws_sns_topic.my_bucket_OnUpdate_0AC450AE.arn}","Condition":{"ArnEquals":{"aws:SourceArn":"\${aws_s3_bucket.my_bucket.arn}"}}}]}", }, }, "aws_sns_topic_subscription": { - "my_bucket_oncreate_TopicSubscription0_0EC6A2F3": { - "endpoint": "\${aws_lambda_function.my_bucket_oncreate-OnMessage0_773D84E9.arn}", + "my_bucket_OnCreate_TopicSubscription0_4D6EC9AA": { + "endpoint": "\${aws_lambda_function.my_bucket_OnCreate-OnMessage0_8A9D7A6E.arn}", "protocol": "lambda", - "topic_arn": "\${aws_sns_topic.my_bucket_oncreate_EF5D7ECA.arn}", + "topic_arn": "\${aws_sns_topic.my_bucket_OnCreate_14226F85.arn}", }, - "my_bucket_ondelete_TopicSubscription0_E374967A": { - "endpoint": "\${aws_lambda_function.my_bucket_ondelete-OnMessage0_9871443D.arn}", + "my_bucket_OnDelete_TopicSubscription0_7974ED63": { + "endpoint": "\${aws_lambda_function.my_bucket_OnDelete-OnMessage0_DB633A4C.arn}", "protocol": "lambda", - "topic_arn": "\${aws_sns_topic.my_bucket_ondelete_C2E093CB.arn}", + "topic_arn": "\${aws_sns_topic.my_bucket_OnDelete_E3DBFE86.arn}", }, - "my_bucket_onupdate_TopicSubscription0_0BEAE6F8": { - "endpoint": "\${aws_lambda_function.my_bucket_onupdate-OnMessage0_EB805895.arn}", + "my_bucket_OnUpdate_TopicSubscription0_56144B6F": { + "endpoint": "\${aws_lambda_function.my_bucket_OnUpdate-OnMessage0_B4C11A28.arn}", "protocol": "lambda", - "topic_arn": "\${aws_sns_topic.my_bucket_onupdate_DF9292B4.arn}", + "topic_arn": "\${aws_sns_topic.my_bucket_OnUpdate_0AC450AE.arn}", }, }, }, @@ -1410,34 +1410,7 @@ exports[`bucket with onEvent method 2`] = ` "id": "Default", "path": "root/Default/my_bucket/Default", }, - "PublicAccessBlock": { - "constructInfo": { - "fqn": "cdktf.TerraformResource", - "version": "0.20.3", - }, - "display": {}, - "id": "PublicAccessBlock", - "path": "root/Default/my_bucket/PublicAccessBlock", - }, - "PublicPolicy": { - "constructInfo": { - "fqn": "cdktf.TerraformResource", - "version": "0.20.3", - }, - "display": {}, - "id": "PublicPolicy", - "path": "root/Default/my_bucket/PublicPolicy", - }, - "S3BucketNotification": { - "constructInfo": { - "fqn": "cdktf.TerraformResource", - "version": "0.20.3", - }, - "display": {}, - "id": "S3BucketNotification", - "path": "root/Default/my_bucket/S3BucketNotification", - }, - "oncreate": { + "OnCreate": { "children": { "Default": { "constructInfo": { @@ -1446,7 +1419,7 @@ exports[`bucket with onEvent method 2`] = ` }, "display": {}, "id": "Default", - "path": "root/Default/my_bucket/oncreate/Default", + "path": "root/Default/my_bucket/OnCreate/Default", }, "PublishPermission-c8045fccc85a7ef42d5391d87958e5ce36c53a401a": { "constructInfo": { @@ -1455,7 +1428,7 @@ exports[`bucket with onEvent method 2`] = ` }, "display": {}, "id": "PublishPermission-c8045fccc85a7ef42d5391d87958e5ce36c53a401a", - "path": "root/Default/my_bucket/oncreate/PublishPermission-c8045fccc85a7ef42d5391d87958e5ce36c53a401a", + "path": "root/Default/my_bucket/OnCreate/PublishPermission-c8045fccc85a7ef42d5391d87958e5ce36c53a401a", }, "TopicSubscription0": { "constructInfo": { @@ -1464,7 +1437,7 @@ exports[`bucket with onEvent method 2`] = ` }, "display": {}, "id": "TopicSubscription0", - "path": "root/Default/my_bucket/oncreate/TopicSubscription0", + "path": "root/Default/my_bucket/OnCreate/TopicSubscription0", }, }, "constructInfo": { @@ -1475,10 +1448,10 @@ exports[`bucket with onEvent method 2`] = ` "description": "A pub/sub notification topic", "title": "Topic", }, - "id": "oncreate", - "path": "root/Default/my_bucket/oncreate", + "id": "OnCreate", + "path": "root/Default/my_bucket/OnCreate", }, - "oncreate-OnMessage0": { + "OnCreate-OnMessage0": { "children": { "Asset": { "constructInfo": { @@ -1487,7 +1460,7 @@ exports[`bucket with onEvent method 2`] = ` }, "display": {}, "id": "Asset", - "path": "root/Default/my_bucket/oncreate-OnMessage0/Asset", + "path": "root/Default/my_bucket/OnCreate-OnMessage0/Asset", }, "CloudwatchLogGroup": { "constructInfo": { @@ -1496,7 +1469,7 @@ exports[`bucket with onEvent method 2`] = ` }, "display": {}, "id": "CloudwatchLogGroup", - "path": "root/Default/my_bucket/oncreate-OnMessage0/CloudwatchLogGroup", + "path": "root/Default/my_bucket/OnCreate-OnMessage0/CloudwatchLogGroup", }, "Default": { "constructInfo": { @@ -1505,7 +1478,7 @@ exports[`bucket with onEvent method 2`] = ` }, "display": {}, "id": "Default", - "path": "root/Default/my_bucket/oncreate-OnMessage0/Default", + "path": "root/Default/my_bucket/OnCreate-OnMessage0/Default", }, "IamRole": { "constructInfo": { @@ -1514,7 +1487,7 @@ exports[`bucket with onEvent method 2`] = ` }, "display": {}, "id": "IamRole", - "path": "root/Default/my_bucket/oncreate-OnMessage0/IamRole", + "path": "root/Default/my_bucket/OnCreate-OnMessage0/IamRole", }, "IamRolePolicy": { "constructInfo": { @@ -1523,7 +1496,7 @@ exports[`bucket with onEvent method 2`] = ` }, "display": {}, "id": "IamRolePolicy", - "path": "root/Default/my_bucket/oncreate-OnMessage0/IamRolePolicy", + "path": "root/Default/my_bucket/OnCreate-OnMessage0/IamRolePolicy", }, "IamRolePolicyAttachment": { "constructInfo": { @@ -1532,16 +1505,16 @@ exports[`bucket with onEvent method 2`] = ` }, "display": {}, "id": "IamRolePolicyAttachment", - "path": "root/Default/my_bucket/oncreate-OnMessage0/IamRolePolicyAttachment", + "path": "root/Default/my_bucket/OnCreate-OnMessage0/IamRolePolicyAttachment", }, - "InvokePermission-c8ad674c480f4e6c0a6bf1a492e393e9ccaed211a1": { + "InvokePermission-c88b8dd64481dc3b326d5e0afc3b583852a5c383f8": { "constructInfo": { "fqn": "cdktf.TerraformResource", "version": "0.20.3", }, "display": {}, - "id": "InvokePermission-c8ad674c480f4e6c0a6bf1a492e393e9ccaed211a1", - "path": "root/Default/my_bucket/oncreate-OnMessage0/InvokePermission-c8ad674c480f4e6c0a6bf1a492e393e9ccaed211a1", + "id": "InvokePermission-c88b8dd64481dc3b326d5e0afc3b583852a5c383f8", + "path": "root/Default/my_bucket/OnCreate-OnMessage0/InvokePermission-c88b8dd64481dc3b326d5e0afc3b583852a5c383f8", }, "S3Object": { "constructInfo": { @@ -1550,7 +1523,7 @@ exports[`bucket with onEvent method 2`] = ` }, "display": {}, "id": "S3Object", - "path": "root/Default/my_bucket/oncreate-OnMessage0/S3Object", + "path": "root/Default/my_bucket/OnCreate-OnMessage0/S3Object", }, }, "constructInfo": { @@ -1561,10 +1534,10 @@ exports[`bucket with onEvent method 2`] = ` "description": "A cloud function (FaaS)", "title": "Function", }, - "id": "oncreate-OnMessage0", - "path": "root/Default/my_bucket/oncreate-OnMessage0", + "id": "OnCreate-OnMessage0", + "path": "root/Default/my_bucket/OnCreate-OnMessage0", }, - "ondelete": { + "OnDelete": { "children": { "Default": { "constructInfo": { @@ -1573,7 +1546,7 @@ exports[`bucket with onEvent method 2`] = ` }, "display": {}, "id": "Default", - "path": "root/Default/my_bucket/ondelete/Default", + "path": "root/Default/my_bucket/OnDelete/Default", }, "PublishPermission-c8045fccc85a7ef42d5391d87958e5ce36c53a401a": { "constructInfo": { @@ -1582,7 +1555,7 @@ exports[`bucket with onEvent method 2`] = ` }, "display": {}, "id": "PublishPermission-c8045fccc85a7ef42d5391d87958e5ce36c53a401a", - "path": "root/Default/my_bucket/ondelete/PublishPermission-c8045fccc85a7ef42d5391d87958e5ce36c53a401a", + "path": "root/Default/my_bucket/OnDelete/PublishPermission-c8045fccc85a7ef42d5391d87958e5ce36c53a401a", }, "TopicSubscription0": { "constructInfo": { @@ -1591,7 +1564,7 @@ exports[`bucket with onEvent method 2`] = ` }, "display": {}, "id": "TopicSubscription0", - "path": "root/Default/my_bucket/ondelete/TopicSubscription0", + "path": "root/Default/my_bucket/OnDelete/TopicSubscription0", }, }, "constructInfo": { @@ -1602,10 +1575,10 @@ exports[`bucket with onEvent method 2`] = ` "description": "A pub/sub notification topic", "title": "Topic", }, - "id": "ondelete", - "path": "root/Default/my_bucket/ondelete", + "id": "OnDelete", + "path": "root/Default/my_bucket/OnDelete", }, - "ondelete-OnMessage0": { + "OnDelete-OnMessage0": { "children": { "Asset": { "constructInfo": { @@ -1614,7 +1587,7 @@ exports[`bucket with onEvent method 2`] = ` }, "display": {}, "id": "Asset", - "path": "root/Default/my_bucket/ondelete-OnMessage0/Asset", + "path": "root/Default/my_bucket/OnDelete-OnMessage0/Asset", }, "CloudwatchLogGroup": { "constructInfo": { @@ -1623,7 +1596,7 @@ exports[`bucket with onEvent method 2`] = ` }, "display": {}, "id": "CloudwatchLogGroup", - "path": "root/Default/my_bucket/ondelete-OnMessage0/CloudwatchLogGroup", + "path": "root/Default/my_bucket/OnDelete-OnMessage0/CloudwatchLogGroup", }, "Default": { "constructInfo": { @@ -1632,7 +1605,7 @@ exports[`bucket with onEvent method 2`] = ` }, "display": {}, "id": "Default", - "path": "root/Default/my_bucket/ondelete-OnMessage0/Default", + "path": "root/Default/my_bucket/OnDelete-OnMessage0/Default", }, "IamRole": { "constructInfo": { @@ -1641,7 +1614,7 @@ exports[`bucket with onEvent method 2`] = ` }, "display": {}, "id": "IamRole", - "path": "root/Default/my_bucket/ondelete-OnMessage0/IamRole", + "path": "root/Default/my_bucket/OnDelete-OnMessage0/IamRole", }, "IamRolePolicy": { "constructInfo": { @@ -1650,7 +1623,7 @@ exports[`bucket with onEvent method 2`] = ` }, "display": {}, "id": "IamRolePolicy", - "path": "root/Default/my_bucket/ondelete-OnMessage0/IamRolePolicy", + "path": "root/Default/my_bucket/OnDelete-OnMessage0/IamRolePolicy", }, "IamRolePolicyAttachment": { "constructInfo": { @@ -1659,16 +1632,16 @@ exports[`bucket with onEvent method 2`] = ` }, "display": {}, "id": "IamRolePolicyAttachment", - "path": "root/Default/my_bucket/ondelete-OnMessage0/IamRolePolicyAttachment", + "path": "root/Default/my_bucket/OnDelete-OnMessage0/IamRolePolicyAttachment", }, - "InvokePermission-c8142b51acc0b500d0402de71ecbd0ecf4977ec315": { + "InvokePermission-c818f13827fc0721db2eca69eab078997f6f9a8c7a": { "constructInfo": { "fqn": "cdktf.TerraformResource", "version": "0.20.3", }, "display": {}, - "id": "InvokePermission-c8142b51acc0b500d0402de71ecbd0ecf4977ec315", - "path": "root/Default/my_bucket/ondelete-OnMessage0/InvokePermission-c8142b51acc0b500d0402de71ecbd0ecf4977ec315", + "id": "InvokePermission-c818f13827fc0721db2eca69eab078997f6f9a8c7a", + "path": "root/Default/my_bucket/OnDelete-OnMessage0/InvokePermission-c818f13827fc0721db2eca69eab078997f6f9a8c7a", }, "S3Object": { "constructInfo": { @@ -1677,7 +1650,7 @@ exports[`bucket with onEvent method 2`] = ` }, "display": {}, "id": "S3Object", - "path": "root/Default/my_bucket/ondelete-OnMessage0/S3Object", + "path": "root/Default/my_bucket/OnDelete-OnMessage0/S3Object", }, }, "constructInfo": { @@ -1688,10 +1661,10 @@ exports[`bucket with onEvent method 2`] = ` "description": "A cloud function (FaaS)", "title": "Function", }, - "id": "ondelete-OnMessage0", - "path": "root/Default/my_bucket/ondelete-OnMessage0", + "id": "OnDelete-OnMessage0", + "path": "root/Default/my_bucket/OnDelete-OnMessage0", }, - "onupdate": { + "OnUpdate": { "children": { "Default": { "constructInfo": { @@ -1700,7 +1673,7 @@ exports[`bucket with onEvent method 2`] = ` }, "display": {}, "id": "Default", - "path": "root/Default/my_bucket/onupdate/Default", + "path": "root/Default/my_bucket/OnUpdate/Default", }, "PublishPermission-c8045fccc85a7ef42d5391d87958e5ce36c53a401a": { "constructInfo": { @@ -1709,7 +1682,7 @@ exports[`bucket with onEvent method 2`] = ` }, "display": {}, "id": "PublishPermission-c8045fccc85a7ef42d5391d87958e5ce36c53a401a", - "path": "root/Default/my_bucket/onupdate/PublishPermission-c8045fccc85a7ef42d5391d87958e5ce36c53a401a", + "path": "root/Default/my_bucket/OnUpdate/PublishPermission-c8045fccc85a7ef42d5391d87958e5ce36c53a401a", }, "TopicSubscription0": { "constructInfo": { @@ -1718,7 +1691,7 @@ exports[`bucket with onEvent method 2`] = ` }, "display": {}, "id": "TopicSubscription0", - "path": "root/Default/my_bucket/onupdate/TopicSubscription0", + "path": "root/Default/my_bucket/OnUpdate/TopicSubscription0", }, }, "constructInfo": { @@ -1729,10 +1702,10 @@ exports[`bucket with onEvent method 2`] = ` "description": "A pub/sub notification topic", "title": "Topic", }, - "id": "onupdate", - "path": "root/Default/my_bucket/onupdate", + "id": "OnUpdate", + "path": "root/Default/my_bucket/OnUpdate", }, - "onupdate-OnMessage0": { + "OnUpdate-OnMessage0": { "children": { "Asset": { "constructInfo": { @@ -1741,7 +1714,7 @@ exports[`bucket with onEvent method 2`] = ` }, "display": {}, "id": "Asset", - "path": "root/Default/my_bucket/onupdate-OnMessage0/Asset", + "path": "root/Default/my_bucket/OnUpdate-OnMessage0/Asset", }, "CloudwatchLogGroup": { "constructInfo": { @@ -1750,7 +1723,7 @@ exports[`bucket with onEvent method 2`] = ` }, "display": {}, "id": "CloudwatchLogGroup", - "path": "root/Default/my_bucket/onupdate-OnMessage0/CloudwatchLogGroup", + "path": "root/Default/my_bucket/OnUpdate-OnMessage0/CloudwatchLogGroup", }, "Default": { "constructInfo": { @@ -1759,7 +1732,7 @@ exports[`bucket with onEvent method 2`] = ` }, "display": {}, "id": "Default", - "path": "root/Default/my_bucket/onupdate-OnMessage0/Default", + "path": "root/Default/my_bucket/OnUpdate-OnMessage0/Default", }, "IamRole": { "constructInfo": { @@ -1768,7 +1741,7 @@ exports[`bucket with onEvent method 2`] = ` }, "display": {}, "id": "IamRole", - "path": "root/Default/my_bucket/onupdate-OnMessage0/IamRole", + "path": "root/Default/my_bucket/OnUpdate-OnMessage0/IamRole", }, "IamRolePolicy": { "constructInfo": { @@ -1777,7 +1750,7 @@ exports[`bucket with onEvent method 2`] = ` }, "display": {}, "id": "IamRolePolicy", - "path": "root/Default/my_bucket/onupdate-OnMessage0/IamRolePolicy", + "path": "root/Default/my_bucket/OnUpdate-OnMessage0/IamRolePolicy", }, "IamRolePolicyAttachment": { "constructInfo": { @@ -1786,16 +1759,16 @@ exports[`bucket with onEvent method 2`] = ` }, "display": {}, "id": "IamRolePolicyAttachment", - "path": "root/Default/my_bucket/onupdate-OnMessage0/IamRolePolicyAttachment", + "path": "root/Default/my_bucket/OnUpdate-OnMessage0/IamRolePolicyAttachment", }, - "InvokePermission-c810a1e91f70a36a50557a2c23bc28c96365a22f22": { + "InvokePermission-c84ec84688efaa3bd78e7099e53e40fb2fe4ca5229": { "constructInfo": { "fqn": "cdktf.TerraformResource", "version": "0.20.3", }, "display": {}, - "id": "InvokePermission-c810a1e91f70a36a50557a2c23bc28c96365a22f22", - "path": "root/Default/my_bucket/onupdate-OnMessage0/InvokePermission-c810a1e91f70a36a50557a2c23bc28c96365a22f22", + "id": "InvokePermission-c84ec84688efaa3bd78e7099e53e40fb2fe4ca5229", + "path": "root/Default/my_bucket/OnUpdate-OnMessage0/InvokePermission-c84ec84688efaa3bd78e7099e53e40fb2fe4ca5229", }, "S3Object": { "constructInfo": { @@ -1804,7 +1777,7 @@ exports[`bucket with onEvent method 2`] = ` }, "display": {}, "id": "S3Object", - "path": "root/Default/my_bucket/onupdate-OnMessage0/S3Object", + "path": "root/Default/my_bucket/OnUpdate-OnMessage0/S3Object", }, }, "constructInfo": { @@ -1815,8 +1788,35 @@ exports[`bucket with onEvent method 2`] = ` "description": "A cloud function (FaaS)", "title": "Function", }, - "id": "onupdate-OnMessage0", - "path": "root/Default/my_bucket/onupdate-OnMessage0", + "id": "OnUpdate-OnMessage0", + "path": "root/Default/my_bucket/OnUpdate-OnMessage0", + }, + "PublicAccessBlock": { + "constructInfo": { + "fqn": "cdktf.TerraformResource", + "version": "0.20.3", + }, + "display": {}, + "id": "PublicAccessBlock", + "path": "root/Default/my_bucket/PublicAccessBlock", + }, + "PublicPolicy": { + "constructInfo": { + "fqn": "cdktf.TerraformResource", + "version": "0.20.3", + }, + "display": {}, + "id": "PublicPolicy", + "path": "root/Default/my_bucket/PublicPolicy", + }, + "S3BucketNotification": { + "constructInfo": { + "fqn": "cdktf.TerraformResource", + "version": "0.20.3", + }, + "display": {}, + "id": "S3BucketNotification", + "path": "root/Default/my_bucket/S3BucketNotification", }, }, "constructInfo": { @@ -1874,47 +1874,47 @@ exports[`bucket with onUpdate method 1`] = ` { "resource": { "aws_cloudwatch_log_group": { - "my_bucket_onupdate-OnMessage0_CloudwatchLogGroup_25463B70": { - "name": "/aws/lambda/onupdate-OnMessage0-c8a1be62", + "my_bucket_OnUpdate-OnMessage0_CloudwatchLogGroup_CA36F40B": { + "name": "/aws/lambda/OnUpdate-OnMessage0-c81076cf", "retention_in_days": 30, }, }, "aws_iam_role": { - "my_bucket_onupdate-OnMessage0_IamRole_9C1FBCBE": { + "my_bucket_OnUpdate-OnMessage0_IamRole_846F92CF": { "assume_role_policy": "{"Version":"2012-10-17","Statement":[{"Action":"sts:AssumeRole","Principal":{"Service":"lambda.amazonaws.com"},"Effect":"Allow"}]}", }, }, "aws_iam_role_policy": { - "my_bucket_onupdate-OnMessage0_IamRolePolicy_27D30DCE": { + "my_bucket_OnUpdate-OnMessage0_IamRolePolicy_94D2868B": { "policy": "{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Action":"none:null","Resource":"*"}]}", - "role": "\${aws_iam_role.my_bucket_onupdate-OnMessage0_IamRole_9C1FBCBE.name}", + "role": "\${aws_iam_role.my_bucket_OnUpdate-OnMessage0_IamRole_846F92CF.name}", }, }, "aws_iam_role_policy_attachment": { - "my_bucket_onupdate-OnMessage0_IamRolePolicyAttachment_E4288C48": { + "my_bucket_OnUpdate-OnMessage0_IamRolePolicyAttachment_5073159D": { "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "\${aws_iam_role.my_bucket_onupdate-OnMessage0_IamRole_9C1FBCBE.name}", + "role": "\${aws_iam_role.my_bucket_OnUpdate-OnMessage0_IamRole_846F92CF.name}", }, }, "aws_lambda_function": { - "my_bucket_onupdate-OnMessage0_EB805895": { + "my_bucket_OnUpdate-OnMessage0_B4C11A28": { "architectures": [ "arm64", ], "environment": { "variables": { "NODE_OPTIONS": "--enable-source-maps", - "WING_FUNCTION_NAME": "onupdate-OnMessage0-c8a1be62", + "WING_FUNCTION_NAME": "OnUpdate-OnMessage0-c81076cf", }, }, - "function_name": "onupdate-OnMessage0-c8a1be62", + "function_name": "OnUpdate-OnMessage0-c81076cf", "handler": "index.handler", "memory_size": 1024, "publish": true, - "role": "\${aws_iam_role.my_bucket_onupdate-OnMessage0_IamRole_9C1FBCBE.arn}", + "role": "\${aws_iam_role.my_bucket_OnUpdate-OnMessage0_IamRole_846F92CF.arn}", "runtime": "nodejs20.x", "s3_bucket": "\${aws_s3_bucket.Code.bucket}", - "s3_key": "\${aws_s3_object.my_bucket_onupdate-OnMessage0_S3Object_CD6EE6AF.key}", + "s3_key": "\${aws_s3_object.my_bucket_OnUpdate-OnMessage0_S3Object_1E352BCE.key}", "timeout": 60, "vpc_config": { "security_group_ids": [], @@ -1923,11 +1923,11 @@ exports[`bucket with onUpdate method 1`] = ` }, }, "aws_lambda_permission": { - "my_bucket_onupdate-OnMessage0_InvokePermission-c810a1e91f70a36a50557a2c23bc28c96365a22f22_7EE27EAF": { + "my_bucket_OnUpdate-OnMessage0_InvokePermission-c84ec84688efaa3bd78e7099e53e40fb2fe4ca5229_327F1182": { "action": "lambda:InvokeFunction", - "function_name": "\${aws_lambda_function.my_bucket_onupdate-OnMessage0_EB805895.function_name}", + "function_name": "\${aws_lambda_function.my_bucket_OnUpdate-OnMessage0_B4C11A28.function_name}", "principal": "sns.amazonaws.com", - "source_arn": "\${aws_sns_topic.my_bucket_onupdate_DF9292B4.arn}", + "source_arn": "\${aws_sns_topic.my_bucket_OnUpdate_0AC450AE.arn}", }, }, "aws_s3_bucket": { @@ -1943,7 +1943,7 @@ exports[`bucket with onUpdate method 1`] = ` "my_bucket_S3BucketNotification_DDA29E8F": { "bucket": "\${aws_s3_bucket.my_bucket.id}", "depends_on": [ - "aws_sns_topic_policy.my_bucket_onupdate_PublishPermission-c8045fccc85a7ef42d5391d87958e5ce36c53a401a_C89A58B9", + "aws_sns_topic_policy.my_bucket_OnUpdate_PublishPermission-c8045fccc85a7ef42d5391d87958e5ce36c53a401a_A302B66A", ], "topic": [ { @@ -1951,7 +1951,7 @@ exports[`bucket with onUpdate method 1`] = ` "s3:ObjectCreated:Post", ], "id": "on-onupdate-notification", - "topic_arn": "\${aws_sns_topic.my_bucket_onupdate_DF9292B4.arn}", + "topic_arn": "\${aws_sns_topic.my_bucket_OnUpdate_0AC450AE.arn}", }, ], }, @@ -1975,28 +1975,28 @@ exports[`bucket with onUpdate method 1`] = ` }, }, "aws_s3_object": { - "my_bucket_onupdate-OnMessage0_S3Object_CD6EE6AF": { + "my_bucket_OnUpdate-OnMessage0_S3Object_1E352BCE": { "bucket": "\${aws_s3_bucket.Code.bucket}", "key": "", "source": "", }, }, "aws_sns_topic": { - "my_bucket_onupdate_DF9292B4": { - "name": "onupdate-c810a1e9", + "my_bucket_OnUpdate_0AC450AE": { + "name": "OnUpdate-c84ec846", }, }, "aws_sns_topic_policy": { - "my_bucket_onupdate_PublishPermission-c8045fccc85a7ef42d5391d87958e5ce36c53a401a_C89A58B9": { - "arn": "\${aws_sns_topic.my_bucket_onupdate_DF9292B4.arn}", - "policy": "{"Statement":[{"Effect":"Allow","Principal":{"Service":"s3.amazonaws.com"},"Action":"sns:Publish","Resource":"\${aws_sns_topic.my_bucket_onupdate_DF9292B4.arn}","Condition":{"ArnEquals":{"aws:SourceArn":"\${aws_s3_bucket.my_bucket.arn}"}}}]}", + "my_bucket_OnUpdate_PublishPermission-c8045fccc85a7ef42d5391d87958e5ce36c53a401a_A302B66A": { + "arn": "\${aws_sns_topic.my_bucket_OnUpdate_0AC450AE.arn}", + "policy": "{"Statement":[{"Effect":"Allow","Principal":{"Service":"s3.amazonaws.com"},"Action":"sns:Publish","Resource":"\${aws_sns_topic.my_bucket_OnUpdate_0AC450AE.arn}","Condition":{"ArnEquals":{"aws:SourceArn":"\${aws_s3_bucket.my_bucket.arn}"}}}]}", }, }, "aws_sns_topic_subscription": { - "my_bucket_onupdate_TopicSubscription0_0BEAE6F8": { - "endpoint": "\${aws_lambda_function.my_bucket_onupdate-OnMessage0_EB805895.arn}", + "my_bucket_OnUpdate_TopicSubscription0_56144B6F": { + "endpoint": "\${aws_lambda_function.my_bucket_OnUpdate-OnMessage0_B4C11A28.arn}", "protocol": "lambda", - "topic_arn": "\${aws_sns_topic.my_bucket_onupdate_DF9292B4.arn}", + "topic_arn": "\${aws_sns_topic.my_bucket_OnUpdate_0AC450AE.arn}", }, }, }, @@ -2051,34 +2051,7 @@ exports[`bucket with onUpdate method 2`] = ` "id": "Default", "path": "root/Default/my_bucket/Default", }, - "PublicAccessBlock": { - "constructInfo": { - "fqn": "cdktf.TerraformResource", - "version": "0.20.3", - }, - "display": {}, - "id": "PublicAccessBlock", - "path": "root/Default/my_bucket/PublicAccessBlock", - }, - "PublicPolicy": { - "constructInfo": { - "fqn": "cdktf.TerraformResource", - "version": "0.20.3", - }, - "display": {}, - "id": "PublicPolicy", - "path": "root/Default/my_bucket/PublicPolicy", - }, - "S3BucketNotification": { - "constructInfo": { - "fqn": "cdktf.TerraformResource", - "version": "0.20.3", - }, - "display": {}, - "id": "S3BucketNotification", - "path": "root/Default/my_bucket/S3BucketNotification", - }, - "onupdate": { + "OnUpdate": { "children": { "Default": { "constructInfo": { @@ -2087,7 +2060,7 @@ exports[`bucket with onUpdate method 2`] = ` }, "display": {}, "id": "Default", - "path": "root/Default/my_bucket/onupdate/Default", + "path": "root/Default/my_bucket/OnUpdate/Default", }, "PublishPermission-c8045fccc85a7ef42d5391d87958e5ce36c53a401a": { "constructInfo": { @@ -2096,7 +2069,7 @@ exports[`bucket with onUpdate method 2`] = ` }, "display": {}, "id": "PublishPermission-c8045fccc85a7ef42d5391d87958e5ce36c53a401a", - "path": "root/Default/my_bucket/onupdate/PublishPermission-c8045fccc85a7ef42d5391d87958e5ce36c53a401a", + "path": "root/Default/my_bucket/OnUpdate/PublishPermission-c8045fccc85a7ef42d5391d87958e5ce36c53a401a", }, "TopicSubscription0": { "constructInfo": { @@ -2105,7 +2078,7 @@ exports[`bucket with onUpdate method 2`] = ` }, "display": {}, "id": "TopicSubscription0", - "path": "root/Default/my_bucket/onupdate/TopicSubscription0", + "path": "root/Default/my_bucket/OnUpdate/TopicSubscription0", }, }, "constructInfo": { @@ -2116,10 +2089,10 @@ exports[`bucket with onUpdate method 2`] = ` "description": "A pub/sub notification topic", "title": "Topic", }, - "id": "onupdate", - "path": "root/Default/my_bucket/onupdate", + "id": "OnUpdate", + "path": "root/Default/my_bucket/OnUpdate", }, - "onupdate-OnMessage0": { + "OnUpdate-OnMessage0": { "children": { "Asset": { "constructInfo": { @@ -2128,7 +2101,7 @@ exports[`bucket with onUpdate method 2`] = ` }, "display": {}, "id": "Asset", - "path": "root/Default/my_bucket/onupdate-OnMessage0/Asset", + "path": "root/Default/my_bucket/OnUpdate-OnMessage0/Asset", }, "CloudwatchLogGroup": { "constructInfo": { @@ -2137,7 +2110,7 @@ exports[`bucket with onUpdate method 2`] = ` }, "display": {}, "id": "CloudwatchLogGroup", - "path": "root/Default/my_bucket/onupdate-OnMessage0/CloudwatchLogGroup", + "path": "root/Default/my_bucket/OnUpdate-OnMessage0/CloudwatchLogGroup", }, "Default": { "constructInfo": { @@ -2146,7 +2119,7 @@ exports[`bucket with onUpdate method 2`] = ` }, "display": {}, "id": "Default", - "path": "root/Default/my_bucket/onupdate-OnMessage0/Default", + "path": "root/Default/my_bucket/OnUpdate-OnMessage0/Default", }, "IamRole": { "constructInfo": { @@ -2155,7 +2128,7 @@ exports[`bucket with onUpdate method 2`] = ` }, "display": {}, "id": "IamRole", - "path": "root/Default/my_bucket/onupdate-OnMessage0/IamRole", + "path": "root/Default/my_bucket/OnUpdate-OnMessage0/IamRole", }, "IamRolePolicy": { "constructInfo": { @@ -2164,7 +2137,7 @@ exports[`bucket with onUpdate method 2`] = ` }, "display": {}, "id": "IamRolePolicy", - "path": "root/Default/my_bucket/onupdate-OnMessage0/IamRolePolicy", + "path": "root/Default/my_bucket/OnUpdate-OnMessage0/IamRolePolicy", }, "IamRolePolicyAttachment": { "constructInfo": { @@ -2173,16 +2146,16 @@ exports[`bucket with onUpdate method 2`] = ` }, "display": {}, "id": "IamRolePolicyAttachment", - "path": "root/Default/my_bucket/onupdate-OnMessage0/IamRolePolicyAttachment", + "path": "root/Default/my_bucket/OnUpdate-OnMessage0/IamRolePolicyAttachment", }, - "InvokePermission-c810a1e91f70a36a50557a2c23bc28c96365a22f22": { + "InvokePermission-c84ec84688efaa3bd78e7099e53e40fb2fe4ca5229": { "constructInfo": { "fqn": "cdktf.TerraformResource", "version": "0.20.3", }, "display": {}, - "id": "InvokePermission-c810a1e91f70a36a50557a2c23bc28c96365a22f22", - "path": "root/Default/my_bucket/onupdate-OnMessage0/InvokePermission-c810a1e91f70a36a50557a2c23bc28c96365a22f22", + "id": "InvokePermission-c84ec84688efaa3bd78e7099e53e40fb2fe4ca5229", + "path": "root/Default/my_bucket/OnUpdate-OnMessage0/InvokePermission-c84ec84688efaa3bd78e7099e53e40fb2fe4ca5229", }, "S3Object": { "constructInfo": { @@ -2191,7 +2164,7 @@ exports[`bucket with onUpdate method 2`] = ` }, "display": {}, "id": "S3Object", - "path": "root/Default/my_bucket/onupdate-OnMessage0/S3Object", + "path": "root/Default/my_bucket/OnUpdate-OnMessage0/S3Object", }, }, "constructInfo": { @@ -2202,8 +2175,35 @@ exports[`bucket with onUpdate method 2`] = ` "description": "A cloud function (FaaS)", "title": "Function", }, - "id": "onupdate-OnMessage0", - "path": "root/Default/my_bucket/onupdate-OnMessage0", + "id": "OnUpdate-OnMessage0", + "path": "root/Default/my_bucket/OnUpdate-OnMessage0", + }, + "PublicAccessBlock": { + "constructInfo": { + "fqn": "cdktf.TerraformResource", + "version": "0.20.3", + }, + "display": {}, + "id": "PublicAccessBlock", + "path": "root/Default/my_bucket/PublicAccessBlock", + }, + "PublicPolicy": { + "constructInfo": { + "fqn": "cdktf.TerraformResource", + "version": "0.20.3", + }, + "display": {}, + "id": "PublicPolicy", + "path": "root/Default/my_bucket/PublicPolicy", + }, + "S3BucketNotification": { + "constructInfo": { + "fqn": "cdktf.TerraformResource", + "version": "0.20.3", + }, + "display": {}, + "id": "S3BucketNotification", + "path": "root/Default/my_bucket/S3BucketNotification", }, }, "constructInfo": { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/events.test.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/events.test.w_compile_tf-aws.md index 5aab097ce26..fd0815e36ad 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/events.test.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/events.test.w_compile_tf-aws.md @@ -18,64 +18,64 @@ }, "resource": { "aws_cloudwatch_log_group": { - "Bucket_oncreate-OnMessage0_CloudwatchLogGroup_9ADBAD73": { + "Bucket_OnCreate-OnMessage0_CloudwatchLogGroup_6BF9DEA3": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/oncreate-OnMessage0/CloudwatchLogGroup", - "uniqueId": "Bucket_oncreate-OnMessage0_CloudwatchLogGroup_9ADBAD73" + "path": "root/Default/Default/Bucket/OnCreate-OnMessage0/CloudwatchLogGroup", + "uniqueId": "Bucket_OnCreate-OnMessage0_CloudwatchLogGroup_6BF9DEA3" } }, - "name": "/aws/lambda/oncreate-OnMessage0-c87abc21", + "name": "/aws/lambda/OnCreate-OnMessage0-c8740b4b", "retention_in_days": 30 }, - "Bucket_oncreate-OnMessage1_CloudwatchLogGroup_37B9C8C4": { + "Bucket_OnCreate-OnMessage1_CloudwatchLogGroup_A09583DA": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/oncreate-OnMessage1/CloudwatchLogGroup", - "uniqueId": "Bucket_oncreate-OnMessage1_CloudwatchLogGroup_37B9C8C4" + "path": "root/Default/Default/Bucket/OnCreate-OnMessage1/CloudwatchLogGroup", + "uniqueId": "Bucket_OnCreate-OnMessage1_CloudwatchLogGroup_A09583DA" } }, - "name": "/aws/lambda/oncreate-OnMessage1-c800fec8", + "name": "/aws/lambda/OnCreate-OnMessage1-c8347a52", "retention_in_days": 30 }, - "Bucket_ondelete-OnMessage0_CloudwatchLogGroup_5F88C98D": { + "Bucket_OnDelete-OnMessage0_CloudwatchLogGroup_682144EA": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/ondelete-OnMessage0/CloudwatchLogGroup", - "uniqueId": "Bucket_ondelete-OnMessage0_CloudwatchLogGroup_5F88C98D" + "path": "root/Default/Default/Bucket/OnDelete-OnMessage0/CloudwatchLogGroup", + "uniqueId": "Bucket_OnDelete-OnMessage0_CloudwatchLogGroup_682144EA" } }, - "name": "/aws/lambda/ondelete-OnMessage0-c8a38b5a", + "name": "/aws/lambda/OnDelete-OnMessage0-c8e711ef", "retention_in_days": 30 }, - "Bucket_ondelete-OnMessage1_CloudwatchLogGroup_AE7AA81E": { + "Bucket_OnDelete-OnMessage1_CloudwatchLogGroup_ADB44727": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/ondelete-OnMessage1/CloudwatchLogGroup", - "uniqueId": "Bucket_ondelete-OnMessage1_CloudwatchLogGroup_AE7AA81E" + "path": "root/Default/Default/Bucket/OnDelete-OnMessage1/CloudwatchLogGroup", + "uniqueId": "Bucket_OnDelete-OnMessage1_CloudwatchLogGroup_ADB44727" } }, - "name": "/aws/lambda/ondelete-OnMessage1-c82792b8", + "name": "/aws/lambda/OnDelete-OnMessage1-c8905f5b", "retention_in_days": 30 }, - "Bucket_onupdate-OnMessage0_CloudwatchLogGroup_C8045188": { + "Bucket_OnUpdate-OnMessage0_CloudwatchLogGroup_9492CFAF": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/onupdate-OnMessage0/CloudwatchLogGroup", - "uniqueId": "Bucket_onupdate-OnMessage0_CloudwatchLogGroup_C8045188" + "path": "root/Default/Default/Bucket/OnUpdate-OnMessage0/CloudwatchLogGroup", + "uniqueId": "Bucket_OnUpdate-OnMessage0_CloudwatchLogGroup_9492CFAF" } }, - "name": "/aws/lambda/onupdate-OnMessage0-c835180c", + "name": "/aws/lambda/OnUpdate-OnMessage0-c81b9fec", "retention_in_days": 30 }, - "Bucket_onupdate-OnMessage1_CloudwatchLogGroup_D6757AF5": { + "Bucket_OnUpdate-OnMessage1_CloudwatchLogGroup_FA500C0F": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/onupdate-OnMessage1/CloudwatchLogGroup", - "uniqueId": "Bucket_onupdate-OnMessage1_CloudwatchLogGroup_D6757AF5" + "path": "root/Default/Default/Bucket/OnUpdate-OnMessage1/CloudwatchLogGroup", + "uniqueId": "Bucket_OnUpdate-OnMessage1_CloudwatchLogGroup_FA500C0F" } }, - "name": "/aws/lambda/onupdate-OnMessage1-c8826493", + "name": "/aws/lambda/OnUpdate-OnMessage1-c8513427", "retention_in_days": 30 } }, @@ -119,191 +119,191 @@ } }, "aws_iam_role": { - "Bucket_oncreate-OnMessage0_IamRole_0DECFA72": { + "Bucket_OnCreate-OnMessage0_IamRole_D3BF2935": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/oncreate-OnMessage0/IamRole", - "uniqueId": "Bucket_oncreate-OnMessage0_IamRole_0DECFA72" + "path": "root/Default/Default/Bucket/OnCreate-OnMessage0/IamRole", + "uniqueId": "Bucket_OnCreate-OnMessage0_IamRole_D3BF2935" } }, "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" }, - "Bucket_oncreate-OnMessage1_IamRole_EAFD952E": { + "Bucket_OnCreate-OnMessage1_IamRole_0E855131": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/oncreate-OnMessage1/IamRole", - "uniqueId": "Bucket_oncreate-OnMessage1_IamRole_EAFD952E" + "path": "root/Default/Default/Bucket/OnCreate-OnMessage1/IamRole", + "uniqueId": "Bucket_OnCreate-OnMessage1_IamRole_0E855131" } }, "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" }, - "Bucket_ondelete-OnMessage0_IamRole_50F5B4CA": { + "Bucket_OnDelete-OnMessage0_IamRole_A52E721B": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/ondelete-OnMessage0/IamRole", - "uniqueId": "Bucket_ondelete-OnMessage0_IamRole_50F5B4CA" + "path": "root/Default/Default/Bucket/OnDelete-OnMessage0/IamRole", + "uniqueId": "Bucket_OnDelete-OnMessage0_IamRole_A52E721B" } }, "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" }, - "Bucket_ondelete-OnMessage1_IamRole_BE60A7EC": { + "Bucket_OnDelete-OnMessage1_IamRole_AA3A5721": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/ondelete-OnMessage1/IamRole", - "uniqueId": "Bucket_ondelete-OnMessage1_IamRole_BE60A7EC" + "path": "root/Default/Default/Bucket/OnDelete-OnMessage1/IamRole", + "uniqueId": "Bucket_OnDelete-OnMessage1_IamRole_AA3A5721" } }, "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" }, - "Bucket_onupdate-OnMessage0_IamRole_B95F0C0C": { + "Bucket_OnUpdate-OnMessage0_IamRole_96499EB9": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/onupdate-OnMessage0/IamRole", - "uniqueId": "Bucket_onupdate-OnMessage0_IamRole_B95F0C0C" + "path": "root/Default/Default/Bucket/OnUpdate-OnMessage0/IamRole", + "uniqueId": "Bucket_OnUpdate-OnMessage0_IamRole_96499EB9" } }, "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" }, - "Bucket_onupdate-OnMessage1_IamRole_93BC24D8": { + "Bucket_OnUpdate-OnMessage1_IamRole_7B19D23F": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/onupdate-OnMessage1/IamRole", - "uniqueId": "Bucket_onupdate-OnMessage1_IamRole_93BC24D8" + "path": "root/Default/Default/Bucket/OnUpdate-OnMessage1/IamRole", + "uniqueId": "Bucket_OnUpdate-OnMessage1_IamRole_7B19D23F" } }, "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" } }, "aws_iam_role_policy": { - "Bucket_oncreate-OnMessage0_IamRolePolicy_ED4BBB06": { + "Bucket_OnCreate-OnMessage0_IamRolePolicy_9749552C": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/oncreate-OnMessage0/IamRolePolicy", - "uniqueId": "Bucket_oncreate-OnMessage0_IamRolePolicy_ED4BBB06" + "path": "root/Default/Default/Bucket/OnCreate-OnMessage0/IamRolePolicy", + "uniqueId": "Bucket_OnCreate-OnMessage0_IamRolePolicy_9749552C" } }, "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"dynamodb:UpdateItem\"],\"Resource\":[\"${aws_dynamodb_table.Counter.arn}\"],\"Effect\":\"Allow\"},{\"Action\":[\"dynamodb:PutItem\"],\"Resource\":[\"${aws_dynamodb_table.Table.arn}\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.Bucket_oncreate-OnMessage0_IamRole_0DECFA72.name}" + "role": "${aws_iam_role.Bucket_OnCreate-OnMessage0_IamRole_D3BF2935.name}" }, - "Bucket_oncreate-OnMessage1_IamRolePolicy_555608BE": { + "Bucket_OnCreate-OnMessage1_IamRolePolicy_975FD372": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/oncreate-OnMessage1/IamRolePolicy", - "uniqueId": "Bucket_oncreate-OnMessage1_IamRolePolicy_555608BE" + "path": "root/Default/Default/Bucket/OnCreate-OnMessage1/IamRolePolicy", + "uniqueId": "Bucket_OnCreate-OnMessage1_IamRolePolicy_975FD372" } }, "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"dynamodb:UpdateItem\"],\"Resource\":[\"${aws_dynamodb_table.Counter.arn}\"],\"Effect\":\"Allow\"},{\"Action\":[\"dynamodb:PutItem\"],\"Resource\":[\"${aws_dynamodb_table.Table.arn}\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.Bucket_oncreate-OnMessage1_IamRole_EAFD952E.name}" + "role": "${aws_iam_role.Bucket_OnCreate-OnMessage1_IamRole_0E855131.name}" }, - "Bucket_ondelete-OnMessage0_IamRolePolicy_EE79076B": { + "Bucket_OnDelete-OnMessage0_IamRolePolicy_A027DCBC": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/ondelete-OnMessage0/IamRolePolicy", - "uniqueId": "Bucket_ondelete-OnMessage0_IamRolePolicy_EE79076B" + "path": "root/Default/Default/Bucket/OnDelete-OnMessage0/IamRolePolicy", + "uniqueId": "Bucket_OnDelete-OnMessage0_IamRolePolicy_A027DCBC" } }, "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"dynamodb:UpdateItem\"],\"Resource\":[\"${aws_dynamodb_table.Counter.arn}\"],\"Effect\":\"Allow\"},{\"Action\":[\"dynamodb:PutItem\"],\"Resource\":[\"${aws_dynamodb_table.Table.arn}\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.Bucket_ondelete-OnMessage0_IamRole_50F5B4CA.name}" + "role": "${aws_iam_role.Bucket_OnDelete-OnMessage0_IamRole_A52E721B.name}" }, - "Bucket_ondelete-OnMessage1_IamRolePolicy_517C3979": { + "Bucket_OnDelete-OnMessage1_IamRolePolicy_07F086F7": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/ondelete-OnMessage1/IamRolePolicy", - "uniqueId": "Bucket_ondelete-OnMessage1_IamRolePolicy_517C3979" + "path": "root/Default/Default/Bucket/OnDelete-OnMessage1/IamRolePolicy", + "uniqueId": "Bucket_OnDelete-OnMessage1_IamRolePolicy_07F086F7" } }, "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"dynamodb:UpdateItem\"],\"Resource\":[\"${aws_dynamodb_table.Counter.arn}\"],\"Effect\":\"Allow\"},{\"Action\":[\"dynamodb:PutItem\"],\"Resource\":[\"${aws_dynamodb_table.Table.arn}\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.Bucket_ondelete-OnMessage1_IamRole_BE60A7EC.name}" + "role": "${aws_iam_role.Bucket_OnDelete-OnMessage1_IamRole_AA3A5721.name}" }, - "Bucket_onupdate-OnMessage0_IamRolePolicy_95CC8F41": { + "Bucket_OnUpdate-OnMessage0_IamRolePolicy_DAF73AB9": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/onupdate-OnMessage0/IamRolePolicy", - "uniqueId": "Bucket_onupdate-OnMessage0_IamRolePolicy_95CC8F41" + "path": "root/Default/Default/Bucket/OnUpdate-OnMessage0/IamRolePolicy", + "uniqueId": "Bucket_OnUpdate-OnMessage0_IamRolePolicy_DAF73AB9" } }, "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"dynamodb:UpdateItem\"],\"Resource\":[\"${aws_dynamodb_table.Counter.arn}\"],\"Effect\":\"Allow\"},{\"Action\":[\"dynamodb:PutItem\"],\"Resource\":[\"${aws_dynamodb_table.Table.arn}\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.Bucket_onupdate-OnMessage0_IamRole_B95F0C0C.name}" + "role": "${aws_iam_role.Bucket_OnUpdate-OnMessage0_IamRole_96499EB9.name}" }, - "Bucket_onupdate-OnMessage1_IamRolePolicy_9C89E111": { + "Bucket_OnUpdate-OnMessage1_IamRolePolicy_E38714A4": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/onupdate-OnMessage1/IamRolePolicy", - "uniqueId": "Bucket_onupdate-OnMessage1_IamRolePolicy_9C89E111" + "path": "root/Default/Default/Bucket/OnUpdate-OnMessage1/IamRolePolicy", + "uniqueId": "Bucket_OnUpdate-OnMessage1_IamRolePolicy_E38714A4" } }, "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"dynamodb:UpdateItem\"],\"Resource\":[\"${aws_dynamodb_table.Counter.arn}\"],\"Effect\":\"Allow\"},{\"Action\":[\"dynamodb:PutItem\"],\"Resource\":[\"${aws_dynamodb_table.Table.arn}\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.Bucket_onupdate-OnMessage1_IamRole_93BC24D8.name}" + "role": "${aws_iam_role.Bucket_OnUpdate-OnMessage1_IamRole_7B19D23F.name}" } }, "aws_iam_role_policy_attachment": { - "Bucket_oncreate-OnMessage0_IamRolePolicyAttachment_1AE31BFB": { + "Bucket_OnCreate-OnMessage0_IamRolePolicyAttachment_B9851CC6": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/oncreate-OnMessage0/IamRolePolicyAttachment", - "uniqueId": "Bucket_oncreate-OnMessage0_IamRolePolicyAttachment_1AE31BFB" + "path": "root/Default/Default/Bucket/OnCreate-OnMessage0/IamRolePolicyAttachment", + "uniqueId": "Bucket_OnCreate-OnMessage0_IamRolePolicyAttachment_B9851CC6" } }, "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.Bucket_oncreate-OnMessage0_IamRole_0DECFA72.name}" + "role": "${aws_iam_role.Bucket_OnCreate-OnMessage0_IamRole_D3BF2935.name}" }, - "Bucket_oncreate-OnMessage1_IamRolePolicyAttachment_FE0643F9": { + "Bucket_OnCreate-OnMessage1_IamRolePolicyAttachment_CAB55010": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/oncreate-OnMessage1/IamRolePolicyAttachment", - "uniqueId": "Bucket_oncreate-OnMessage1_IamRolePolicyAttachment_FE0643F9" + "path": "root/Default/Default/Bucket/OnCreate-OnMessage1/IamRolePolicyAttachment", + "uniqueId": "Bucket_OnCreate-OnMessage1_IamRolePolicyAttachment_CAB55010" } }, "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.Bucket_oncreate-OnMessage1_IamRole_EAFD952E.name}" + "role": "${aws_iam_role.Bucket_OnCreate-OnMessage1_IamRole_0E855131.name}" }, - "Bucket_ondelete-OnMessage0_IamRolePolicyAttachment_7C1D0962": { + "Bucket_OnDelete-OnMessage0_IamRolePolicyAttachment_9AC35049": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/ondelete-OnMessage0/IamRolePolicyAttachment", - "uniqueId": "Bucket_ondelete-OnMessage0_IamRolePolicyAttachment_7C1D0962" + "path": "root/Default/Default/Bucket/OnDelete-OnMessage0/IamRolePolicyAttachment", + "uniqueId": "Bucket_OnDelete-OnMessage0_IamRolePolicyAttachment_9AC35049" } }, "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.Bucket_ondelete-OnMessage0_IamRole_50F5B4CA.name}" + "role": "${aws_iam_role.Bucket_OnDelete-OnMessage0_IamRole_A52E721B.name}" }, - "Bucket_ondelete-OnMessage1_IamRolePolicyAttachment_A21F4631": { + "Bucket_OnDelete-OnMessage1_IamRolePolicyAttachment_EFA92AD6": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/ondelete-OnMessage1/IamRolePolicyAttachment", - "uniqueId": "Bucket_ondelete-OnMessage1_IamRolePolicyAttachment_A21F4631" + "path": "root/Default/Default/Bucket/OnDelete-OnMessage1/IamRolePolicyAttachment", + "uniqueId": "Bucket_OnDelete-OnMessage1_IamRolePolicyAttachment_EFA92AD6" } }, "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.Bucket_ondelete-OnMessage1_IamRole_BE60A7EC.name}" + "role": "${aws_iam_role.Bucket_OnDelete-OnMessage1_IamRole_AA3A5721.name}" }, - "Bucket_onupdate-OnMessage0_IamRolePolicyAttachment_753AF495": { + "Bucket_OnUpdate-OnMessage0_IamRolePolicyAttachment_FAF69EA1": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/onupdate-OnMessage0/IamRolePolicyAttachment", - "uniqueId": "Bucket_onupdate-OnMessage0_IamRolePolicyAttachment_753AF495" + "path": "root/Default/Default/Bucket/OnUpdate-OnMessage0/IamRolePolicyAttachment", + "uniqueId": "Bucket_OnUpdate-OnMessage0_IamRolePolicyAttachment_FAF69EA1" } }, "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.Bucket_onupdate-OnMessage0_IamRole_B95F0C0C.name}" + "role": "${aws_iam_role.Bucket_OnUpdate-OnMessage0_IamRole_96499EB9.name}" }, - "Bucket_onupdate-OnMessage1_IamRolePolicyAttachment_A8068B10": { + "Bucket_OnUpdate-OnMessage1_IamRolePolicyAttachment_5CF4587E": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/onupdate-OnMessage1/IamRolePolicyAttachment", - "uniqueId": "Bucket_onupdate-OnMessage1_IamRolePolicyAttachment_A8068B10" + "path": "root/Default/Default/Bucket/OnUpdate-OnMessage1/IamRolePolicyAttachment", + "uniqueId": "Bucket_OnUpdate-OnMessage1_IamRolePolicyAttachment_5CF4587E" } }, "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.Bucket_onupdate-OnMessage1_IamRole_93BC24D8.name}" + "role": "${aws_iam_role.Bucket_OnUpdate-OnMessage1_IamRole_7B19D23F.name}" } }, "aws_lambda_function": { - "Bucket_oncreate-OnMessage0_64FDCB47": { + "Bucket_OnCreate-OnMessage0_4C972FB4": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/oncreate-OnMessage0/Default", - "uniqueId": "Bucket_oncreate-OnMessage0_64FDCB47" + "path": "root/Default/Default/Bucket/OnCreate-OnMessage0/Default", + "uniqueId": "Bucket_OnCreate-OnMessage0_4C972FB4" } }, "architectures": [ @@ -316,29 +316,29 @@ "DYNAMODB_TABLE_NAME_e7245baa_COLUMNS": "{\"_id\":0,\"key\":0,\"operation\":0,\"source\":0}", "DYNAMODB_TABLE_NAME_e7245baa_PRIMARY_KEY": "_id", "NODE_OPTIONS": "--enable-source-maps", - "WING_FUNCTION_NAME": "oncreate-OnMessage0-c87abc21", + "WING_FUNCTION_NAME": "OnCreate-OnMessage0-c8740b4b", "WING_TARGET": "tf-aws" } }, - "function_name": "oncreate-OnMessage0-c87abc21", + "function_name": "OnCreate-OnMessage0-c8740b4b", "handler": "index.handler", "memory_size": 1024, "publish": true, - "role": "${aws_iam_role.Bucket_oncreate-OnMessage0_IamRole_0DECFA72.arn}", + "role": "${aws_iam_role.Bucket_OnCreate-OnMessage0_IamRole_D3BF2935.arn}", "runtime": "nodejs20.x", "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.Bucket_oncreate-OnMessage0_S3Object_F105B125.key}", + "s3_key": "${aws_s3_object.Bucket_OnCreate-OnMessage0_S3Object_3AC22680.key}", "timeout": 60, "vpc_config": { "security_group_ids": [], "subnet_ids": [] } }, - "Bucket_oncreate-OnMessage1_BC956365": { + "Bucket_OnCreate-OnMessage1_18599D01": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/oncreate-OnMessage1/Default", - "uniqueId": "Bucket_oncreate-OnMessage1_BC956365" + "path": "root/Default/Default/Bucket/OnCreate-OnMessage1/Default", + "uniqueId": "Bucket_OnCreate-OnMessage1_18599D01" } }, "architectures": [ @@ -351,29 +351,29 @@ "DYNAMODB_TABLE_NAME_e7245baa_COLUMNS": "{\"_id\":0,\"key\":0,\"operation\":0,\"source\":0}", "DYNAMODB_TABLE_NAME_e7245baa_PRIMARY_KEY": "_id", "NODE_OPTIONS": "--enable-source-maps", - "WING_FUNCTION_NAME": "oncreate-OnMessage1-c800fec8", + "WING_FUNCTION_NAME": "OnCreate-OnMessage1-c8347a52", "WING_TARGET": "tf-aws" } }, - "function_name": "oncreate-OnMessage1-c800fec8", + "function_name": "OnCreate-OnMessage1-c8347a52", "handler": "index.handler", "memory_size": 1024, "publish": true, - "role": "${aws_iam_role.Bucket_oncreate-OnMessage1_IamRole_EAFD952E.arn}", + "role": "${aws_iam_role.Bucket_OnCreate-OnMessage1_IamRole_0E855131.arn}", "runtime": "nodejs20.x", "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.Bucket_oncreate-OnMessage1_S3Object_F92E0B51.key}", + "s3_key": "${aws_s3_object.Bucket_OnCreate-OnMessage1_S3Object_24FED042.key}", "timeout": 60, "vpc_config": { "security_group_ids": [], "subnet_ids": [] } }, - "Bucket_ondelete-OnMessage0_31A1E9E4": { + "Bucket_OnDelete-OnMessage0_BBD3A051": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/ondelete-OnMessage0/Default", - "uniqueId": "Bucket_ondelete-OnMessage0_31A1E9E4" + "path": "root/Default/Default/Bucket/OnDelete-OnMessage0/Default", + "uniqueId": "Bucket_OnDelete-OnMessage0_BBD3A051" } }, "architectures": [ @@ -386,29 +386,29 @@ "DYNAMODB_TABLE_NAME_e7245baa_COLUMNS": "{\"_id\":0,\"key\":0,\"operation\":0,\"source\":0}", "DYNAMODB_TABLE_NAME_e7245baa_PRIMARY_KEY": "_id", "NODE_OPTIONS": "--enable-source-maps", - "WING_FUNCTION_NAME": "ondelete-OnMessage0-c8a38b5a", + "WING_FUNCTION_NAME": "OnDelete-OnMessage0-c8e711ef", "WING_TARGET": "tf-aws" } }, - "function_name": "ondelete-OnMessage0-c8a38b5a", + "function_name": "OnDelete-OnMessage0-c8e711ef", "handler": "index.handler", "memory_size": 1024, "publish": true, - "role": "${aws_iam_role.Bucket_ondelete-OnMessage0_IamRole_50F5B4CA.arn}", + "role": "${aws_iam_role.Bucket_OnDelete-OnMessage0_IamRole_A52E721B.arn}", "runtime": "nodejs20.x", "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.Bucket_ondelete-OnMessage0_S3Object_DE6CDD43.key}", + "s3_key": "${aws_s3_object.Bucket_OnDelete-OnMessage0_S3Object_555C9D08.key}", "timeout": 60, "vpc_config": { "security_group_ids": [], "subnet_ids": [] } }, - "Bucket_ondelete-OnMessage1_5BBC7743": { + "Bucket_OnDelete-OnMessage1_A17F4764": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/ondelete-OnMessage1/Default", - "uniqueId": "Bucket_ondelete-OnMessage1_5BBC7743" + "path": "root/Default/Default/Bucket/OnDelete-OnMessage1/Default", + "uniqueId": "Bucket_OnDelete-OnMessage1_A17F4764" } }, "architectures": [ @@ -421,29 +421,29 @@ "DYNAMODB_TABLE_NAME_e7245baa_COLUMNS": "{\"_id\":0,\"key\":0,\"operation\":0,\"source\":0}", "DYNAMODB_TABLE_NAME_e7245baa_PRIMARY_KEY": "_id", "NODE_OPTIONS": "--enable-source-maps", - "WING_FUNCTION_NAME": "ondelete-OnMessage1-c82792b8", + "WING_FUNCTION_NAME": "OnDelete-OnMessage1-c8905f5b", "WING_TARGET": "tf-aws" } }, - "function_name": "ondelete-OnMessage1-c82792b8", + "function_name": "OnDelete-OnMessage1-c8905f5b", "handler": "index.handler", "memory_size": 1024, "publish": true, - "role": "${aws_iam_role.Bucket_ondelete-OnMessage1_IamRole_BE60A7EC.arn}", + "role": "${aws_iam_role.Bucket_OnDelete-OnMessage1_IamRole_AA3A5721.arn}", "runtime": "nodejs20.x", "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.Bucket_ondelete-OnMessage1_S3Object_DE98D974.key}", + "s3_key": "${aws_s3_object.Bucket_OnDelete-OnMessage1_S3Object_DE01EBE1.key}", "timeout": 60, "vpc_config": { "security_group_ids": [], "subnet_ids": [] } }, - "Bucket_onupdate-OnMessage0_2FBE69C5": { + "Bucket_OnUpdate-OnMessage0_ABC5042C": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/onupdate-OnMessage0/Default", - "uniqueId": "Bucket_onupdate-OnMessage0_2FBE69C5" + "path": "root/Default/Default/Bucket/OnUpdate-OnMessage0/Default", + "uniqueId": "Bucket_OnUpdate-OnMessage0_ABC5042C" } }, "architectures": [ @@ -456,29 +456,29 @@ "DYNAMODB_TABLE_NAME_e7245baa_COLUMNS": "{\"_id\":0,\"key\":0,\"operation\":0,\"source\":0}", "DYNAMODB_TABLE_NAME_e7245baa_PRIMARY_KEY": "_id", "NODE_OPTIONS": "--enable-source-maps", - "WING_FUNCTION_NAME": "onupdate-OnMessage0-c835180c", + "WING_FUNCTION_NAME": "OnUpdate-OnMessage0-c81b9fec", "WING_TARGET": "tf-aws" } }, - "function_name": "onupdate-OnMessage0-c835180c", + "function_name": "OnUpdate-OnMessage0-c81b9fec", "handler": "index.handler", "memory_size": 1024, "publish": true, - "role": "${aws_iam_role.Bucket_onupdate-OnMessage0_IamRole_B95F0C0C.arn}", + "role": "${aws_iam_role.Bucket_OnUpdate-OnMessage0_IamRole_96499EB9.arn}", "runtime": "nodejs20.x", "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.Bucket_onupdate-OnMessage0_S3Object_B4B3C51E.key}", + "s3_key": "${aws_s3_object.Bucket_OnUpdate-OnMessage0_S3Object_45CBA374.key}", "timeout": 60, "vpc_config": { "security_group_ids": [], "subnet_ids": [] } }, - "Bucket_onupdate-OnMessage1_DDC08FAE": { + "Bucket_OnUpdate-OnMessage1_A9787FC1": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/onupdate-OnMessage1/Default", - "uniqueId": "Bucket_onupdate-OnMessage1_DDC08FAE" + "path": "root/Default/Default/Bucket/OnUpdate-OnMessage1/Default", + "uniqueId": "Bucket_OnUpdate-OnMessage1_A9787FC1" } }, "architectures": [ @@ -491,18 +491,18 @@ "DYNAMODB_TABLE_NAME_e7245baa_COLUMNS": "{\"_id\":0,\"key\":0,\"operation\":0,\"source\":0}", "DYNAMODB_TABLE_NAME_e7245baa_PRIMARY_KEY": "_id", "NODE_OPTIONS": "--enable-source-maps", - "WING_FUNCTION_NAME": "onupdate-OnMessage1-c8826493", + "WING_FUNCTION_NAME": "OnUpdate-OnMessage1-c8513427", "WING_TARGET": "tf-aws" } }, - "function_name": "onupdate-OnMessage1-c8826493", + "function_name": "OnUpdate-OnMessage1-c8513427", "handler": "index.handler", "memory_size": 1024, "publish": true, - "role": "${aws_iam_role.Bucket_onupdate-OnMessage1_IamRole_93BC24D8.arn}", + "role": "${aws_iam_role.Bucket_OnUpdate-OnMessage1_IamRole_7B19D23F.arn}", "runtime": "nodejs20.x", "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.Bucket_onupdate-OnMessage1_S3Object_12D7055B.key}", + "s3_key": "${aws_s3_object.Bucket_OnUpdate-OnMessage1_S3Object_A8B89403.key}", "timeout": 60, "vpc_config": { "security_group_ids": [], @@ -511,77 +511,77 @@ } }, "aws_lambda_permission": { - "Bucket_oncreate-OnMessage0_InvokePermission-c80311dcc4aadf68b1b7fbea8bf5da640f0dde68f4_DD3AB632": { + "Bucket_OnCreate-OnMessage0_InvokePermission-c8b721b0d6157aa6ade66017aa9bfcbb77f8df59d7_F5383BED": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/oncreate-OnMessage0/InvokePermission-c80311dcc4aadf68b1b7fbea8bf5da640f0dde68f4", - "uniqueId": "Bucket_oncreate-OnMessage0_InvokePermission-c80311dcc4aadf68b1b7fbea8bf5da640f0dde68f4_DD3AB632" + "path": "root/Default/Default/Bucket/OnCreate-OnMessage0/InvokePermission-c8b721b0d6157aa6ade66017aa9bfcbb77f8df59d7", + "uniqueId": "Bucket_OnCreate-OnMessage0_InvokePermission-c8b721b0d6157aa6ade66017aa9bfcbb77f8df59d7_F5383BED" } }, "action": "lambda:InvokeFunction", - "function_name": "${aws_lambda_function.Bucket_oncreate-OnMessage0_64FDCB47.function_name}", + "function_name": "${aws_lambda_function.Bucket_OnCreate-OnMessage0_4C972FB4.function_name}", "principal": "sns.amazonaws.com", - "source_arn": "${aws_sns_topic.Bucket_oncreate_05DB4E53.arn}" + "source_arn": "${aws_sns_topic.Bucket_OnCreate_9682272C.arn}" }, - "Bucket_oncreate-OnMessage1_InvokePermission-c80311dcc4aadf68b1b7fbea8bf5da640f0dde68f4_F6194849": { + "Bucket_OnCreate-OnMessage1_InvokePermission-c8b721b0d6157aa6ade66017aa9bfcbb77f8df59d7_C0F2EA79": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/oncreate-OnMessage1/InvokePermission-c80311dcc4aadf68b1b7fbea8bf5da640f0dde68f4", - "uniqueId": "Bucket_oncreate-OnMessage1_InvokePermission-c80311dcc4aadf68b1b7fbea8bf5da640f0dde68f4_F6194849" + "path": "root/Default/Default/Bucket/OnCreate-OnMessage1/InvokePermission-c8b721b0d6157aa6ade66017aa9bfcbb77f8df59d7", + "uniqueId": "Bucket_OnCreate-OnMessage1_InvokePermission-c8b721b0d6157aa6ade66017aa9bfcbb77f8df59d7_C0F2EA79" } }, "action": "lambda:InvokeFunction", - "function_name": "${aws_lambda_function.Bucket_oncreate-OnMessage1_BC956365.function_name}", + "function_name": "${aws_lambda_function.Bucket_OnCreate-OnMessage1_18599D01.function_name}", "principal": "sns.amazonaws.com", - "source_arn": "${aws_sns_topic.Bucket_oncreate_05DB4E53.arn}" + "source_arn": "${aws_sns_topic.Bucket_OnCreate_9682272C.arn}" }, - "Bucket_ondelete-OnMessage0_InvokePermission-c8d079b3d06057215794f77e7e4bf9c5113e5b753b_AFF2F4D8": { + "Bucket_OnDelete-OnMessage0_InvokePermission-c8951577e6e6b8b443e69cf3aa712434a41064d057_3C678F8E": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/ondelete-OnMessage0/InvokePermission-c8d079b3d06057215794f77e7e4bf9c5113e5b753b", - "uniqueId": "Bucket_ondelete-OnMessage0_InvokePermission-c8d079b3d06057215794f77e7e4bf9c5113e5b753b_AFF2F4D8" + "path": "root/Default/Default/Bucket/OnDelete-OnMessage0/InvokePermission-c8951577e6e6b8b443e69cf3aa712434a41064d057", + "uniqueId": "Bucket_OnDelete-OnMessage0_InvokePermission-c8951577e6e6b8b443e69cf3aa712434a41064d057_3C678F8E" } }, "action": "lambda:InvokeFunction", - "function_name": "${aws_lambda_function.Bucket_ondelete-OnMessage0_31A1E9E4.function_name}", + "function_name": "${aws_lambda_function.Bucket_OnDelete-OnMessage0_BBD3A051.function_name}", "principal": "sns.amazonaws.com", - "source_arn": "${aws_sns_topic.Bucket_ondelete_7F3A2B6C.arn}" + "source_arn": "${aws_sns_topic.Bucket_OnDelete_0EB7243C.arn}" }, - "Bucket_ondelete-OnMessage1_InvokePermission-c8d079b3d06057215794f77e7e4bf9c5113e5b753b_ADE9F930": { + "Bucket_OnDelete-OnMessage1_InvokePermission-c8951577e6e6b8b443e69cf3aa712434a41064d057_DB38FC8F": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/ondelete-OnMessage1/InvokePermission-c8d079b3d06057215794f77e7e4bf9c5113e5b753b", - "uniqueId": "Bucket_ondelete-OnMessage1_InvokePermission-c8d079b3d06057215794f77e7e4bf9c5113e5b753b_ADE9F930" + "path": "root/Default/Default/Bucket/OnDelete-OnMessage1/InvokePermission-c8951577e6e6b8b443e69cf3aa712434a41064d057", + "uniqueId": "Bucket_OnDelete-OnMessage1_InvokePermission-c8951577e6e6b8b443e69cf3aa712434a41064d057_DB38FC8F" } }, "action": "lambda:InvokeFunction", - "function_name": "${aws_lambda_function.Bucket_ondelete-OnMessage1_5BBC7743.function_name}", + "function_name": "${aws_lambda_function.Bucket_OnDelete-OnMessage1_A17F4764.function_name}", "principal": "sns.amazonaws.com", - "source_arn": "${aws_sns_topic.Bucket_ondelete_7F3A2B6C.arn}" + "source_arn": "${aws_sns_topic.Bucket_OnDelete_0EB7243C.arn}" }, - "Bucket_onupdate-OnMessage0_InvokePermission-c83c88094423e3602c58db2402f439eb720806a401_3F79E9CA": { + "Bucket_OnUpdate-OnMessage0_InvokePermission-c81749ea32d17e6c85fdd886350ce3ffe9fd7c0be7_026E0359": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/onupdate-OnMessage0/InvokePermission-c83c88094423e3602c58db2402f439eb720806a401", - "uniqueId": "Bucket_onupdate-OnMessage0_InvokePermission-c83c88094423e3602c58db2402f439eb720806a401_3F79E9CA" + "path": "root/Default/Default/Bucket/OnUpdate-OnMessage0/InvokePermission-c81749ea32d17e6c85fdd886350ce3ffe9fd7c0be7", + "uniqueId": "Bucket_OnUpdate-OnMessage0_InvokePermission-c81749ea32d17e6c85fdd886350ce3ffe9fd7c0be7_026E0359" } }, "action": "lambda:InvokeFunction", - "function_name": "${aws_lambda_function.Bucket_onupdate-OnMessage0_2FBE69C5.function_name}", + "function_name": "${aws_lambda_function.Bucket_OnUpdate-OnMessage0_ABC5042C.function_name}", "principal": "sns.amazonaws.com", - "source_arn": "${aws_sns_topic.Bucket_onupdate_658D07E4.arn}" + "source_arn": "${aws_sns_topic.Bucket_OnUpdate_E297838E.arn}" }, - "Bucket_onupdate-OnMessage1_InvokePermission-c83c88094423e3602c58db2402f439eb720806a401_656518F7": { + "Bucket_OnUpdate-OnMessage1_InvokePermission-c81749ea32d17e6c85fdd886350ce3ffe9fd7c0be7_E1A5BEF6": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/onupdate-OnMessage1/InvokePermission-c83c88094423e3602c58db2402f439eb720806a401", - "uniqueId": "Bucket_onupdate-OnMessage1_InvokePermission-c83c88094423e3602c58db2402f439eb720806a401_656518F7" + "path": "root/Default/Default/Bucket/OnUpdate-OnMessage1/InvokePermission-c81749ea32d17e6c85fdd886350ce3ffe9fd7c0be7", + "uniqueId": "Bucket_OnUpdate-OnMessage1_InvokePermission-c81749ea32d17e6c85fdd886350ce3ffe9fd7c0be7_E1A5BEF6" } }, "action": "lambda:InvokeFunction", - "function_name": "${aws_lambda_function.Bucket_onupdate-OnMessage1_DDC08FAE.function_name}", + "function_name": "${aws_lambda_function.Bucket_OnUpdate-OnMessage1_A9787FC1.function_name}", "principal": "sns.amazonaws.com", - "source_arn": "${aws_sns_topic.Bucket_onupdate_658D07E4.arn}" + "source_arn": "${aws_sns_topic.Bucket_OnUpdate_E297838E.arn}" } }, "aws_s3_bucket": { @@ -615,9 +615,9 @@ }, "bucket": "${aws_s3_bucket.Bucket.id}", "depends_on": [ - "aws_sns_topic_policy.Bucket_ondelete_PublishPermission-c88fdc5f491a51d8438235500a4821fbc31357ca3a_ABACCC4A", - "aws_sns_topic_policy.Bucket_onupdate_PublishPermission-c88fdc5f491a51d8438235500a4821fbc31357ca3a_CFB72F4E", - "aws_sns_topic_policy.Bucket_oncreate_PublishPermission-c88fdc5f491a51d8438235500a4821fbc31357ca3a_E0552A1A" + "aws_sns_topic_policy.Bucket_OnDelete_PublishPermission-c88fdc5f491a51d8438235500a4821fbc31357ca3a_89434C6B", + "aws_sns_topic_policy.Bucket_OnUpdate_PublishPermission-c88fdc5f491a51d8438235500a4821fbc31357ca3a_9BF3340C", + "aws_sns_topic_policy.Bucket_OnCreate_PublishPermission-c88fdc5f491a51d8438235500a4821fbc31357ca3a_E9DA9F8C" ], "topic": [ { @@ -625,86 +625,86 @@ "s3:ObjectRemoved:*" ], "id": "on-ondelete-notification", - "topic_arn": "${aws_sns_topic.Bucket_ondelete_7F3A2B6C.arn}" + "topic_arn": "${aws_sns_topic.Bucket_OnDelete_0EB7243C.arn}" }, { "events": [ "s3:ObjectCreated:Post" ], "id": "on-onupdate-notification", - "topic_arn": "${aws_sns_topic.Bucket_onupdate_658D07E4.arn}" + "topic_arn": "${aws_sns_topic.Bucket_OnUpdate_E297838E.arn}" }, { "events": [ "s3:ObjectCreated:Put" ], "id": "on-oncreate-notification", - "topic_arn": "${aws_sns_topic.Bucket_oncreate_05DB4E53.arn}" + "topic_arn": "${aws_sns_topic.Bucket_OnCreate_9682272C.arn}" } ] } }, "aws_s3_object": { - "Bucket_oncreate-OnMessage0_S3Object_F105B125": { + "Bucket_OnCreate-OnMessage0_S3Object_3AC22680": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/oncreate-OnMessage0/S3Object", - "uniqueId": "Bucket_oncreate-OnMessage0_S3Object_F105B125" + "path": "root/Default/Default/Bucket/OnCreate-OnMessage0/S3Object", + "uniqueId": "Bucket_OnCreate-OnMessage0_S3Object_3AC22680" } }, "bucket": "${aws_s3_bucket.Code.bucket}", "key": "", "source": "" }, - "Bucket_oncreate-OnMessage1_S3Object_F92E0B51": { + "Bucket_OnCreate-OnMessage1_S3Object_24FED042": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/oncreate-OnMessage1/S3Object", - "uniqueId": "Bucket_oncreate-OnMessage1_S3Object_F92E0B51" + "path": "root/Default/Default/Bucket/OnCreate-OnMessage1/S3Object", + "uniqueId": "Bucket_OnCreate-OnMessage1_S3Object_24FED042" } }, "bucket": "${aws_s3_bucket.Code.bucket}", "key": "", "source": "" }, - "Bucket_ondelete-OnMessage0_S3Object_DE6CDD43": { + "Bucket_OnDelete-OnMessage0_S3Object_555C9D08": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/ondelete-OnMessage0/S3Object", - "uniqueId": "Bucket_ondelete-OnMessage0_S3Object_DE6CDD43" + "path": "root/Default/Default/Bucket/OnDelete-OnMessage0/S3Object", + "uniqueId": "Bucket_OnDelete-OnMessage0_S3Object_555C9D08" } }, "bucket": "${aws_s3_bucket.Code.bucket}", "key": "", "source": "" }, - "Bucket_ondelete-OnMessage1_S3Object_DE98D974": { + "Bucket_OnDelete-OnMessage1_S3Object_DE01EBE1": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/ondelete-OnMessage1/S3Object", - "uniqueId": "Bucket_ondelete-OnMessage1_S3Object_DE98D974" + "path": "root/Default/Default/Bucket/OnDelete-OnMessage1/S3Object", + "uniqueId": "Bucket_OnDelete-OnMessage1_S3Object_DE01EBE1" } }, "bucket": "${aws_s3_bucket.Code.bucket}", "key": "", "source": "" }, - "Bucket_onupdate-OnMessage0_S3Object_B4B3C51E": { + "Bucket_OnUpdate-OnMessage0_S3Object_45CBA374": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/onupdate-OnMessage0/S3Object", - "uniqueId": "Bucket_onupdate-OnMessage0_S3Object_B4B3C51E" + "path": "root/Default/Default/Bucket/OnUpdate-OnMessage0/S3Object", + "uniqueId": "Bucket_OnUpdate-OnMessage0_S3Object_45CBA374" } }, "bucket": "${aws_s3_bucket.Code.bucket}", "key": "", "source": "" }, - "Bucket_onupdate-OnMessage1_S3Object_12D7055B": { + "Bucket_OnUpdate-OnMessage1_S3Object_A8B89403": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/onupdate-OnMessage1/S3Object", - "uniqueId": "Bucket_onupdate-OnMessage1_S3Object_12D7055B" + "path": "root/Default/Default/Bucket/OnUpdate-OnMessage1/S3Object", + "uniqueId": "Bucket_OnUpdate-OnMessage1_S3Object_A8B89403" } }, "bucket": "${aws_s3_bucket.Code.bucket}", @@ -713,132 +713,132 @@ } }, "aws_sns_topic": { - "Bucket_oncreate_05DB4E53": { + "Bucket_OnCreate_9682272C": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/oncreate/Default", - "uniqueId": "Bucket_oncreate_05DB4E53" + "path": "root/Default/Default/Bucket/OnCreate/Default", + "uniqueId": "Bucket_OnCreate_9682272C" } }, - "name": "oncreate-c80311dc" + "name": "OnCreate-c8b721b0" }, - "Bucket_ondelete_7F3A2B6C": { + "Bucket_OnDelete_0EB7243C": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/ondelete/Default", - "uniqueId": "Bucket_ondelete_7F3A2B6C" + "path": "root/Default/Default/Bucket/OnDelete/Default", + "uniqueId": "Bucket_OnDelete_0EB7243C" } }, - "name": "ondelete-c8d079b3" + "name": "OnDelete-c8951577" }, - "Bucket_onupdate_658D07E4": { + "Bucket_OnUpdate_E297838E": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/onupdate/Default", - "uniqueId": "Bucket_onupdate_658D07E4" + "path": "root/Default/Default/Bucket/OnUpdate/Default", + "uniqueId": "Bucket_OnUpdate_E297838E" } }, - "name": "onupdate-c83c8809" + "name": "OnUpdate-c81749ea" } }, "aws_sns_topic_policy": { - "Bucket_oncreate_PublishPermission-c88fdc5f491a51d8438235500a4821fbc31357ca3a_E0552A1A": { + "Bucket_OnCreate_PublishPermission-c88fdc5f491a51d8438235500a4821fbc31357ca3a_E9DA9F8C": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/oncreate/PublishPermission-c88fdc5f491a51d8438235500a4821fbc31357ca3a", - "uniqueId": "Bucket_oncreate_PublishPermission-c88fdc5f491a51d8438235500a4821fbc31357ca3a_E0552A1A" + "path": "root/Default/Default/Bucket/OnCreate/PublishPermission-c88fdc5f491a51d8438235500a4821fbc31357ca3a", + "uniqueId": "Bucket_OnCreate_PublishPermission-c88fdc5f491a51d8438235500a4821fbc31357ca3a_E9DA9F8C" } }, - "arn": "${aws_sns_topic.Bucket_oncreate_05DB4E53.arn}", - "policy": "{\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"s3.amazonaws.com\"},\"Action\":\"sns:Publish\",\"Resource\":\"${aws_sns_topic.Bucket_oncreate_05DB4E53.arn}\",\"Condition\":{\"ArnEquals\":{\"aws:SourceArn\":\"${aws_s3_bucket.Bucket.arn}\"}}}]}" + "arn": "${aws_sns_topic.Bucket_OnCreate_9682272C.arn}", + "policy": "{\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"s3.amazonaws.com\"},\"Action\":\"sns:Publish\",\"Resource\":\"${aws_sns_topic.Bucket_OnCreate_9682272C.arn}\",\"Condition\":{\"ArnEquals\":{\"aws:SourceArn\":\"${aws_s3_bucket.Bucket.arn}\"}}}]}" }, - "Bucket_ondelete_PublishPermission-c88fdc5f491a51d8438235500a4821fbc31357ca3a_ABACCC4A": { + "Bucket_OnDelete_PublishPermission-c88fdc5f491a51d8438235500a4821fbc31357ca3a_89434C6B": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/ondelete/PublishPermission-c88fdc5f491a51d8438235500a4821fbc31357ca3a", - "uniqueId": "Bucket_ondelete_PublishPermission-c88fdc5f491a51d8438235500a4821fbc31357ca3a_ABACCC4A" + "path": "root/Default/Default/Bucket/OnDelete/PublishPermission-c88fdc5f491a51d8438235500a4821fbc31357ca3a", + "uniqueId": "Bucket_OnDelete_PublishPermission-c88fdc5f491a51d8438235500a4821fbc31357ca3a_89434C6B" } }, - "arn": "${aws_sns_topic.Bucket_ondelete_7F3A2B6C.arn}", - "policy": "{\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"s3.amazonaws.com\"},\"Action\":\"sns:Publish\",\"Resource\":\"${aws_sns_topic.Bucket_ondelete_7F3A2B6C.arn}\",\"Condition\":{\"ArnEquals\":{\"aws:SourceArn\":\"${aws_s3_bucket.Bucket.arn}\"}}}]}" + "arn": "${aws_sns_topic.Bucket_OnDelete_0EB7243C.arn}", + "policy": "{\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"s3.amazonaws.com\"},\"Action\":\"sns:Publish\",\"Resource\":\"${aws_sns_topic.Bucket_OnDelete_0EB7243C.arn}\",\"Condition\":{\"ArnEquals\":{\"aws:SourceArn\":\"${aws_s3_bucket.Bucket.arn}\"}}}]}" }, - "Bucket_onupdate_PublishPermission-c88fdc5f491a51d8438235500a4821fbc31357ca3a_CFB72F4E": { + "Bucket_OnUpdate_PublishPermission-c88fdc5f491a51d8438235500a4821fbc31357ca3a_9BF3340C": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/onupdate/PublishPermission-c88fdc5f491a51d8438235500a4821fbc31357ca3a", - "uniqueId": "Bucket_onupdate_PublishPermission-c88fdc5f491a51d8438235500a4821fbc31357ca3a_CFB72F4E" + "path": "root/Default/Default/Bucket/OnUpdate/PublishPermission-c88fdc5f491a51d8438235500a4821fbc31357ca3a", + "uniqueId": "Bucket_OnUpdate_PublishPermission-c88fdc5f491a51d8438235500a4821fbc31357ca3a_9BF3340C" } }, - "arn": "${aws_sns_topic.Bucket_onupdate_658D07E4.arn}", - "policy": "{\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"s3.amazonaws.com\"},\"Action\":\"sns:Publish\",\"Resource\":\"${aws_sns_topic.Bucket_onupdate_658D07E4.arn}\",\"Condition\":{\"ArnEquals\":{\"aws:SourceArn\":\"${aws_s3_bucket.Bucket.arn}\"}}}]}" + "arn": "${aws_sns_topic.Bucket_OnUpdate_E297838E.arn}", + "policy": "{\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"s3.amazonaws.com\"},\"Action\":\"sns:Publish\",\"Resource\":\"${aws_sns_topic.Bucket_OnUpdate_E297838E.arn}\",\"Condition\":{\"ArnEquals\":{\"aws:SourceArn\":\"${aws_s3_bucket.Bucket.arn}\"}}}]}" } }, "aws_sns_topic_subscription": { - "Bucket_oncreate_TopicSubscription0_02705B37": { + "Bucket_OnCreate_TopicSubscription0_A2B42747": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/oncreate/TopicSubscription0", - "uniqueId": "Bucket_oncreate_TopicSubscription0_02705B37" + "path": "root/Default/Default/Bucket/OnCreate/TopicSubscription0", + "uniqueId": "Bucket_OnCreate_TopicSubscription0_A2B42747" } }, - "endpoint": "${aws_lambda_function.Bucket_oncreate-OnMessage0_64FDCB47.arn}", + "endpoint": "${aws_lambda_function.Bucket_OnCreate-OnMessage0_4C972FB4.arn}", "protocol": "lambda", - "topic_arn": "${aws_sns_topic.Bucket_oncreate_05DB4E53.arn}" + "topic_arn": "${aws_sns_topic.Bucket_OnCreate_9682272C.arn}" }, - "Bucket_oncreate_TopicSubscription1_CAD043F1": { + "Bucket_OnCreate_TopicSubscription1_8F485EA8": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/oncreate/TopicSubscription1", - "uniqueId": "Bucket_oncreate_TopicSubscription1_CAD043F1" + "path": "root/Default/Default/Bucket/OnCreate/TopicSubscription1", + "uniqueId": "Bucket_OnCreate_TopicSubscription1_8F485EA8" } }, - "endpoint": "${aws_lambda_function.Bucket_oncreate-OnMessage1_BC956365.arn}", + "endpoint": "${aws_lambda_function.Bucket_OnCreate-OnMessage1_18599D01.arn}", "protocol": "lambda", - "topic_arn": "${aws_sns_topic.Bucket_oncreate_05DB4E53.arn}" + "topic_arn": "${aws_sns_topic.Bucket_OnCreate_9682272C.arn}" }, - "Bucket_ondelete_TopicSubscription0_4F3E33C7": { + "Bucket_OnDelete_TopicSubscription0_4D741190": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/ondelete/TopicSubscription0", - "uniqueId": "Bucket_ondelete_TopicSubscription0_4F3E33C7" + "path": "root/Default/Default/Bucket/OnDelete/TopicSubscription0", + "uniqueId": "Bucket_OnDelete_TopicSubscription0_4D741190" } }, - "endpoint": "${aws_lambda_function.Bucket_ondelete-OnMessage0_31A1E9E4.arn}", + "endpoint": "${aws_lambda_function.Bucket_OnDelete-OnMessage0_BBD3A051.arn}", "protocol": "lambda", - "topic_arn": "${aws_sns_topic.Bucket_ondelete_7F3A2B6C.arn}" + "topic_arn": "${aws_sns_topic.Bucket_OnDelete_0EB7243C.arn}" }, - "Bucket_ondelete_TopicSubscription1_575AD2C4": { + "Bucket_OnDelete_TopicSubscription1_8362A2BD": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/ondelete/TopicSubscription1", - "uniqueId": "Bucket_ondelete_TopicSubscription1_575AD2C4" + "path": "root/Default/Default/Bucket/OnDelete/TopicSubscription1", + "uniqueId": "Bucket_OnDelete_TopicSubscription1_8362A2BD" } }, - "endpoint": "${aws_lambda_function.Bucket_ondelete-OnMessage1_5BBC7743.arn}", + "endpoint": "${aws_lambda_function.Bucket_OnDelete-OnMessage1_A17F4764.arn}", "protocol": "lambda", - "topic_arn": "${aws_sns_topic.Bucket_ondelete_7F3A2B6C.arn}" + "topic_arn": "${aws_sns_topic.Bucket_OnDelete_0EB7243C.arn}" }, - "Bucket_onupdate_TopicSubscription0_7ED55DE3": { + "Bucket_OnUpdate_TopicSubscription0_6ECDED15": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/onupdate/TopicSubscription0", - "uniqueId": "Bucket_onupdate_TopicSubscription0_7ED55DE3" + "path": "root/Default/Default/Bucket/OnUpdate/TopicSubscription0", + "uniqueId": "Bucket_OnUpdate_TopicSubscription0_6ECDED15" } }, - "endpoint": "${aws_lambda_function.Bucket_onupdate-OnMessage0_2FBE69C5.arn}", + "endpoint": "${aws_lambda_function.Bucket_OnUpdate-OnMessage0_ABC5042C.arn}", "protocol": "lambda", - "topic_arn": "${aws_sns_topic.Bucket_onupdate_658D07E4.arn}" + "topic_arn": "${aws_sns_topic.Bucket_OnUpdate_E297838E.arn}" }, - "Bucket_onupdate_TopicSubscription1_8652ABA3": { + "Bucket_OnUpdate_TopicSubscription1_3F3174F8": { "//": { "metadata": { - "path": "root/Default/Default/Bucket/onupdate/TopicSubscription1", - "uniqueId": "Bucket_onupdate_TopicSubscription1_8652ABA3" + "path": "root/Default/Default/Bucket/OnUpdate/TopicSubscription1", + "uniqueId": "Bucket_OnUpdate_TopicSubscription1_3F3174F8" } }, - "endpoint": "${aws_lambda_function.Bucket_onupdate-OnMessage1_DDC08FAE.arn}", + "endpoint": "${aws_lambda_function.Bucket_OnUpdate-OnMessage1_A9787FC1.arn}", "protocol": "lambda", - "topic_arn": "${aws_sns_topic.Bucket_onupdate_658D07E4.arn}" + "topic_arn": "${aws_sns_topic.Bucket_OnUpdate_E297838E.arn}" } } } diff --git a/tools/hangar/__snapshots__/test_corpus/valid/mutation_after_class_init.test.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/mutation_after_class_init.test.w_compile_tf-aws.md index 5857d521f2a..6b7558fe72e 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/mutation_after_class_init.test.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/mutation_after_class_init.test.w_compile_tf-aws.md @@ -120,14 +120,14 @@ module.exports = function({ }) { }, "resource": { "aws_cloudwatch_log_group": { - "Queue_Bucket_oncreate-OnMessage0_CloudwatchLogGroup_9C74780C": { + "Queue_Bucket_OnCreate-OnMessage0_CloudwatchLogGroup_BF038703": { "//": { "metadata": { - "path": "root/Default/Default/Queue/Bucket/oncreate-OnMessage0/CloudwatchLogGroup", - "uniqueId": "Queue_Bucket_oncreate-OnMessage0_CloudwatchLogGroup_9C74780C" + "path": "root/Default/Default/Queue/Bucket/OnCreate-OnMessage0/CloudwatchLogGroup", + "uniqueId": "Queue_Bucket_OnCreate-OnMessage0_CloudwatchLogGroup_BF038703" } }, - "name": "/aws/lambda/oncreate-OnMessage0-c8eb573e", + "name": "/aws/lambda/OnCreate-OnMessage0-c8cf52b9", "retention_in_days": 30 } }, @@ -151,46 +151,46 @@ module.exports = function({ }) { } }, "aws_iam_role": { - "Queue_Bucket_oncreate-OnMessage0_IamRole_9A71BD20": { + "Queue_Bucket_OnCreate-OnMessage0_IamRole_210FCAAB": { "//": { "metadata": { - "path": "root/Default/Default/Queue/Bucket/oncreate-OnMessage0/IamRole", - "uniqueId": "Queue_Bucket_oncreate-OnMessage0_IamRole_9A71BD20" + "path": "root/Default/Default/Queue/Bucket/OnCreate-OnMessage0/IamRole", + "uniqueId": "Queue_Bucket_OnCreate-OnMessage0_IamRole_210FCAAB" } }, "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" } }, "aws_iam_role_policy": { - "Queue_Bucket_oncreate-OnMessage0_IamRolePolicy_DA330440": { + "Queue_Bucket_OnCreate-OnMessage0_IamRolePolicy_10E86967": { "//": { "metadata": { - "path": "root/Default/Default/Queue/Bucket/oncreate-OnMessage0/IamRolePolicy", - "uniqueId": "Queue_Bucket_oncreate-OnMessage0_IamRolePolicy_DA330440" + "path": "root/Default/Default/Queue/Bucket/OnCreate-OnMessage0/IamRolePolicy", + "uniqueId": "Queue_Bucket_OnCreate-OnMessage0_IamRolePolicy_10E86967" } }, "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"dynamodb:UpdateItem\"],\"Resource\":[\"${aws_dynamodb_table.Counter.arn}\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.Queue_Bucket_oncreate-OnMessage0_IamRole_9A71BD20.name}" + "role": "${aws_iam_role.Queue_Bucket_OnCreate-OnMessage0_IamRole_210FCAAB.name}" } }, "aws_iam_role_policy_attachment": { - "Queue_Bucket_oncreate-OnMessage0_IamRolePolicyAttachment_C9B56BC6": { + "Queue_Bucket_OnCreate-OnMessage0_IamRolePolicyAttachment_C6B42DE8": { "//": { "metadata": { - "path": "root/Default/Default/Queue/Bucket/oncreate-OnMessage0/IamRolePolicyAttachment", - "uniqueId": "Queue_Bucket_oncreate-OnMessage0_IamRolePolicyAttachment_C9B56BC6" + "path": "root/Default/Default/Queue/Bucket/OnCreate-OnMessage0/IamRolePolicyAttachment", + "uniqueId": "Queue_Bucket_OnCreate-OnMessage0_IamRolePolicyAttachment_C6B42DE8" } }, "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.Queue_Bucket_oncreate-OnMessage0_IamRole_9A71BD20.name}" + "role": "${aws_iam_role.Queue_Bucket_OnCreate-OnMessage0_IamRole_210FCAAB.name}" } }, "aws_lambda_function": { - "Queue_Bucket_oncreate-OnMessage0_E6447040": { + "Queue_Bucket_OnCreate-OnMessage0_F7EE1690": { "//": { "metadata": { - "path": "root/Default/Default/Queue/Bucket/oncreate-OnMessage0/Default", - "uniqueId": "Queue_Bucket_oncreate-OnMessage0_E6447040" + "path": "root/Default/Default/Queue/Bucket/OnCreate-OnMessage0/Default", + "uniqueId": "Queue_Bucket_OnCreate-OnMessage0_F7EE1690" } }, "architectures": [ @@ -200,18 +200,18 @@ module.exports = function({ }) { "variables": { "DYNAMODB_TABLE_NAME_6cb5a3a4": "${aws_dynamodb_table.Counter.name}", "NODE_OPTIONS": "--enable-source-maps", - "WING_FUNCTION_NAME": "oncreate-OnMessage0-c8eb573e", + "WING_FUNCTION_NAME": "OnCreate-OnMessage0-c8cf52b9", "WING_TARGET": "tf-aws" } }, - "function_name": "oncreate-OnMessage0-c8eb573e", + "function_name": "OnCreate-OnMessage0-c8cf52b9", "handler": "index.handler", "memory_size": 1024, "publish": true, - "role": "${aws_iam_role.Queue_Bucket_oncreate-OnMessage0_IamRole_9A71BD20.arn}", + "role": "${aws_iam_role.Queue_Bucket_OnCreate-OnMessage0_IamRole_210FCAAB.arn}", "runtime": "nodejs20.x", "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.Queue_Bucket_oncreate-OnMessage0_S3Object_25BC6E4D.key}", + "s3_key": "${aws_s3_object.Queue_Bucket_OnCreate-OnMessage0_S3Object_D3C5CDCB.key}", "timeout": 60, "vpc_config": { "security_group_ids": [], @@ -220,17 +220,17 @@ module.exports = function({ }) { } }, "aws_lambda_permission": { - "Queue_Bucket_oncreate-OnMessage0_InvokePermission-c8dcd31783c1522bf1463bb2ca490732c273cb2aa5_8197A736": { + "Queue_Bucket_OnCreate-OnMessage0_InvokePermission-c858cf97f3e1a27ecdbc73b06b0748fac8d80bfa4e_BD57ACF0": { "//": { "metadata": { - "path": "root/Default/Default/Queue/Bucket/oncreate-OnMessage0/InvokePermission-c8dcd31783c1522bf1463bb2ca490732c273cb2aa5", - "uniqueId": "Queue_Bucket_oncreate-OnMessage0_InvokePermission-c8dcd31783c1522bf1463bb2ca490732c273cb2aa5_8197A736" + "path": "root/Default/Default/Queue/Bucket/OnCreate-OnMessage0/InvokePermission-c858cf97f3e1a27ecdbc73b06b0748fac8d80bfa4e", + "uniqueId": "Queue_Bucket_OnCreate-OnMessage0_InvokePermission-c858cf97f3e1a27ecdbc73b06b0748fac8d80bfa4e_BD57ACF0" } }, "action": "lambda:InvokeFunction", - "function_name": "${aws_lambda_function.Queue_Bucket_oncreate-OnMessage0_E6447040.function_name}", + "function_name": "${aws_lambda_function.Queue_Bucket_OnCreate-OnMessage0_F7EE1690.function_name}", "principal": "sns.amazonaws.com", - "source_arn": "${aws_sns_topic.Queue_Bucket_oncreate_793B52C5.arn}" + "source_arn": "${aws_sns_topic.Queue_Bucket_OnCreate_DA88E2C3.arn}" } }, "aws_s3_bucket": { @@ -264,7 +264,7 @@ module.exports = function({ }) { }, "bucket": "${aws_s3_bucket.Queue_Bucket_A87615FF.id}", "depends_on": [ - "aws_sns_topic_policy.Queue_Bucket_oncreate_PublishPermission-c81048e6ea798f253db9714095de7ff4c76c443489_27F9C442" + "aws_sns_topic_policy.Queue_Bucket_OnCreate_PublishPermission-c81048e6ea798f253db9714095de7ff4c76c443489_3E123A5B" ], "topic": [ { @@ -272,17 +272,17 @@ module.exports = function({ }) { "s3:ObjectCreated:Put" ], "id": "on-oncreate-notification", - "topic_arn": "${aws_sns_topic.Queue_Bucket_oncreate_793B52C5.arn}" + "topic_arn": "${aws_sns_topic.Queue_Bucket_OnCreate_DA88E2C3.arn}" } ] } }, "aws_s3_object": { - "Queue_Bucket_oncreate-OnMessage0_S3Object_25BC6E4D": { + "Queue_Bucket_OnCreate-OnMessage0_S3Object_D3C5CDCB": { "//": { "metadata": { - "path": "root/Default/Default/Queue/Bucket/oncreate-OnMessage0/S3Object", - "uniqueId": "Queue_Bucket_oncreate-OnMessage0_S3Object_25BC6E4D" + "path": "root/Default/Default/Queue/Bucket/OnCreate-OnMessage0/S3Object", + "uniqueId": "Queue_Bucket_OnCreate-OnMessage0_S3Object_D3C5CDCB" } }, "bucket": "${aws_s3_bucket.Code.bucket}", @@ -291,39 +291,39 @@ module.exports = function({ }) { } }, "aws_sns_topic": { - "Queue_Bucket_oncreate_793B52C5": { + "Queue_Bucket_OnCreate_DA88E2C3": { "//": { "metadata": { - "path": "root/Default/Default/Queue/Bucket/oncreate/Default", - "uniqueId": "Queue_Bucket_oncreate_793B52C5" + "path": "root/Default/Default/Queue/Bucket/OnCreate/Default", + "uniqueId": "Queue_Bucket_OnCreate_DA88E2C3" } }, - "name": "oncreate-c8dcd317" + "name": "OnCreate-c858cf97" } }, "aws_sns_topic_policy": { - "Queue_Bucket_oncreate_PublishPermission-c81048e6ea798f253db9714095de7ff4c76c443489_27F9C442": { + "Queue_Bucket_OnCreate_PublishPermission-c81048e6ea798f253db9714095de7ff4c76c443489_3E123A5B": { "//": { "metadata": { - "path": "root/Default/Default/Queue/Bucket/oncreate/PublishPermission-c81048e6ea798f253db9714095de7ff4c76c443489", - "uniqueId": "Queue_Bucket_oncreate_PublishPermission-c81048e6ea798f253db9714095de7ff4c76c443489_27F9C442" + "path": "root/Default/Default/Queue/Bucket/OnCreate/PublishPermission-c81048e6ea798f253db9714095de7ff4c76c443489", + "uniqueId": "Queue_Bucket_OnCreate_PublishPermission-c81048e6ea798f253db9714095de7ff4c76c443489_3E123A5B" } }, - "arn": "${aws_sns_topic.Queue_Bucket_oncreate_793B52C5.arn}", - "policy": "{\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"s3.amazonaws.com\"},\"Action\":\"sns:Publish\",\"Resource\":\"${aws_sns_topic.Queue_Bucket_oncreate_793B52C5.arn}\",\"Condition\":{\"ArnEquals\":{\"aws:SourceArn\":\"${aws_s3_bucket.Queue_Bucket_A87615FF.arn}\"}}}]}" + "arn": "${aws_sns_topic.Queue_Bucket_OnCreate_DA88E2C3.arn}", + "policy": "{\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"s3.amazonaws.com\"},\"Action\":\"sns:Publish\",\"Resource\":\"${aws_sns_topic.Queue_Bucket_OnCreate_DA88E2C3.arn}\",\"Condition\":{\"ArnEquals\":{\"aws:SourceArn\":\"${aws_s3_bucket.Queue_Bucket_A87615FF.arn}\"}}}]}" } }, "aws_sns_topic_subscription": { - "Queue_Bucket_oncreate_TopicSubscription0_1F6BA14E": { + "Queue_Bucket_OnCreate_TopicSubscription0_9E4D200B": { "//": { "metadata": { - "path": "root/Default/Default/Queue/Bucket/oncreate/TopicSubscription0", - "uniqueId": "Queue_Bucket_oncreate_TopicSubscription0_1F6BA14E" + "path": "root/Default/Default/Queue/Bucket/OnCreate/TopicSubscription0", + "uniqueId": "Queue_Bucket_OnCreate_TopicSubscription0_9E4D200B" } }, - "endpoint": "${aws_lambda_function.Queue_Bucket_oncreate-OnMessage0_E6447040.arn}", + "endpoint": "${aws_lambda_function.Queue_Bucket_OnCreate-OnMessage0_F7EE1690.arn}", "protocol": "lambda", - "topic_arn": "${aws_sns_topic.Queue_Bucket_oncreate_793B52C5.arn}" + "topic_arn": "${aws_sns_topic.Queue_Bucket_OnCreate_DA88E2C3.arn}" } } } diff --git a/tools/hangar/__snapshots__/test_corpus/valid/resource.test.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/resource.test.w_compile_tf-aws.md index c43fc4d5a66..068b3920520 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/resource.test.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/resource.test.w_compile_tf-aws.md @@ -264,14 +264,14 @@ module.exports = function({ }) { "name": "/aws/lambda/Topic-OnMessage0-c8bea057", "retention_in_days": 30 }, - "BigPublisher_b2_oncreate-OnMessage0_CloudwatchLogGroup_E98CA40A": { + "BigPublisher_b2_OnCreate-OnMessage0_CloudwatchLogGroup_8914F373": { "//": { "metadata": { - "path": "root/Default/Default/BigPublisher/b2/oncreate-OnMessage0/CloudwatchLogGroup", - "uniqueId": "BigPublisher_b2_oncreate-OnMessage0_CloudwatchLogGroup_E98CA40A" + "path": "root/Default/Default/BigPublisher/b2/OnCreate-OnMessage0/CloudwatchLogGroup", + "uniqueId": "BigPublisher_b2_OnCreate-OnMessage0_CloudwatchLogGroup_8914F373" } }, - "name": "/aws/lambda/oncreate-OnMessage0-c8946df1", + "name": "/aws/lambda/OnCreate-OnMessage0-c8ab841c", "retention_in_days": 30 } }, @@ -313,11 +313,11 @@ module.exports = function({ }) { }, "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" }, - "BigPublisher_b2_oncreate-OnMessage0_IamRole_FF154497": { + "BigPublisher_b2_OnCreate-OnMessage0_IamRole_2B7C8C04": { "//": { "metadata": { - "path": "root/Default/Default/BigPublisher/b2/oncreate-OnMessage0/IamRole", - "uniqueId": "BigPublisher_b2_oncreate-OnMessage0_IamRole_FF154497" + "path": "root/Default/Default/BigPublisher/b2/OnCreate-OnMessage0/IamRole", + "uniqueId": "BigPublisher_b2_OnCreate-OnMessage0_IamRole_2B7C8C04" } }, "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" @@ -344,15 +344,15 @@ module.exports = function({ }) { "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"s3:PutObject*\",\"s3:Abort*\"],\"Resource\":[\"${aws_s3_bucket.BigPublisher_Bucket_F4CC95F6.arn}\",\"${aws_s3_bucket.BigPublisher_Bucket_F4CC95F6.arn}/*\"],\"Effect\":\"Allow\"}]}", "role": "${aws_iam_role.BigPublisher_Topic-OnMessage0_IamRole_FEF4CFBB.name}" }, - "BigPublisher_b2_oncreate-OnMessage0_IamRolePolicy_983EC08F": { + "BigPublisher_b2_OnCreate-OnMessage0_IamRolePolicy_7D531F15": { "//": { "metadata": { - "path": "root/Default/Default/BigPublisher/b2/oncreate-OnMessage0/IamRolePolicy", - "uniqueId": "BigPublisher_b2_oncreate-OnMessage0_IamRolePolicy_983EC08F" + "path": "root/Default/Default/BigPublisher/b2/OnCreate-OnMessage0/IamRolePolicy", + "uniqueId": "BigPublisher_b2_OnCreate-OnMessage0_IamRolePolicy_7D531F15" } }, "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"sqs:GetQueueUrl\"],\"Resource\":[\"${aws_sqs_queue.BigPublisher_Queue_2C024F97.arn}\"],\"Effect\":\"Allow\"},{\"Action\":[\"sqs:SendMessage\"],\"Resource\":[\"${aws_sqs_queue.BigPublisher_Queue_2C024F97.arn}\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.BigPublisher_b2_oncreate-OnMessage0_IamRole_FF154497.name}" + "role": "${aws_iam_role.BigPublisher_b2_OnCreate-OnMessage0_IamRole_2B7C8C04.name}" } }, "aws_iam_role_policy_attachment": { @@ -376,15 +376,15 @@ module.exports = function({ }) { "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", "role": "${aws_iam_role.BigPublisher_Topic-OnMessage0_IamRole_FEF4CFBB.name}" }, - "BigPublisher_b2_oncreate-OnMessage0_IamRolePolicyAttachment_7DE224FF": { + "BigPublisher_b2_OnCreate-OnMessage0_IamRolePolicyAttachment_56FA395A": { "//": { "metadata": { - "path": "root/Default/Default/BigPublisher/b2/oncreate-OnMessage0/IamRolePolicyAttachment", - "uniqueId": "BigPublisher_b2_oncreate-OnMessage0_IamRolePolicyAttachment_7DE224FF" + "path": "root/Default/Default/BigPublisher/b2/OnCreate-OnMessage0/IamRolePolicyAttachment", + "uniqueId": "BigPublisher_b2_OnCreate-OnMessage0_IamRolePolicyAttachment_56FA395A" } }, "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.BigPublisher_b2_oncreate-OnMessage0_IamRole_FF154497.name}" + "role": "${aws_iam_role.BigPublisher_b2_OnCreate-OnMessage0_IamRole_2B7C8C04.name}" } }, "aws_lambda_event_source_mapping": { @@ -468,11 +468,11 @@ module.exports = function({ }) { "subnet_ids": [] } }, - "BigPublisher_b2_oncreate-OnMessage0_3ECAAB35": { + "BigPublisher_b2_OnCreate-OnMessage0_F967A96B": { "//": { "metadata": { - "path": "root/Default/Default/BigPublisher/b2/oncreate-OnMessage0/Default", - "uniqueId": "BigPublisher_b2_oncreate-OnMessage0_3ECAAB35" + "path": "root/Default/Default/BigPublisher/b2/OnCreate-OnMessage0/Default", + "uniqueId": "BigPublisher_b2_OnCreate-OnMessage0_F967A96B" } }, "architectures": [ @@ -482,18 +482,18 @@ module.exports = function({ }) { "variables": { "NODE_OPTIONS": "--enable-source-maps", "QUEUE_URL_cb1bcecf": "${aws_sqs_queue.BigPublisher_Queue_2C024F97.url}", - "WING_FUNCTION_NAME": "oncreate-OnMessage0-c8946df1", + "WING_FUNCTION_NAME": "OnCreate-OnMessage0-c8ab841c", "WING_TARGET": "tf-aws" } }, - "function_name": "oncreate-OnMessage0-c8946df1", + "function_name": "OnCreate-OnMessage0-c8ab841c", "handler": "index.handler", "memory_size": 1024, "publish": true, - "role": "${aws_iam_role.BigPublisher_b2_oncreate-OnMessage0_IamRole_FF154497.arn}", + "role": "${aws_iam_role.BigPublisher_b2_OnCreate-OnMessage0_IamRole_2B7C8C04.arn}", "runtime": "nodejs20.x", "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.BigPublisher_b2_oncreate-OnMessage0_S3Object_1489E104.key}", + "s3_key": "${aws_s3_object.BigPublisher_b2_OnCreate-OnMessage0_S3Object_75F3ED03.key}", "timeout": 60, "vpc_config": { "security_group_ids": [], @@ -514,17 +514,17 @@ module.exports = function({ }) { "principal": "sns.amazonaws.com", "source_arn": "${aws_sns_topic.BigPublisher_Topic_F8E12E52.arn}" }, - "BigPublisher_b2_oncreate-OnMessage0_InvokePermission-c849e824f9ffcc17825860cf0b7344a60826b3ba1a_9E58F097": { + "BigPublisher_b2_OnCreate-OnMessage0_InvokePermission-c8957161bd24a9a75910007bdeef4fc517fd85b21a_AB564705": { "//": { "metadata": { - "path": "root/Default/Default/BigPublisher/b2/oncreate-OnMessage0/InvokePermission-c849e824f9ffcc17825860cf0b7344a60826b3ba1a", - "uniqueId": "BigPublisher_b2_oncreate-OnMessage0_InvokePermission-c849e824f9ffcc17825860cf0b7344a60826b3ba1a_9E58F097" + "path": "root/Default/Default/BigPublisher/b2/OnCreate-OnMessage0/InvokePermission-c8957161bd24a9a75910007bdeef4fc517fd85b21a", + "uniqueId": "BigPublisher_b2_OnCreate-OnMessage0_InvokePermission-c8957161bd24a9a75910007bdeef4fc517fd85b21a_AB564705" } }, "action": "lambda:InvokeFunction", - "function_name": "${aws_lambda_function.BigPublisher_b2_oncreate-OnMessage0_3ECAAB35.function_name}", + "function_name": "${aws_lambda_function.BigPublisher_b2_OnCreate-OnMessage0_F967A96B.function_name}", "principal": "sns.amazonaws.com", - "source_arn": "${aws_sns_topic.BigPublisher_b2_oncreate_44F68983.arn}" + "source_arn": "${aws_sns_topic.BigPublisher_b2_OnCreate_25B21222.arn}" } }, "aws_s3_bucket": { @@ -578,7 +578,7 @@ module.exports = function({ }) { }, "bucket": "${aws_s3_bucket.BigPublisher_b2_702AC841.id}", "depends_on": [ - "aws_sns_topic_policy.BigPublisher_b2_oncreate_PublishPermission-c851683a81379a8ef8351c83fe31924055584271ad_8A5E9A05" + "aws_sns_topic_policy.BigPublisher_b2_OnCreate_PublishPermission-c851683a81379a8ef8351c83fe31924055584271ad_4DA82EC3" ], "topic": [ { @@ -586,7 +586,7 @@ module.exports = function({ }) { "s3:ObjectCreated:Put" ], "id": "on-oncreate-notification", - "topic_arn": "${aws_sns_topic.BigPublisher_b2_oncreate_44F68983.arn}" + "topic_arn": "${aws_sns_topic.BigPublisher_b2_OnCreate_25B21222.arn}" } ] } @@ -614,11 +614,11 @@ module.exports = function({ }) { "key": "", "source": "" }, - "BigPublisher_b2_oncreate-OnMessage0_S3Object_1489E104": { + "BigPublisher_b2_OnCreate-OnMessage0_S3Object_75F3ED03": { "//": { "metadata": { - "path": "root/Default/Default/BigPublisher/b2/oncreate-OnMessage0/S3Object", - "uniqueId": "BigPublisher_b2_oncreate-OnMessage0_S3Object_1489E104" + "path": "root/Default/Default/BigPublisher/b2/OnCreate-OnMessage0/S3Object", + "uniqueId": "BigPublisher_b2_OnCreate-OnMessage0_S3Object_75F3ED03" } }, "bucket": "${aws_s3_bucket.Code.bucket}", @@ -636,26 +636,26 @@ module.exports = function({ }) { }, "name": "Topic-c884cd53" }, - "BigPublisher_b2_oncreate_44F68983": { + "BigPublisher_b2_OnCreate_25B21222": { "//": { "metadata": { - "path": "root/Default/Default/BigPublisher/b2/oncreate/Default", - "uniqueId": "BigPublisher_b2_oncreate_44F68983" + "path": "root/Default/Default/BigPublisher/b2/OnCreate/Default", + "uniqueId": "BigPublisher_b2_OnCreate_25B21222" } }, - "name": "oncreate-c849e824" + "name": "OnCreate-c8957161" } }, "aws_sns_topic_policy": { - "BigPublisher_b2_oncreate_PublishPermission-c851683a81379a8ef8351c83fe31924055584271ad_8A5E9A05": { + "BigPublisher_b2_OnCreate_PublishPermission-c851683a81379a8ef8351c83fe31924055584271ad_4DA82EC3": { "//": { "metadata": { - "path": "root/Default/Default/BigPublisher/b2/oncreate/PublishPermission-c851683a81379a8ef8351c83fe31924055584271ad", - "uniqueId": "BigPublisher_b2_oncreate_PublishPermission-c851683a81379a8ef8351c83fe31924055584271ad_8A5E9A05" + "path": "root/Default/Default/BigPublisher/b2/OnCreate/PublishPermission-c851683a81379a8ef8351c83fe31924055584271ad", + "uniqueId": "BigPublisher_b2_OnCreate_PublishPermission-c851683a81379a8ef8351c83fe31924055584271ad_4DA82EC3" } }, - "arn": "${aws_sns_topic.BigPublisher_b2_oncreate_44F68983.arn}", - "policy": "{\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"s3.amazonaws.com\"},\"Action\":\"sns:Publish\",\"Resource\":\"${aws_sns_topic.BigPublisher_b2_oncreate_44F68983.arn}\",\"Condition\":{\"ArnEquals\":{\"aws:SourceArn\":\"${aws_s3_bucket.BigPublisher_b2_702AC841.arn}\"}}}]}" + "arn": "${aws_sns_topic.BigPublisher_b2_OnCreate_25B21222.arn}", + "policy": "{\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"s3.amazonaws.com\"},\"Action\":\"sns:Publish\",\"Resource\":\"${aws_sns_topic.BigPublisher_b2_OnCreate_25B21222.arn}\",\"Condition\":{\"ArnEquals\":{\"aws:SourceArn\":\"${aws_s3_bucket.BigPublisher_b2_702AC841.arn}\"}}}]}" } }, "aws_sns_topic_subscription": { @@ -670,16 +670,16 @@ module.exports = function({ }) { "protocol": "lambda", "topic_arn": "${aws_sns_topic.BigPublisher_Topic_F8E12E52.arn}" }, - "BigPublisher_b2_oncreate_TopicSubscription0_692E956B": { + "BigPublisher_b2_OnCreate_TopicSubscription0_E6A5285C": { "//": { "metadata": { - "path": "root/Default/Default/BigPublisher/b2/oncreate/TopicSubscription0", - "uniqueId": "BigPublisher_b2_oncreate_TopicSubscription0_692E956B" + "path": "root/Default/Default/BigPublisher/b2/OnCreate/TopicSubscription0", + "uniqueId": "BigPublisher_b2_OnCreate_TopicSubscription0_E6A5285C" } }, - "endpoint": "${aws_lambda_function.BigPublisher_b2_oncreate-OnMessage0_3ECAAB35.arn}", + "endpoint": "${aws_lambda_function.BigPublisher_b2_OnCreate-OnMessage0_F967A96B.arn}", "protocol": "lambda", - "topic_arn": "${aws_sns_topic.BigPublisher_b2_oncreate_44F68983.arn}" + "topic_arn": "${aws_sns_topic.BigPublisher_b2_OnCreate_25B21222.arn}" } }, "aws_sqs_queue": { diff --git a/tools/hangar/__snapshots__/tree_json.ts.snap b/tools/hangar/__snapshots__/tree_json.ts.snap index dc0ca6ea343..2714d9cf470 100644 --- a/tools/hangar/__snapshots__/tree_json.ts.snap +++ b/tools/hangar/__snapshots__/tree_json.ts.snap @@ -382,16 +382,7 @@ exports[`tree.json for an app with many resources 1`] = ` "id": "Default", "path": "root/Default/Default/BigPublisher/b2/Default", }, - "S3BucketNotification": { - "constructInfo": { - "fqn": "cdktf.TerraformResource", - "version": "0.20.3", - }, - "display": {}, - "id": "S3BucketNotification", - "path": "root/Default/Default/BigPublisher/b2/S3BucketNotification", - }, - "oncreate": { + "OnCreate": { "children": { "Default": { "constructInfo": { @@ -400,7 +391,7 @@ exports[`tree.json for an app with many resources 1`] = ` }, "display": {}, "id": "Default", - "path": "root/Default/Default/BigPublisher/b2/oncreate/Default", + "path": "root/Default/Default/BigPublisher/b2/OnCreate/Default", }, "PublishPermission-c851683a81379a8ef8351c83fe31924055584271ad": { "constructInfo": { @@ -409,7 +400,7 @@ exports[`tree.json for an app with many resources 1`] = ` }, "display": {}, "id": "PublishPermission-c851683a81379a8ef8351c83fe31924055584271ad", - "path": "root/Default/Default/BigPublisher/b2/oncreate/PublishPermission-c851683a81379a8ef8351c83fe31924055584271ad", + "path": "root/Default/Default/BigPublisher/b2/OnCreate/PublishPermission-c851683a81379a8ef8351c83fe31924055584271ad", }, "TopicSubscription0": { "constructInfo": { @@ -418,7 +409,7 @@ exports[`tree.json for an app with many resources 1`] = ` }, "display": {}, "id": "TopicSubscription0", - "path": "root/Default/Default/BigPublisher/b2/oncreate/TopicSubscription0", + "path": "root/Default/Default/BigPublisher/b2/OnCreate/TopicSubscription0", }, }, "constructInfo": { @@ -429,10 +420,10 @@ exports[`tree.json for an app with many resources 1`] = ` "description": "A pub/sub notification topic", "title": "Topic", }, - "id": "oncreate", - "path": "root/Default/Default/BigPublisher/b2/oncreate", + "id": "OnCreate", + "path": "root/Default/Default/BigPublisher/b2/OnCreate", }, - "oncreate-OnMessage0": { + "OnCreate-OnMessage0": { "children": { "Asset": { "constructInfo": { @@ -441,7 +432,7 @@ exports[`tree.json for an app with many resources 1`] = ` }, "display": {}, "id": "Asset", - "path": "root/Default/Default/BigPublisher/b2/oncreate-OnMessage0/Asset", + "path": "root/Default/Default/BigPublisher/b2/OnCreate-OnMessage0/Asset", }, "CloudwatchLogGroup": { "constructInfo": { @@ -450,7 +441,7 @@ exports[`tree.json for an app with many resources 1`] = ` }, "display": {}, "id": "CloudwatchLogGroup", - "path": "root/Default/Default/BigPublisher/b2/oncreate-OnMessage0/CloudwatchLogGroup", + "path": "root/Default/Default/BigPublisher/b2/OnCreate-OnMessage0/CloudwatchLogGroup", }, "Default": { "constructInfo": { @@ -459,7 +450,7 @@ exports[`tree.json for an app with many resources 1`] = ` }, "display": {}, "id": "Default", - "path": "root/Default/Default/BigPublisher/b2/oncreate-OnMessage0/Default", + "path": "root/Default/Default/BigPublisher/b2/OnCreate-OnMessage0/Default", }, "IamRole": { "constructInfo": { @@ -468,7 +459,7 @@ exports[`tree.json for an app with many resources 1`] = ` }, "display": {}, "id": "IamRole", - "path": "root/Default/Default/BigPublisher/b2/oncreate-OnMessage0/IamRole", + "path": "root/Default/Default/BigPublisher/b2/OnCreate-OnMessage0/IamRole", }, "IamRolePolicy": { "constructInfo": { @@ -477,7 +468,7 @@ exports[`tree.json for an app with many resources 1`] = ` }, "display": {}, "id": "IamRolePolicy", - "path": "root/Default/Default/BigPublisher/b2/oncreate-OnMessage0/IamRolePolicy", + "path": "root/Default/Default/BigPublisher/b2/OnCreate-OnMessage0/IamRolePolicy", }, "IamRolePolicyAttachment": { "constructInfo": { @@ -486,16 +477,16 @@ exports[`tree.json for an app with many resources 1`] = ` }, "display": {}, "id": "IamRolePolicyAttachment", - "path": "root/Default/Default/BigPublisher/b2/oncreate-OnMessage0/IamRolePolicyAttachment", + "path": "root/Default/Default/BigPublisher/b2/OnCreate-OnMessage0/IamRolePolicyAttachment", }, - "InvokePermission-c849e824f9ffcc17825860cf0b7344a60826b3ba1a": { + "InvokePermission-c8957161bd24a9a75910007bdeef4fc517fd85b21a": { "constructInfo": { "fqn": "cdktf.TerraformResource", "version": "0.20.3", }, "display": {}, - "id": "InvokePermission-c849e824f9ffcc17825860cf0b7344a60826b3ba1a", - "path": "root/Default/Default/BigPublisher/b2/oncreate-OnMessage0/InvokePermission-c849e824f9ffcc17825860cf0b7344a60826b3ba1a", + "id": "InvokePermission-c8957161bd24a9a75910007bdeef4fc517fd85b21a", + "path": "root/Default/Default/BigPublisher/b2/OnCreate-OnMessage0/InvokePermission-c8957161bd24a9a75910007bdeef4fc517fd85b21a", }, "S3Object": { "constructInfo": { @@ -504,7 +495,7 @@ exports[`tree.json for an app with many resources 1`] = ` }, "display": {}, "id": "S3Object", - "path": "root/Default/Default/BigPublisher/b2/oncreate-OnMessage0/S3Object", + "path": "root/Default/Default/BigPublisher/b2/OnCreate-OnMessage0/S3Object", }, }, "constructInfo": { @@ -515,8 +506,17 @@ exports[`tree.json for an app with many resources 1`] = ` "description": "A cloud function (FaaS)", "title": "Function", }, - "id": "oncreate-OnMessage0", - "path": "root/Default/Default/BigPublisher/b2/oncreate-OnMessage0", + "id": "OnCreate-OnMessage0", + "path": "root/Default/Default/BigPublisher/b2/OnCreate-OnMessage0", + }, + "S3BucketNotification": { + "constructInfo": { + "fqn": "cdktf.TerraformResource", + "version": "0.20.3", + }, + "display": {}, + "id": "S3BucketNotification", + "path": "root/Default/Default/BigPublisher/b2/S3BucketNotification", }, }, "constructInfo": {