Skip to content

Commit

Permalink
fix: cloudwatch-metrics - update filters for MetricsStream resource
Browse files Browse the repository at this point in the history
  • Loading branch information
jharley committed Nov 14, 2024
1 parent 7274ca5 commit 93e6623
Showing 1 changed file with 40 additions and 34 deletions.
74 changes: 40 additions & 34 deletions templates/cloudwatch-metrics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ Parameters:

Conditions:
CreateKinesisFirehose: !Equals [!Ref KinesisFirehoseArn, ""]
IsIncludeFilter: !Equals [!Ref MetricFilterMethod, "Include"]
IsExcludeFilter: !Not [!Equals [!Ref MetricFilterMethod, "Include"]]
EnableIncludeNamespace:
!And [
!Not [!Equals [!Ref FilterNamespace, ""]],
Expand Down Expand Up @@ -213,40 +215,44 @@ Resources:
- CreateKinesisFirehose
- !GetAtt KinesisToHoneycombStack.Outputs.KinesisDeliveryStreamArn
- Ref: KinesisFirehoseArn
IncludeFilters:
- !If
- EnableIncludeNamespace
- Namespace: !Ref FilterNamespace
- !Ref "AWS::NoValue"
- !If
- EnableIncludeNamespace1
- Namespace: !Ref FilterNamespace1
- !Ref "AWS::NoValue"
- !If
- EnableIncludeNamespace2
- Namespace: !Ref FilterNamespace2
- !Ref "AWS::NoValue"
- !If
- EnableIncludeNamespace3
- Namespace: !Ref FilterNamespace3
- !Ref "AWS::NoValue"
ExcludeFilters:
- !If
- EnableExcludeNamespace
- Namespace: !Ref FilterNamespace
- !Ref "AWS::NoValue"
- !If
- EnableExcludeNamespace1
- Namespace: !Ref FilterNamespace1
- !Ref "AWS::NoValue"
- !If
- EnableExcludeNamespace2
- Namespace: !Ref FilterNamespace2
- !Ref "AWS::NoValue"
- !If
- EnableExcludeNamespace3
- Namespace: !Ref FilterNamespace3
- !Ref "AWS::NoValue"
IncludeFilters: !If
- IsIncludeFilter
- - !If
- EnableIncludeNamespace
- Namespace: !Ref FilterNamespace
- !Ref "AWS::NoValue"
- !If
- EnableIncludeNamespace1
- Namespace: !Ref FilterNamespace1
- !Ref "AWS::NoValue"
- !If
- EnableIncludeNamespace2
- Namespace: !Ref FilterNamespace2
- !Ref "AWS::NoValue"
- !If
- EnableIncludeNamespace3
- Namespace: !Ref FilterNamespace3
- !Ref "AWS::NoValue"
- !Ref "AWS::NoValue"
ExcludeFilters: !If
- IsExcludeFilter
- - !If
- EnableExcludeNamespace
- Namespace: !Ref FilterNamespace
- !Ref "AWS::NoValue"
- !If
- EnableExcludeNamespace1
- Namespace: !Ref FilterNamespace1
- !Ref "AWS::NoValue"
- !If
- EnableExcludeNamespace2
- Namespace: !Ref FilterNamespace2
- !Ref "AWS::NoValue"
- !If
- EnableExcludeNamespace3
- Namespace: !Ref FilterNamespace3
- !Ref "AWS::NoValue"
- !Ref "AWS::NoValue"

Outputs:
KinesisDeliveryStreamArn:
Expand Down

0 comments on commit 93e6623

Please sign in to comment.