Skip to content

Commit

Permalink
feat(DMVP-6398): upgrade terraform aws provider
Browse files Browse the repository at this point in the history
  • Loading branch information
SarhadMeta committed Jan 8, 2025
1 parent 80ec281 commit d684f5b
Show file tree
Hide file tree
Showing 75 changed files with 93 additions and 92 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ No resources.
| <a name="input_enable_log_base_metrics"></a> [enable\_log\_base\_metrics](#input\_enable\_log\_base\_metrics) | n/a | `bool` | `true` | no |
| <a name="input_expression_alert"></a> [expression\_alert](#input\_expression\_alert) | Add multiple metrics in one alert and add expression. | `any` | `{}` | no |
| <a name="input_health_checks"></a> [health\_checks](#input\_health\_checks) | Health\_checks endpoints and paths | `any` | `[]` | no |
| <a name="input_log_base_metrics"></a> [log\_base\_metrics](#input\_log\_base\_metrics) | Log Base Metrics creation configuration | <pre>list(object({<br> name = string<br> pattern = string<br> log_group_name = string<br> unit = optional(string, "None")<br> dimensions = optional(any, {})<br> value = optional(string, "1")<br> default_value = optional(string, "0")<br> }))</pre> | `[]` | no |
| <a name="input_log_base_metrics"></a> [log\_base\_metrics](#input\_log\_base\_metrics) | Log Base Metrics creation configuration | <pre>list(object({<br/> name = string<br/> pattern = string<br/> log_group_name = string<br/> unit = optional(string, "None")<br/> dimensions = optional(any, {})<br/> value = optional(string, "1")<br/> default_value = optional(string, "0")<br/> }))</pre> | `[]` | no |
| <a name="input_name"></a> [name](#input\_name) | Dashboard name | `string` | n/a | yes |
| <a name="input_region"></a> [region](#input\_region) | The region where resources should be managed. In this repository it's secondary because IAM is always global. | `string` | `"eu-central-1"` | no |
| <a name="input_sns_topic_name"></a> [sns\_topic\_name](#input\_sns\_topic\_name) | SNS topic name | `string` | `"cloudwatch-alarm"` | no |
Expand Down
4 changes: 2 additions & 2 deletions modules/alerts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,12 @@ module "alerts" {

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_alerts"></a> [alerts](#input\_alerts) | Allows to create standard and log based metric alarms | <pre>list(object({<br> name = string<br> source = string<br> filters = map(any)<br> description = optional(string, null)<br> evaluation_periods = optional(number, 1)<br> statistic = optional(string, "sum")<br> equation = optional(string, "gte")<br> threshold = optional(number, 1)<br> period = optional(number, 300)<br> treat_missing_data = optional(string, null)<br> log_based_metric = optional(bool, false)<br> anomaly_detection = optional(bool, false)<br> fill_insufficient_data = optional(bool, false)<br> account_id = optional(string, null)<br> }))</pre> | `[]` | no |
| <a name="input_alerts"></a> [alerts](#input\_alerts) | Allows to create standard and log based metric alarms | <pre>list(object({<br/> name = string<br/> source = string<br/> filters = map(any)<br/> description = optional(string, null)<br/> evaluation_periods = optional(number, 1)<br/> statistic = optional(string, "sum")<br/> equation = optional(string, "gte")<br/> threshold = optional(number, 1)<br/> period = optional(number, 300)<br/> treat_missing_data = optional(string, null)<br/> log_based_metric = optional(bool, false)<br/> anomaly_detection = optional(bool, false)<br/> fill_insufficient_data = optional(bool, false)<br/> account_id = optional(string, null)<br/> }))</pre> | `[]` | no |
| <a name="input_enable_alarm_actions"></a> [enable\_alarm\_actions](#input\_enable\_alarm\_actions) | Enable alarm actions alert | `bool` | `true` | no |
| <a name="input_enable_insufficient_data_actions"></a> [enable\_insufficient\_data\_actions](#input\_enable\_insufficient\_data\_actions) | Enable insufficient data actions alert | `bool` | `true` | no |
| <a name="input_enable_ok_actions"></a> [enable\_ok\_actions](#input\_enable\_ok\_actions) | Enable ok actions alert | `bool` | `true` | no |
| <a name="input_expression_alert"></a> [expression\_alert](#input\_expression\_alert) | Add multiple metrics in one alert and add expression. | `any` | `{}` | no |
| <a name="input_health_checks"></a> [health\_checks](#input\_health\_checks) | Specifies the name of the Amazon SNS topic defined for notification of log file delivery | <pre>list(object({<br> host : string<br> port : optional(number, 443)<br> path : optional(string, "/")<br> type : optional(string, "HTTPS")<br> measure_latency : optional(bool, false)<br> regions : optional(list(string), ["us-west-1", "us-east-1", "eu-west-1"])<br> tags : optional(map(string))<br> failure_threshold : optional(number, 1)<br> main : optional(object({<br> statistic : optional(string, "min")<br> equation : optional(string, "lt")<br> threshold : optional(number, 1)<br> period : optional(number, "60")<br> }))<br> percentage : optional(object({<br> statistic : optional(string, "avg")<br> equation : optional(string, "lt")<br> threshold : optional(number, 75)<br> period : optional(number, 60)<br> }))<br> }))</pre> | `[]` | no |
| <a name="input_health_checks"></a> [health\_checks](#input\_health\_checks) | Specifies the name of the Amazon SNS topic defined for notification of log file delivery | <pre>list(object({<br/> host : string<br/> port : optional(number, 443)<br/> path : optional(string, "/")<br/> type : optional(string, "HTTPS")<br/> measure_latency : optional(bool, false)<br/> regions : optional(list(string), ["us-west-1", "us-east-1", "eu-west-1"])<br/> tags : optional(map(string))<br/> failure_threshold : optional(number, 1)<br/> main : optional(object({<br/> statistic : optional(string, "min")<br/> equation : optional(string, "lt")<br/> threshold : optional(number, 1)<br/> period : optional(number, "60")<br/> }))<br/> percentage : optional(object({<br/> statistic : optional(string, "avg")<br/> equation : optional(string, "lt")<br/> threshold : optional(number, 75)<br/> period : optional(number, 60)<br/> }))<br/> }))</pre> | `[]` | no |
| <a name="input_sns_topic"></a> [sns\_topic](#input\_sns\_topic) | The name of aws sns topic use as target for alarm actions | `string` | `"cloudwatch-alerts"` | no |

## Outputs
Expand Down
4 changes: 2 additions & 2 deletions modules/billing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ No outputs.

| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 4.2, < 6.0 |

## Providers

Expand Down Expand Up @@ -201,7 +201,7 @@ No modules.
| <a name="input_notify_email_addresses"></a> [notify\_email\_addresses](#input\_notify\_email\_addresses) | The email addresses to notify about about cost increase, either this or sns\_topic\_arns should be set | `list(string)` | `[]` | no |
| <a name="input_sns_topic_arns"></a> [sns\_topic\_arns](#input\_sns\_topic\_arns) | The arns of aws sns topic use as target for notifying about cost increase, either this or notify\_email\_addresses should be set | `list(string)` | `[]` | no |
| <a name="input_threshold_type"></a> [threshold\_type](#input\_threshold\_type) | n/a | `string` | `"PERCENTAGE"` | no |
| <a name="input_thresholds"></a> [thresholds](#input\_thresholds) | List of percentage thresholds that trigger notifications based on the limit amount. Example: ['90'] means notify when 90% of the budget is reached. | `list(string)` | <pre>[<br> "40",<br> "60",<br> "80",<br> "90",<br> "100",<br> "110"<br>]</pre> | no |
| <a name="input_thresholds"></a> [thresholds](#input\_thresholds) | List of percentage thresholds that trigger notifications based on the limit amount. Example: ['90'] means notify when 90% of the budget is reached. | `list(string)` | <pre>[<br/> "40",<br/> "60",<br/> "80",<br/> "90",<br/> "100",<br/> "110"<br/>]</pre> | no |
| <a name="input_time_period_end"></a> [time\_period\_end](#input\_time\_period\_end) | n/a | `string` | `"2087-06-15_00:00"` | no |
| <a name="input_time_period_start"></a> [time\_period\_start](#input\_time\_period\_start) | n/a | `string` | `"2022-01-01_00:00"` | no |
| <a name="input_time_unit"></a> [time\_unit](#input\_time\_unit) | n/a | `string` | `"MONTHLY"` | no |
Expand Down
2 changes: 1 addition & 1 deletion modules/billing/versions.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
terraform {
required_version = ">= 1.0"
required_version = ">= 4.2, < 6.0"

required_providers {
aws = {
Expand Down
14 changes: 7 additions & 7 deletions modules/cloudwatch-alarm-actions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ module "monitoring_cloudwatch_alarm_actions" {
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3.0 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.16 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.2, < 6.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.16 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.2, < 6.0 |

## Modules

Expand All @@ -47,21 +47,21 @@ module "monitoring_cloudwatch_alarm_actions" {
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_create_topic"></a> [create\_topic](#input\_create\_topic) | Whether to create sns topic | `bool` | `true` | no |
| <a name="input_delivery_policy"></a> [delivery\_policy](#input\_delivery\_policy) | The SNS topic delivery policy | `any` | <pre>{<br> "http": {<br> "defaultHealthyRetryPolicy": {<br> "backoffFunction": "linear",<br> "maxDelayTarget": 20,<br> "minDelayTarget": 20,<br> "numMaxDelayRetries": 0,<br> "numMinDelayRetries": 0,<br> "numNoDelayRetries": 0,<br> "numRetries": 3<br> },<br> "defaultThrottlePolicy": {<br> "maxReceivesPerSecond": 1<br> },<br> "disableSubscriptionOverrides": false<br> }<br>}</pre> | no |
| <a name="input_delivery_policy"></a> [delivery\_policy](#input\_delivery\_policy) | The SNS topic delivery policy | `any` | <pre>{<br/> "http": {<br/> "defaultHealthyRetryPolicy": {<br/> "backoffFunction": "linear",<br/> "maxDelayTarget": 20,<br/> "minDelayTarget": 20,<br/> "numMaxDelayRetries": 0,<br/> "numMinDelayRetries": 0,<br/> "numNoDelayRetries": 0,<br/> "numRetries": 3<br/> },<br/> "defaultThrottlePolicy": {<br/> "maxReceivesPerSecond": 1<br/> },<br/> "disableSubscriptionOverrides": false<br/> }<br/>}</pre> | no |
| <a name="input_email_addresses"></a> [email\_addresses](#input\_email\_addresses) | List of email addresses to send notification to | `list(string)` | `[]` | no |
| <a name="input_enable_dead_letter_queue"></a> [enable\_dead\_letter\_queue](#input\_enable\_dead\_letter\_queue) | Whether to enable dead letter queue | `bool` | `true` | no |
| <a name="input_fallback_email_addresses"></a> [fallback\_email\_addresses](#input\_fallback\_email\_addresses) | List of fallback email addresses to send notification when lambda failed | `list(string)` | `[]` | no |
| <a name="input_fallback_phone_numbers"></a> [fallback\_phone\_numbers](#input\_fallback\_phone\_numbers) | List of international formatted phone number to send notification when lambda failed | `list(string)` | `[]` | no |
| <a name="input_fallback_web_endpoints"></a> [fallback\_web\_endpoints](#input\_fallback\_web\_endpoints) | List of web webhooks endpoints (like opsgenie) to send notification when lambda failed | `list(string)` | `[]` | no |
| <a name="input_jira_config"></a> [jira\_config](#input\_jira\_config) | Lambda create Jira ticket for every alarm | <pre>list(object({<br> url = string,<br> key = string,<br> user_username = string,<br> user_api_token = string<br> }))</pre> | `[]` | no |
| <a name="input_lambda_failed_alert"></a> [lambda\_failed\_alert](#input\_lambda\_failed\_alert) | Alert for lambda failed | `any` | <pre>{<br> "equation": "gte",<br> "period": 60,<br> "statistic": "sum",<br> "threshold": 1<br>}</pre> | no |
| <a name="input_jira_config"></a> [jira\_config](#input\_jira\_config) | Lambda create Jira ticket for every alarm | <pre>list(object({<br/> url = string,<br/> key = string,<br/> user_username = string,<br/> user_api_token = string<br/> }))</pre> | `[]` | no |
| <a name="input_lambda_failed_alert"></a> [lambda\_failed\_alert](#input\_lambda\_failed\_alert) | Alert for lambda failed | `any` | <pre>{<br/> "equation": "gte",<br/> "period": 60,<br/> "statistic": "sum",<br/> "threshold": 1<br/>}</pre> | no |
| <a name="input_log_group_retention_days"></a> [log\_group\_retention\_days](#input\_log\_group\_retention\_days) | The count of days that cloudwatch log group will keep each log item and then will cleanup automatically | `number` | `7` | no |
| <a name="input_log_level"></a> [log\_level](#input\_log\_level) | log level for python code | `string` | `"INFO"` | no |
| <a name="input_phone_numbers"></a> [phone\_numbers](#input\_phone\_numbers) | List of international formatted phone number to send notification to | `list(string)` | `[]` | no |
| <a name="input_policy"></a> [policy](#input\_policy) | The SNS topic policy | `any` | `null` | no |
| <a name="input_recreate_missing_package"></a> [recreate\_missing\_package](#input\_recreate\_missing\_package) | Whether to recreate missing Lambda package if it is missing locally or not | `bool` | `true` | no |
| <a name="input_servicenow_webhooks"></a> [servicenow\_webhooks](#input\_servicenow\_webhooks) | List of servicenow webhook configs to send notification to | <pre>list(object({<br> domain = string<br> path = string<br> user = string<br> pass = string<br> }))</pre> | `[]` | no |
| <a name="input_slack_webhooks"></a> [slack\_webhooks](#input\_slack\_webhooks) | List of slack webhook configs to send notification to | <pre>list(object({<br> hook_url = string<br> channel = string<br> username = string<br> }))</pre> | `[]` | no |
| <a name="input_servicenow_webhooks"></a> [servicenow\_webhooks](#input\_servicenow\_webhooks) | List of servicenow webhook configs to send notification to | <pre>list(object({<br/> domain = string<br/> path = string<br/> user = string<br/> pass = string<br/> }))</pre> | `[]` | no |
| <a name="input_slack_webhooks"></a> [slack\_webhooks](#input\_slack\_webhooks) | List of slack webhook configs to send notification to | <pre>list(object({<br/> hook_url = string<br/> channel = string<br/> username = string<br/> }))</pre> | `[]` | no |
| <a name="input_teams_webhooks"></a> [teams\_webhooks](#input\_teams\_webhooks) | Teams webhook configs to send notification to | `list(string)` | `[]` | no |
| <a name="input_topic_name"></a> [topic\_name](#input\_topic\_name) | The SNS topic name | `string` | `"cloudwatch-alerts"` | no |
| <a name="input_web_endpoints"></a> [web\_endpoints](#input\_web\_endpoints) | List of web webhooks endpoints (like opsgenie) to send notification to | `list(string)` | `[]` | no |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ No requirements.
| <a name="input_dead_letter_queue_arn"></a> [dead\_letter\_queue\_arn](#input\_dead\_letter\_queue\_arn) | The SQS queue arn for using as dead letter | `string` | `null` | no |
| <a name="input_environment_variables"></a> [environment\_variables](#input\_environment\_variables) | Environment variables to pass to function | `map(any)` | `{}` | no |
| <a name="input_fallback_sns_topic_name"></a> [fallback\_sns\_topic\_name](#input\_fallback\_sns\_topic\_name) | The fallback sns topic name to attach/create subscription | `string` | n/a | yes |
| <a name="input_lambda_failed_alert"></a> [lambda\_failed\_alert](#input\_lambda\_failed\_alert) | Alert for lambda failed | `any` | <pre>{<br> "equation": "gte",<br> "fill_insufficient_data": true,<br> "period": 60,<br> "statistic": "sum",<br> "threshold": 1<br>}</pre> | no |
| <a name="input_lambda_failed_alert"></a> [lambda\_failed\_alert](#input\_lambda\_failed\_alert) | Alert for lambda failed | `any` | <pre>{<br/> "equation": "gte",<br/> "fill_insufficient_data": true,<br/> "period": 60,<br/> "statistic": "sum",<br/> "threshold": 1<br/>}</pre> | no |
| <a name="input_log_group_retention_days"></a> [log\_group\_retention\_days](#input\_log\_group\_retention\_days) | The retention days for cloudwatch log group | `number` | `7` | no |
| <a name="input_memory_size"></a> [memory\_size](#input\_memory\_size) | Memory size for Lambda function | `number` | `null` | no |
| <a name="input_recreate_missing_package"></a> [recreate\_missing\_package](#input\_recreate\_missing\_package) | Whether to recreate missing Lambda package if it is missing locally or not | `bool` | `true` | no |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ module "this" {
fallback_phone_numbers = ["+000000000"]
fallback_web_endpoints = ["https://example.com/"]
lambda_failed_alert = {
period = 60
threshold = 1
equation = "gte"
statistic = "sum"
period = 60
threshold = 1
equation = "gte"
statistic = "sum"
fill_insufficient_data = true
}
}
2 changes: 1 addition & 1 deletion modules/cloudwatch-alarm-actions/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 4.16"
version = ">= 4.2, < 6.0"
}
}

Expand Down
2 changes: 1 addition & 1 deletion modules/cloudwatch-log-based-metrics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ No modules.
|------|-------------|------|---------|:--------:|
| <a name="input_log_group_name"></a> [log\_group\_name](#input\_log\_group\_name) | The name of cloudwatch log group on which the metric filters will apply, one of var.log\_group\_name or var.metrics\_patterns.*.log\_group\_name is required | `string` | `null` | no |
| <a name="input_metrics_namespace"></a> [metrics\_namespace](#input\_metrics\_namespace) | The namespace of cloudwatch metric | `string` | `"LogBasedMetrics"` | no |
| <a name="input_metrics_patterns"></a> [metrics\_patterns](#input\_metrics\_patterns) | The configurations of log based metric filtration, one of var.log\_group\_name or var.metrics\_patterns.*.log\_group\_name is required | <pre>list(object({<br> name = string<br> pattern = string<br> unit = optional(string, "None")<br> dimensions = optional(any, {})<br> value = optional(string, "1")<br> default_value = optional(string, "0")<br> log_group_name = optional(string, null)<br> }))</pre> | `[]` | no |
| <a name="input_metrics_patterns"></a> [metrics\_patterns](#input\_metrics\_patterns) | The configurations of log based metric filtration, one of var.log\_group\_name or var.metrics\_patterns.*.log\_group\_name is required | <pre>list(object({<br/> name = string<br/> pattern = string<br/> unit = optional(string, "None")<br/> dimensions = optional(any, {})<br/> value = optional(string, "1")<br/> default_value = optional(string, "0")<br/> log_group_name = optional(string, null)<br/> }))</pre> | `[]` | no |

## Outputs

Expand Down
2 changes: 1 addition & 1 deletion modules/cloudwatch-to-lambda/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ No requirements.
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_cloudwatch_log_group_names"></a> [cloudwatch\_log\_group\_names](#input\_cloudwatch\_log\_group\_names) | Cloudwatch Log group name | `list(string)` | n/a | yes |
| <a name="input_lambda_configs"></a> [lambda\_configs](#input\_lambda\_configs) | Lambda Configs | <pre>object({<br> environment_variables = optional(object({<br> url = optional(string, "")<br> }), {})<br> })</pre> | `{}` | no |
| <a name="input_lambda_configs"></a> [lambda\_configs](#input\_lambda\_configs) | Lambda Configs | <pre>object({<br/> environment_variables = optional(object({<br/> url = optional(string, "")<br/> }), {})<br/> })</pre> | `{}` | no |
| <a name="input_name"></a> [name](#input\_name) | Lambda name | `string` | n/a | yes |

## Outputs
Expand Down
Loading

0 comments on commit d684f5b

Please sign in to comment.