Skip to content

Commit 45a50df

Browse files
committed
chore: multiple fixes and changes to align all runtime implementations and their respective cookie-cutters
1 parent f3f9c18 commit 45a50df

File tree

9 files changed

+42
-34
lines changed

9 files changed

+42
-34
lines changed

unicorn_contracts/integration/subscriber-policies.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
# SPDX-License-Identifier: MIT-0
33
AWSTemplateFormatVersion: "2010-09-09"
4-
Description: |
4+
Description: >
55
Defines the event bus policies that determine who can create rules on the event bus to
66
subscribe to events published by the Contracts Service.
77

unicorn_contracts/template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Globals:
6161
POWERTOOLS_LOGGER_SAMPLE_RATE: !If [IsProd, "0.1", "0"] # Debug log sampling percentage, default
6262
POWERTOOLS_METRICS_NAMESPACE: !Sub "{{resolve:ssm:/uni-prop/${Stage}/UnicornContractsNamespace}}"
6363
POWERTOOLS_LOG_LEVEL: INFO # Log level for Logger (INFO, DEBUG, etc.), default
64-
LOG_LEVEL: INFO # Log level for Logger (INFO, DEBUG, etc.), default
64+
LOG_LEVEL: INFO # Log level for Logger
6565
Tags:
6666
stage: !Ref Stage
6767
project: !FindInMap [Constants, ProjectName, Value]

unicorn_properties/integration/event-schemas.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Resources:
2626
RegistryName:
2727
Fn::GetAtt: EventRegistry.RegistryName
2828
Policy:
29-
Version: '2012-10-17'
29+
Version: "2012-10-17"
3030
Statement:
3131
- Sid: AllowExternalServices
3232
Effect: Allow

unicorn_properties/integration/subscriber-policies.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
# SPDX-License-Identifier: MIT-0
33
AWSTemplateFormatVersion: '2010-09-09'
4-
Description: |
4+
Description: >
55
Defines the event bus policies that determine who can create rules on the event bus to
66
subscribe to events published by Unicorn Properties Service.
77

unicorn_properties/integration/subscriptions.yaml

Lines changed: 34 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -13,42 +13,47 @@ Parameters:
1313
- prod
1414

1515
Resources:
16-
1716
#### UNICORN CONTRACTS EVENT SUBSCRIPTIONS
1817
ContractStatusChangedSubscriptionRule:
1918
Type: AWS::Events::Rule
2019
Properties:
2120
Name: unicorn.properties-ContractStatusChanged
2221
Description: Contract Status Changed subscription
23-
EventBusName: !Sub "{{resolve:ssm:/uni-prop/${Stage}/UnicornContractsEventBusArn}}"
22+
EventBusName:
23+
Fn::Sub: "{{resolve:ssm:/uni-prop/${Stage}/UnicornContractsEventBusArn}}"
2424
EventPattern:
2525
source:
26-
- !Sub "{{resolve:ssm:/uni-prop/${Stage}/UnicornContractsNamespace}}"
26+
- Fn::Sub: "{{resolve:ssm:/uni-prop/${Stage}/UnicornContractsNamespace}}"
2727
detail-type:
2828
- ContractStatusChanged
2929
State: ENABLED
3030
Targets:
3131
- Id: SendEventTo
32-
Arn: !Sub "{{resolve:ssm:/uni-prop/${Stage}/UnicornPropertiesEventBusArn}}"
33-
RoleArn: !GetAtt UnicornPropertiesSubscriptionRole.Arn
32+
Arn:
33+
Fn::Sub: "{{resolve:ssm:/uni-prop/${Stage}/UnicornPropertiesEventBusArn}}"
34+
RoleArn:
35+
Fn::GetAtt: UnicornPropertiesSubscriptionRole.Arn
3436

3537
#### UNICORN WEB EVENT SUBSCRIPTIONS
36-
# PublicationApprovalRequestedSubscriptionRule:
37-
# Type: AWS::Events::Rule
38-
# Properties:
39-
# Name: unicorn.properties-PublicationApprovalRequested
40-
# Description: Publication evaluation completed subscription
41-
# EventBusName: !Sub "{{resolve:ssm:/uni-prop/${Stage}/UnicornWebEventBusArn}}"
42-
# EventPattern:
43-
# source:
44-
# - !Sub "{{resolve:ssm:/uni-prop/${Stage}/UnicornWebNamespace}}"
45-
# detail-type:
46-
# - PublicationApprovalRequested
47-
# State: ENABLED
48-
# Targets:
49-
# - Id: SendEventTo
50-
# Arn: !Sub "{{resolve:ssm:/uni-prop/${Stage}/UnicornPropertiesEventBusArn}}"
51-
# RoleArn: !GetAtt UnicornPropertiesSubscriptionRole.Arn
38+
PublicationApprovalRequestedSubscriptionRule:
39+
Type: AWS::Events::Rule
40+
Properties:
41+
Name: unicorn.properties-PublicationApprovalRequested
42+
Description: Publication evaluation completed subscription
43+
EventBusName:
44+
Fn::Sub: "{{resolve:ssm:/uni-prop/${Stage}/UnicornWebEventBusArn}}"
45+
EventPattern:
46+
source:
47+
- Fn::Sub: "{{resolve:ssm:/uni-prop/${Stage}/UnicornWebNamespace}}"
48+
detail-type:
49+
- PublicationApprovalRequested
50+
State: ENABLED
51+
Targets:
52+
- Id: SendEventTo
53+
Arn:
54+
Fn::Sub: "{{resolve:ssm:/uni-prop/${Stage}/UnicornPropertiesEventBusArn}}"
55+
RoleArn:
56+
Fn::GetAtt: UnicornPropertiesSubscriptionRole.Arn
5257

5358

5459
# This IAM role allows EventBridge to assume the permissions necessary to send events
@@ -69,13 +74,16 @@ Resources:
6974
Statement:
7075
- Effect: Allow
7176
Action: events:PutEvents
72-
Resource: !Sub "{{resolve:ssm:/uni-prop/${Stage}/UnicornPropertiesEventBusArn}}"
77+
Resource:
78+
Fn::Sub: "{{resolve:ssm:/uni-prop/${Stage}/UnicornPropertiesEventBusArn}}"
7379

7480
Outputs:
7581
ContractStatusChangedSubscription:
7682
Description: Rule ARN for Contract service event subscription
77-
Value: !GetAtt ContractStatusChangedSubscriptionRule.Arn
83+
Value:
84+
Fn::GetAtt: ContractStatusChangedSubscriptionRule.Arn
7885

79-
# PublicationApprovalRequestedSubscription:
80-
# Description: Rule ARN for Web service event subscription
81-
# Value: !GetAtt PublicationApprovalRequestedSubscriptionRule.Arn
86+
PublicationApprovalRequestedSubscription:
87+
Description: Rule ARN for Web service event subscription
88+
Value:
89+
Fn::GetAtt: PublicationApprovalRequestedSubscriptionRule.Arn

unicorn_properties/template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Globals:
6060
POWERTOOLS_LOGGER_SAMPLE_RATE: !If [IsProd, "0.1", "0"] # Debug log sampling percentage, default
6161
POWERTOOLS_METRICS_NAMESPACE: !Sub "{{resolve:ssm:/uni-prop/${Stage}/UnicornPropertiesNamespace}}"
6262
POWERTOOLS_LOG_LEVEL: INFO # Log level for Logger (INFO, DEBUG, etc.), default
63-
LOG_LEVEL: INFO # Log level for Logger (INFO, DEBUG, etc.), default
63+
LOG_LEVEL: INFO # Log level for Logger
6464
Tags:
6565
stage: !Ref Stage
6666
project: !FindInMap [Constants, ProjectName, Value]

unicorn_web/integration/event-schemas.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Resources:
2626
RegistryName:
2727
Fn::GetAtt: EventRegistry.RegistryName
2828
Policy:
29-
Version: '2012-10-17'
29+
Version: "2012-10-17"
3030
Statement:
3131
- Sid: AllowExternalServices
3232
Effect: Allow

unicorn_web/integration/subscriber-policies.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
# SPDX-License-Identifier: MIT-0
33
AWSTemplateFormatVersion: '2010-09-09'
4-
Description: |
4+
Description: >
55
Defines the event bus policies that determine who can create rules on the event bus to
66
subscribe to events published by Unicorn Web Service.
77

unicorn_web/template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Globals:
6262
POWERTOOLS_LOGGER_SAMPLE_RATE: !If [IsProd, "0.1", "0"] # Debug log sampling percentage, default
6363
POWERTOOLS_METRICS_NAMESPACE: !Sub "{{resolve:ssm:/uni-prop/${Stage}/UnicornWebNamespace}}"
6464
POWERTOOLS_LOG_LEVEL: INFO # Log level for Logger (INFO, DEBUG, etc.), default
65-
LOG_LEVEL: INFO # Log level for Logger (INFO, DEBUG, etc.), default
65+
LOG_LEVEL: INFO # Log level for Logger
6666
Tags:
6767
stage: !Ref Stage
6868
project: !FindInMap [Constants, ProjectName, Value]

0 commit comments

Comments
 (0)