hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.73k stars 9.09k forks source link

aws_elastic_beanstalk_environment BreachDuration changes not applying #13068

Open mrubinwch opened 4 years ago

mrubinwch commented 4 years ago

Community Note

Terraform Version

Terraform v0.12.24

Affected Resource(s)

Terraform Configuration Files

  setting {
    namespace = "aws:autoscaling:trigger"
    name      = "BreachDuration"
    value     = var.breachDuration
  }

Actual Behavior

No matter how many times I apply, I see the following:

      + setting {
          + name      = "BreachDuration"
          + namespace = "aws:autoscaling:trigger"
          + value     = "3"
        }
      - setting {
          - name      = "BreachDuration" -> null
          - namespace = "aws:autoscaling:trigger" -> null
          - value     = "5" -> null
        }

Looking at the AWS web console, BreachDuration is set at 5. It doesn't appear to be actually applying from Terraform (though Terraform detects the difference in state and keeps trying to apply it).

labmonkey42 commented 3 years ago

I have a similar issue with the resource refresh having a value of "1" and my setting defining it as "5", so every plan sees the setting as changed.

justinretzolk commented 2 years ago

Hey @mrubinwch šŸ‘‹ Thank you for taking the time to report this. Since there's been quite a few releases of the AWS Provider between when you initially filed it and now, can you confirm whether you're still experiencing this behavior?

sesterki commented 2 years ago

Edit: Tested with Version 4.3.0 I am seeing this issue with my app.

Edit 2: In looking at the EB docs again it says:

BreachDuration = Period * EvaluationPeriods

The default values for these options (5, 5, and 1, respectively) satisfy this equation. If you specify inconsistent values, Elastic Beanstalk might modify one of the values so that the equation is still satisfied.

This appears to be the issue that my app had. Hopefully this is helpful to anyone still running into this issue.

github-actions[bot] commented 1 month ago

Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label.

If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!