Closed hashibot closed 4 years ago
Any update on this issue? I'm still being plagued by this. Looking at the diff in terraform plan
I only see setting.#: "22" => "27"
having been changed, and consecutive terraform apply
s show both these numbers unchanged (i.e. setting.# does not correctly set to 27 after the apply)
I have solved this issue for my particular case: I was setting an instance profile using an ARN...
setting {
namespace = "aws:autoscaling:launchconfiguration"
name = "IamInstanceProfile"
value = "${aws_iam_instance_profile.geolog_instance.arn}"
}
... and it appeared to work fine, but it suffered from the not-sticking problem, and every terraform plan
or terraform apply
seemed to want to recreate the setting. Changing it to the instance profile name seemed to fix it
setting {
namespace = "aws:autoscaling:launchconfiguration"
name = "IamInstanceProfile"
value = "${aws_iam_instance_profile.geolog_instance.name}"
}
I still have the same issue..... where, if you look at the plan, it seems to 'forget' the following settings:
namespace = "aws:elb:listener:443"
name = "SSLCertificateID"
namespace = "aws:autoscaling:launchconfiguration"
name = "Ec2KeyName"
namespace = "aws:elb:listener"
name = "InstanceProtocol"
Once I commented out the settings in my config and ran a terraform plan,
I think I may have narrowed this down alittle more to just having SSLCertificateId
settings there.
I'm having the same issues, even worse for me as it's understanding only 24 of my 39 settings...
is there an update on this? it's kinda annoying when updating parts of my infrastructure not related at all to beanstalk. when you have rolling update enabled, this procedure takes like 5 minutes or more every time you apply...
Hi @m1schka, you need to add this:
lifecycle { ignore_changes = ["setting"] }
to your aws_elastic_beanstalk_environment
thx @felipe-vvoosh that's a good workaround! Is it possible to only narrow it down to the application version so it picks up all the rest?
I don't know... I googled it but saw people doing it for tags only...
I'm seeing this on any setting in the aws:elasticbeanstalk:environment:process(:*)
namespaces, but only when I've set aws:elasticbeanstalk:environment/EnvironmentType
to SingleInstance
. It's the same behavior everyone else is reporting:
setting.2782498060.name: "" => "Port"
setting.2782498060.namespace: "" => "aws:elasticbeanstalk:environment:process:registry"
setting.2782498060.resource: "" => ""
setting.2782498060.value: "" => "9090"
The resource is being updated with every plan/apply even when there is not supposed to be a change.
I don't think ignoring settings is a workaround at all. The majority of the TF configuration for beanstalk is wrapped up in those settings blocks; ignoring these means any changes I do want to make are not picked up.
EDIT: If it's not obvious to you - it wasn't to me, and the documentation is not explicit about this - the above namespace/settings are only valid in a load balanced environment. So what's going on is that TF is supplying the settings, and while AWS takes them, it does not persist them. My guess is that some of the above similar issues are due to setting values that are not relevant for the associated beanstalk environment.
Hi all,
this is affecting us as well. We are setting SQS, ElastiCache and Environment auto terminating if unhealthy options in the environments, and after the configuration is applied, each consecutive plan/apply will try to re-set those options (even though they have been already applied to the env - checked at amazon console).
Terraform version: Terraform v0.10.8
I'm seeing the same issue as @saxonww where the resource is being updated on every apply, regardless of if I have made a change.
@jamesrwhite also having same problem :)
I am also seeing a similar issue with the listener_port namespace ("aws:elb:listener:443" in my case). There is some indication that the settings have been used according to the config of the ELB in the EC2 console. However, settings are not reflected in the Elastic Beanstalk configuration display.
I'm seeing this with SSLCertificateID Terraform v0.11.3 provider.aws v1.6.0
setting.179171839.name: "" => "SSLCertificateID"
setting.179171839.namespace: "" => "aws:elb:listener:443"
setting.179171839.value: "" => "arn:aws:acm:us-west-2:xxx:certificate/xxx"
setting.3168095902.name: "" => "SSLCertificateID"
setting.3168095902.namespace: "" => "aws:elb:listener:444"
setting.3168095902.value: "" => "arn:aws:acm:us-west-2:xxx:certificate/xxx"
setting.3529276132.name: "" => "SSLCertificateID"
setting.3529276132.namespace: "" => "aws:elb:loadbalancer"
setting.3529276132.value: "" => "arn:aws:acm:us-west-2:xxx:certificate/xxx"
I got frustrated and just switched to use an application load balancer instead of classic. So far, so good, and my options are all sticking too.
@serenitus Could you share which settings you're setting to get this to work?
it seems none of the settings from the aws:elasticbeanstalk:environment:process:default
namespace are applicable when using a classic loadbalancer.
also i'm not able to change the Stickiness Policy
setting from the aws:elb:policies
namespace.
I need to use the specify the default policy name as in
setting {
namespace = "aws:elb:policies:AWSEB-ELB-StickinessPolicy"
name = "Stickiness Policy"
value = "false
}
to have the Stickyness Policy setting applied, but then it's not sticking and gets reapplied every time... great!
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!
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!
This issue was originally opened by @ccampo133 as hashicorp/terraform#8950. It was migrated here as part of the provider split. The original body of the issue is below.
When updating an elastic beanstalk environment resource settings, Terraform does not seem to update the state. Each successive run of
terraform plan
orterraform apply
indicates the resource needs to be updated, despite actually being correct on AWS and unchanged in the terraform code. The output seems to indicate it has to do with theLoadBalancerHttpPort
andSSLCertificateId
settings.Terraform Version
0.7.4
Affected Resource(s)
aws_elastic_beanstalk_environment
Terraform Configuration Files
Debug Output
Expected Behavior
After running
terraform apply
, the next run ofterraform plan
orterraform apply
should have nothing to update, and exit quietly.Actual Behavior
After running
terraform apply
, the next run ofterraform plan
orterraform apply
says the elastic beanstalk resource has changed.Steps to Reproduce
terraform apply
terraform plan
orterraform apply
References