0
votes

I had a existing Terraform module which creates a EC2 instances, Elastic Load Balancer, Health Check for ELB, Auto Scaling Group, etc. I just used it and create all the resources. Note: In Auto Scaling Group the Health Ceck type is set to EC2. But I would like to update it to ELB. In this case, I would have update the module, but I don't have access to that.

I'm here to get any other suggestions how can i update it to ELB. I also looked at import the state of the existing resource and manage / update it using Terraform. But in this case, I already have the resource "Auto Scaling Group" in the state file. Can you please help me like what else I can do to update the Health Check Type to ELB from EC2

1
Can you share your Terraform including the module code?ydaetskcoR

1 Answers

0
votes

The module has hardcoded health check type value to EC2 then it won't be possible to change. You will have to manually change it or do it by script. But next time terraform script will override this value.

If your module taking variable value for health check type then you can do that

  health_check_type         = {var.healthCheckType} 
}```