Skip to content

Commit

Permalink
feat!: update output names
Browse files Browse the repository at this point in the history
This commit normalizes all parameter and output names.

BREAKING CHANGE: The `firehose` app has been removed. App parameters and
outputs have been renamed for consistency. Please refer to individual
app documentation for information on current parameter and output names.
  • Loading branch information
jta committed Jun 18, 2024
1 parent 07e5a5a commit 592f465
Show file tree
Hide file tree
Showing 21 changed files with 260 additions and 412 deletions.
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,13 @@ parameters-%:
@echo "|-----------------|---------|-------------|"
@python3 -c 'import sys, yaml, json; y=yaml.safe_load(sys.stdin.read()); print(json.dumps(y))' < $(SAM_BUILD_DIR)/regions/$(AWS_REGION)/$(lastword $(subst -, , $@)).yaml | jq -r '.Parameters | to_entries[] | "| \(if .value.Default then "" else "**" end)`\(.key)`\(if .value.Default then "" else "**" end) | \(.value.Type) | \(.value.Description | gsub("[\\n\\t]"; " ")) |"'


.PHONY: parameters
outputs-%:
@echo "| Output | Description |"
@echo "|-----------------|-------------|"
@python3 -c 'import sys, yaml, json; y=yaml.safe_load(sys.stdin.read()); print(json.dumps(y))' < $(SAM_BUILD_DIR)/regions/$(AWS_REGION)/$(lastword $(subst -, , $@)).yaml | jq -r '.Outputs | to_entries[] | "| \(.key) | \(.value.Description | gsub("[\\n\\t]"; " ")) |"'

help: # @HELP displays this message.
help:
echo "VARIABLES:"
Expand Down
10 changes: 5 additions & 5 deletions apps/config/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Metadata:
Parameters:
- BucketName
- Prefix
- TopicARN
- TopicArn
- Label:
default: How often
Parameters:
Expand All @@ -40,7 +40,7 @@ Parameters:
Type: String
Description: >-
The name of the S3 bucket used to store the configuration history.
TopicARN:
TopicArn:
Type: String
Description: >-
The ARN of the SNS topic that AWS Config delivers notifications to.
Expand Down Expand Up @@ -91,7 +91,7 @@ Parameters:

Conditions:
DisableSNS: !Equals
- !Ref TopicARN
- !Ref TopicArn
- ""
EnableConfig: !Not
- !Equals
Expand Down Expand Up @@ -170,7 +170,7 @@ Resources:
- Effect: Allow
Action:
- sns:Publish
Resource: !Ref TopicARN
Resource: !Ref TopicArn
ConfigurationRecorder:
Type: AWS::Config::ConfigurationRecorder
Condition: EnableConfig
Expand Down Expand Up @@ -217,4 +217,4 @@ Resources:
SnsTopicARN: !If
- DisableSNS
- !Ref AWS::NoValue
- !Ref TopicARN
- !Ref TopicArn
8 changes: 4 additions & 4 deletions apps/configsubscription/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Metadata:
SourceCodeUrl: https://github.com/observeinc/aws-sam-apps

Parameters:
TargetARN:
TargetArn:
Type: String
Description: >-
Where to forward EventBridge events.
Expand All @@ -38,7 +38,7 @@ Resources:
- "ConfigurationHistoryDeliveryCompleted"
- "ConfigurationSnapshotDeliveryCompleted"
Targets:
- Arn: !Ref TargetARN
- Arn: !Ref TargetArn
Id: "AWSConfigDelivery"
InputTransformer:
InputPathsMap:
Expand All @@ -57,7 +57,7 @@ Resources:
messageType:
- "OversizedConfigurationItemChangeNotification"
Targets:
- Arn: !Ref TargetARN
- Arn: !Ref TargetArn
Id: "AWSConfigOversizedDelivery"
InputTransformer:
InputPathsMap:
Expand All @@ -74,5 +74,5 @@ Resources:
detail-type:
- "Config Configuration Item Change"
Targets:
- Arn: !Ref TargetARN
- Arn: !Ref TargetArn
Id: "AWSConfigChange"
3 changes: 0 additions & 3 deletions apps/firehose/README.md

This file was deleted.

179 changes: 0 additions & 179 deletions apps/firehose/template.yaml

This file was deleted.

25 changes: 17 additions & 8 deletions apps/forwarder/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -466,15 +466,24 @@ Resources:
OTEL_EXPORTER_OTLP_ENDPOINT: !Ref DebugEndpoint
OTEL_TRACES_EXPORTER: !If [DisableOTEL, "none", "otlp"]
Outputs:
Function:
Description: "Lambda Function ARN"
Value: !GetAtt Forwarder.Arn
Queue:
Description: "SQS Queue ARN"
QueueArn:
Description: >-
Forwarder Queue ARN. Events sent to this queue will be forwarded to
Observe. s3:ObjectCreated events will initiate an object copy to
destination.
Value: !GetAtt Queue.Arn
Role:
Description: "IAM Role ARN"
ForwarderArn:
Description: >-
Forwarder Function ARN. This is the Lambda function responsible for
forwarding objects to Observe.
Value: !GetAtt Forwarder.Arn
RoleArn:
Description: >-
Forwarder Role ARN. This role will be assumed by the Forwarder Lambda
Function in order to write data to destination.
Value: !GetAtt Role.Arn
LogGroupName:
Description: "Log Group Name"
Description: >-
Forwarder Log Group Name. This log group contains useful information for
debugging the Forwarder Lambda.
Value: !Ref LogGroup
47 changes: 37 additions & 10 deletions apps/logwriter/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Metadata:
- Label:
default: Destination settings
Parameters:
- BucketARN
- BucketArn
- Prefix
- Label:
default: Subscription settings
Expand All @@ -45,7 +45,7 @@ Metadata:
- DebugEndpoint
- Verbosity
Parameters:
BucketARN:
BucketArn:
Type: String
Description: >-
S3 Bucket ARN to write log records to.
Expand Down Expand Up @@ -234,8 +234,8 @@ Resources:
- s3:ListBucketMultipartUploads
- s3:PutObject
Resource:
- !Ref BucketARN
- !Sub '${BucketARN}/${Prefix}*'
- !Ref BucketArn
- !Sub '${BucketArn}/${Prefix}*'
FirehoseLogGroup:
Type: 'AWS::Logs::LogGroup'
Properties:
Expand All @@ -261,7 +261,7 @@ Resources:
- !Ref NameOverride
DeliveryStreamType: DirectPut
S3DestinationConfiguration:
BucketARN: !Ref BucketARN
BucketARN: !Ref BucketArn
RoleARN: !GetAtt FirehoseRole.Arn
# yamllint disable-line rule:line-length
Prefix: !Sub '${Prefix}AWSLogs/${AWS::AccountId}/cloudwatchlogs/${AWS::Region}/'
Expand Down Expand Up @@ -544,10 +544,37 @@ Resources:
- !Ref LogGroupNamePrefixes
- []
Outputs:
Function:
Description: "Lambda Function ARN"
FirehoseArn:
Description: >-
Kinesis Firehose Delivery Stream ARN. CloudWatch Log Groups subscribed to
this Firehose will have their logs batched and written to S3.
Value: !GetAtt DeliveryStream.Arn
DestinationRoleArn:
Description: >-
ARN for IAM Role to be assumed by CloudWatch for log delivery. This value
is required when configuring a subscription towards the Firehose Delivery
Stream.
Value: !GetAtt DestinationRole.Arn
FirehoseLogGroupName:
Description: >-
Firehose Log Group Name. These logs may contain useful information for
debugging Firehose delivery to S3.
Value: !Ref FirehoseLogGroup
SubscriberArn:
Description: >-
Subscriber Function ARN. This function is responsible for log group
discovery, filtering and subscription.
Condition: EnableSubscription
Value: !GetAtt Subscriber.Arn
Firehose:
Description: "Kinesis Firehose Delivery Stream ARN"
Value: !GetAtt DeliveryStream.Arn
SubscriberQueueArn:
Description: >-
Subscriber Queue ARN. This queue is used by the subscriber function to
fan out execution of subscription requests.
Condition: EnableSubscription
Value: !GetAtt Queue.Arn
SubscriberLogGroupName:
Description: >-
Subscriber Log Group Name. This log group contains useful information for
debugging the Subscriber function.
Condition: EnableSubscription
Value: !Ref SubscriberLogGroup
Loading

0 comments on commit 592f465

Please sign in to comment.