Skip to content

Commit

Permalink
Add missing alarm_configuration variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Ic3w0lf committed Mar 20, 2024
1 parent 7cc72a1 commit 14a600a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ preconfigured solution for seamless scalability and high availability."
| <a name="input_codedeploy_cloudwatch_alarm_names"></a> [codedeploy\_cloudwatch\_alarm\_names](#input\_codedeploy\_cloudwatch\_alarm\_names) | Cloudwatch alarm NAMES (not ARNs) to add to the deployment group. Allows automated rollback on errors. | `list(string)` | `[]` | no |
| <a name="input_codedeploy_deployment_config_name"></a> [codedeploy\_deployment\_config\_name](#input\_codedeploy\_deployment\_config\_name) | The name of the group's deployment config. | `string` | `"CodeDeployDefault.ECSAllAtOnce"` | no |
| <a name="input_codedeploy_deployment_ready_wait_time_in_minutes"></a> [codedeploy\_deployment\_ready\_wait\_time\_in\_minutes](#input\_codedeploy\_deployment\_ready\_wait\_time\_in\_minutes) | The number of minutes to wait before the status of a blue/green deployment changed to Stopped if rerouting is not started manually. If set to 0 the deployment will continue without waiting for approval. | `number` | `0` | no |
| <a name="input_codedeploy_ignore_poll_alarm_failure"></a> [codedeploy\_ignore\_poll\_alarm\_failure](#input\_codedeploy\_ignore\_poll\_alarm\_failure) | Whether to ignore failures when polling for alarms. | `bool` | `false` | no |
| <a name="input_codedeploy_role_name"></a> [codedeploy\_role\_name](#input\_codedeploy\_role\_name) | The name of the role that allows CodeDeploy to make calls to ECS, Auto Scaling, and CloudWatch on your behalf. | `string` | `null` | no |
| <a name="input_codedeploy_role_name_prefix"></a> [codedeploy\_role\_name\_prefix](#input\_codedeploy\_role\_name\_prefix) | Whether to prefix the CodeDeploy role name. | `bool` | `false` | no |
| <a name="input_codedeploy_termination_action"></a> [codedeploy\_termination\_action](#input\_codedeploy\_termination\_action) | The action to take on instances in the original environment after a successful blue/green deployment. | `string` | `"TERMINATE"` | no |
Expand Down Expand Up @@ -148,7 +149,7 @@ preconfigured solution for seamless scalability and high availability."

## Resources

- resource.aws_cloudwatch_log_group.main (main.tf#309)
- resource.aws_cloudwatch_log_group.main (main.tf#310)
- resource.aws_codedeploy_app.main (main.tf#231)
- resource.aws_codedeploy_deployment_group.main (main.tf#238)
- resource.aws_ecs_service.main (main.tf#56)
Expand Down
5 changes: 3 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,9 @@ resource "aws_codedeploy_deployment_group" "main" {
}

alarm_configuration {
enabled = length(var.codedeploy_cloudwatch_alarm_names) > 0 ? true : false
alarms = var.codedeploy_cloudwatch_alarm_names
enabled = length(var.codedeploy_cloudwatch_alarm_names) > 0 ? true : false
alarms = var.codedeploy_cloudwatch_alarm_names
ignore_poll_alarm_failure = var.codedeploy_ignore_poll_alarm_failure
}

load_balancer_info {
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,12 @@ variable "codedeploy_role_name_prefix" {
type = bool
}

variable "codedeploy_ignore_poll_alarm_failure" {
description = "Whether to ignore failures when polling for alarms."
default = false
type = bool
}

# CLOUDWATCH
variable "codedeploy_cloudwatch_alarm_names" {
description = "Cloudwatch alarm NAMES (not ARNs) to add to the deployment group. Allows automated rollback on errors."
Expand Down

0 comments on commit 14a600a

Please sign in to comment.