Show summary
| CHANGE | NAME |
|--------|---------------------------------------------------------------------------------|
| add | `module.url_shortener_lambda.aws_cloudwatch_query_definition.lambda_statistics` |
Show plan
```terraform
Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# module.url_shortener_lambda.aws_cloudwatch_query_definition.lambda_statistics will be created
+ resource "aws_cloudwatch_query_definition" "lambda_statistics" {
+ id = (known after apply)
+ log_group_names = [
+ "aws_cloudwatch_log_group.this",
]
+ name = "Lambda Statistics - url-shortener-api"
+ query_definition_id = (known after apply)
+ query_string = <<-EOT
filter @type = “REPORT”
| stats
count(@type) as countInvocations,
count(@initDuration) as countColdStarts, (count(@initDuration)/count(@type))*100 as percentageColdStarts,
max(@initDuration) as maxColdStartTime,
avg(@duration) as averageDuration,
max(@duration) as maxDuration,
min(@duration) as minDuration,
avg(@maxMemoryUsed) as averageMemoryUsed,
max(@memorySize) as memoryAllocated, (avg(@maxMemoryUsed)/max(@memorySize))*100 as percentageMemoryUsed
by bin(1h) as timeFrame
EOT
}
Plan: 1 to add, 0 to change, 0 to destroy.
─────────────────────────────────────────────────────────────────────────────
Saved the plan to: plan.tfplan
To perform exactly these actions, run the following command to apply:
terraform apply "plan.tfplan"
```
Show Conftest results
```sh
WARN - plan.json - main - Missing Common Tags: ["module.sentinel_forwarder.aws_cloudwatch_log_group.sentinel_forwarder_lambda"]
WARN - plan.json - main - Missing Common Tags: ["module.sentinel_forwarder.aws_iam_policy.sentinel_forwarder_lambda"]
WARN - plan.json - main - Missing Common Tags: ["module.sentinel_forwarder.aws_iam_role.sentinel_forwarder_lambda"]
WARN - plan.json - main - Missing Common Tags: ["module.sentinel_forwarder.aws_lambda_function.sentinel_forwarder"]
21 tests, 17 passed, 4 warnings, 0 failures, 0 exceptions
```
Summary
Update the version reference for the Terraform modules to be after the module sub-directory.