Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ Terraform module for creating an AWS ECS Fargate service with CodeDeploy B/G dep
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_assign_public_ip"></a> [assign\_public\_ip](#input\_assign\_public\_ip) | Assign a public IP address to the ENI. | `bool` | `false` | no |
| <a name="input_cloudwatch_log_group_name"></a> [cloudwatch\_log\_group\_name](#input\_cloudwatch\_log\_group\_name) | The name of the CloudWatch log group. | `string` | `null` | no |
| <a name="input_codedeploy_auto_rollback_events"></a> [codedeploy\_auto\_rollback\_events](#input\_codedeploy\_auto\_rollback\_events) | The event type or types that trigger a rollback. If none are defined `auto_rollback` will be disabled. | `list(string)` | <pre>[<br> "DEPLOYMENT_FAILURE",<br> "DEPLOYMENT_STOP_ON_ALARM"<br>]</pre> | no |
| <a name="input_codedeploy_cloudwatch_alarms"></a> [codedeploy\_cloudwatch\_alarms](#input\_codedeploy\_cloudwatch\_alarms) | Cloudwatch alarm ARNs to add to the deployment group. Allows automated rollback on errors, for example. | `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_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 |
Expand Down Expand Up @@ -134,7 +136,7 @@ Terraform module for creating an AWS ECS Fargate service with CodeDeploy B/G dep

## Resources

- resource.aws_cloudwatch_log_group.main (main.tf#277)
- resource.aws_cloudwatch_log_group.main (main.tf#282)
- resource.aws_codedeploy_app.main (main.tf#211)
- resource.aws_codedeploy_deployment_group.main (main.tf#218)
- resource.aws_ecs_service.main (main.tf#44)
Expand Down
5 changes: 5 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,11 @@ resource "aws_codedeploy_deployment_group" "main" {
events = var.codedeploy_auto_rollback_events
}

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

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

# CLOUDWATCH
variable "codedeploy_cloudwatch_alarms" {
description = "Cloudwatch alarm ARNs to add to the deployment group. Allows automated rollback on errors, for example."
default = []
type = list(string)
}


# TARGET GROUP
variable "target_group_load_balancing_algorithm_type" {
description = "Determines how the load balancer selects targets when routing requests."
Expand Down