mirror of
https://github.com/inspec/inspec
synced 2024-11-10 23:24:18 +00:00
Make cloudwatch log metric filter test fixtures more unique (#201)
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
This commit is contained in:
parent
0af7105eba
commit
2d6bb1b84a
2 changed files with 6 additions and 2 deletions
|
@ -40,7 +40,7 @@ output "log_metric_filter_1_metric_name" {
|
|||
|
||||
resource "aws_cloudwatch_log_metric_filter" "lmf_2" {
|
||||
name = "${terraform.env}_lmf"
|
||||
pattern = "testpattern02"
|
||||
pattern = "${terraform.env}testpattern02"
|
||||
log_group_name = "${aws_cloudwatch_log_group.lmf_lg_2.name}"
|
||||
|
||||
metric_transformation {
|
||||
|
@ -62,6 +62,9 @@ output "log_metric_filter_2_log_group_name" {
|
|||
value = "${aws_cloudwatch_log_group.lmf_lg_2.name}"
|
||||
}
|
||||
|
||||
output "log_metric_filter_2_pattern" {
|
||||
value = "${terraform.env}testpattern02"
|
||||
}
|
||||
#======================================================#
|
||||
# Cloudwatch Alarms
|
||||
#======================================================#
|
||||
|
|
|
@ -5,6 +5,7 @@ fixtures = {}
|
|||
'log_metric_filter_1_metric_name',
|
||||
'log_metric_filter_2_name',
|
||||
'log_metric_filter_2_log_group_name',
|
||||
'log_metric_filter_2_pattern',
|
||||
].each do |fixture_name|
|
||||
fixtures[fixture_name] = attribute(
|
||||
fixture_name,
|
||||
|
@ -25,7 +26,7 @@ control "aws_cloudwatch_log_metric_filter recall" do
|
|||
end
|
||||
|
||||
describe aws_cloudwatch_log_metric_filter(
|
||||
pattern: 'testpattern02',
|
||||
pattern: fixtures['log_metric_filter_2_pattern'],
|
||||
) do
|
||||
it { should exist }
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue