From 5343a034eabd02c3db750696ed6bd4bbfd0862ee Mon Sep 17 00:00:00 2001 From: Jan Costandius Date: Wed, 30 Oct 2024 15:36:42 +0200 Subject: [PATCH] [1.0.0] Added prerelease content --- CHANGELOG.md | 4 +--- README.md | 36 +++++++++++++++++++++--------------- versions.tf | 4 ++-- 3 files changed, 24 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3bdd3ff..f16b0f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## [1.0.0] - 2024-10-28 +## [1.0.0] - 2024-10-30 ### Added - Initial release of the IAM Monitoring module. @@ -10,7 +10,5 @@ - Alarms triggered based on defined thresholds for the specified IAM metrics. - Detailed variable descriptions for easy customization and configuration. -## [1.0.1] - 2024-10-30 - ### Changed - Updated Terraform examples in [`README.md`](README.md) to reference the module source from the Terraform Registry. diff --git a/README.md b/README.md index 408e790..058865e 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@

Identity and Access Management (IAM)

- Releases + Releases License

@@ -17,23 +17,29 @@ This Terraform module creates CloudWatch Log Metric Filters and associated Alarm - Creates CloudWatch Alarms that trigger based on metrics from the filters. - Flexible configuration for events to monitor and alarm settings. + ## Requirements -- Terraform 1.0 or later -- AWS Provider + +| Name | Version | +|------|---------| +| [terraform](#requirement\_terraform) | ~> 1.0 | +| [aws](#requirement\_aws) | ~> 5.46 | ## Inputs -| Variable | Description | Type | Default | -|----------------------------------------------|------------------------------------------------------------------------------------------------------|---------------|-----------------------------------------------------------| -| `iam_event_names` | The list of event names to monitor for Identity and Access Management. | `list(string)` | `["DeleteGroupPolicy", "DeleteRolePolicy", "DeleteUserPolicy", "PutGroupPolicy", "PutRolePolicy", "PutUserPolicy", "CreatePolicy", "DeletePolicy", "CreatePolicyVersion", "DeletePolicyVersion", "AttachRolePolicy", "DetachRolePolicy", "AttachUserPolicy", "DetachUserPolicy", "AttachGroupPolicy", "DetachGroupPolicy", "CreateUser", "DeleteUser", "UpdateUser", "CreateGroup", "DeleteGroup", "UpdateGroup", "AddUserToGroup", "RemoveUserFromGroup"]` | -| `cw_log_group_name` | The name of the CloudWatch log group storing CloudTrail logs. | `string` | n/a | -| `cw_metric_filter_namespace` | The namespace for the CloudWatch metric filter. | `string` | `IAM/Monitoring` | -| `cw_metric_filter_value` | The value to publish to the CloudWatch metric. | `string` | `1` | -| `cw_metric_filter_alarm_comparison_operator` | The comparison operator for the CloudWatch metric filter alarm. | `string` | `GreaterThanOrEqualToThreshold` | -| `cw_metric_filter_alarm_evaluation_periods` | The number of periods over which data is compared to the specified threshold. | `number` | `1` | -| `cw_metric_filter_alarm_period` | The period in seconds over which the specified statistic is applied. | `number` | `300` | -| `cw_metric_filter_alarm_statistic` | The statistic to apply to the alarm's associated metric. | `string` | `Sum` | -| `cw_metric_filter_alarm_threshold` | The value against which the specified statistic is compared. | `number` | `1` | -| `cw_metric_filter_alarm_actions` | The list of actions to execute when the alarm transitions into an ALARM state. | `list(string)` | `[]` | + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| [cw\_log\_group\_name](#input\_cw\_log\_group\_name) | The name of the CloudWatch log group storing CloudTrail logs. | `string` | n/a | yes | +| [cw\_metric\_filter\_alarm\_actions](#input\_cw\_metric\_filter\_alarm\_actions) | The list of actions to execute when the alarm transitions into an ALARM state from any other state. | `list(string)` | `[]` | no | +| [cw\_metric\_filter\_alarm\_comparison\_operator](#input\_cw\_metric\_filter\_alarm\_comparison\_operator) | The comparison operator for the CloudWatch metric filter alarm. | `string` | `"GreaterThanOrEqualToThreshold"` | no | +| [cw\_metric\_filter\_alarm\_evaluation\_periods](#input\_cw\_metric\_filter\_alarm\_evaluation\_periods) | The number of periods over which data is compared to the specified threshold. | `number` | `1` | no | +| [cw\_metric\_filter\_alarm\_period](#input\_cw\_metric\_filter\_alarm\_period) | The period in seconds over which the specified statistic is applied. | `number` | `300` | no | +| [cw\_metric\_filter\_alarm\_statistic](#input\_cw\_metric\_filter\_alarm\_statistic) | The statistic to apply to the alarm's associated metric. | `string` | `"Sum"` | no | +| [cw\_metric\_filter\_alarm\_threshold](#input\_cw\_metric\_filter\_alarm\_threshold) | The value against which the specified statistic is compared. | `number` | `1` | no | +| [cw\_metric\_filter\_namespace](#input\_cw\_metric\_filter\_namespace) | The namespace for the CloudWatch metric filter. | `string` | `"IAM/Monitoring"` | no | +| [cw\_metric\_filter\_value](#input\_cw\_metric\_filter\_value) | The value to publish to the CloudWatch metric. | `string` | `"1"` | no | +| [iam\_event\_names](#input\_iam\_event\_names) | The list of event names to monitor for Identity and Access Management. | `list(string)` |
[
"DeleteGroupPolicy",
"DeleteRolePolicy",
"DeleteUserPolicy",
"PutGroupPolicy",
"PutRolePolicy",
"PutUserPolicy",
"CreatePolicy",
"DeletePolicy",
"CreatePolicyVersion",
"DeletePolicyVersion",
"AttachRolePolicy",
"DetachRolePolicy",
"AttachUserPolicy",
"DetachUserPolicy",
"AttachGroupPolicy",
"DetachGroupPolicy",
"CreateUser",
"DeleteUser",
"UpdateUser",
"CreateGroup",
"DeleteGroup",
"UpdateGroup",
"AddUserToGroup",
"RemoveUserFromGroup"
]
| no | + ## Simple Example ```hcl diff --git a/versions.tf b/versions.tf index e1ed610..93f5230 100644 --- a/versions.tf +++ b/versions.tf @@ -1,10 +1,10 @@ terraform { - required_version = ">= 1.0" + required_version = "~> 1.0" required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.46" + version = "~> 5.46" } } }