cloudposse / cloudposse/terraform-aws-code-deploy

Automatic rollback variable change to a list of string type

Open
#45 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
HCL
Stars
17
Forks
23
PR merge metrics
No merged PRs in 30d

Description

### Describe the Feature

Describe Feature
When trying to select the type of automatic rollback by default it uses "DEPLOYMENT_FAILURE"

the suggested change is to change the value from string to list(string) to be able to use both options to cover those edge cases cover

### Expected Behavior

able to select both options for automatic rollback

### Use Case

cover edge cases in which applications are healthy but throwing multiples errors

### Describe Ideal Solution

```
variable "auto_rollback_configuration_events" {
type = list(string)
default = "DEPLOYMENT_FAILURE"
description = "The event type or types that trigger a rollback. Supported types are `DEPLOYMENT_FAILURE` and `DEPLOYMENT_STOP_ON_ALARM`."

}

dynamic "auto_rollback_configuration" {
for_each = local.auto_rollback_configuration_enabled ? [1] : [0]

content {
enabled = local.auto_rollback_configuration_enabled
events = var.auto_rollback_configuration_events
}
}
```
allowing use both options for automatic rollback

### Additional Context

I think will make more dynamic the use of the module to cover edge cases

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.