diff --git a/test/integration/default/build/cloudwatch.tf b/test/integration/default/build/cloudwatch.tf index 9f9a46b6f..b080e31fc 100644 --- a/test/integration/default/build/cloudwatch.tf +++ b/test/integration/default/build/cloudwatch.tf @@ -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 #======================================================# diff --git a/test/integration/default/verify/controls/aws_cloudwatch_log_metric_filter.rb b/test/integration/default/verify/controls/aws_cloudwatch_log_metric_filter.rb index 0a46f92e6..d64f9934c 100644 --- a/test/integration/default/verify/controls/aws_cloudwatch_log_metric_filter.rb +++ b/test/integration/default/verify/controls/aws_cloudwatch_log_metric_filter.rb @@ -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