alertlogic/aws-manual-deployment

Inconsistencies between Cloudformation Implementation and Terraform

jpalmerpivotal opened this issue · 0 comments

I am attempting to use terraform import to bring an existing Cloud Formation deployment under terraform management.
While doing this I noticed some differences between what is set in each.

For example:

  • the ci_appliance_asg has its desired_capacity, max_size and min_size set to 1 in terraform but it appears to have been 0 in cloud formation.
  • ci_appliance_asg and ids_appliance_sg have health_check_grace_period = 0 -> 300
  • for the security groups the cloudformation puts in the region in the name. As names cannot be changed for security groups, this forces replacement which is unfortunate
  • the launch configurations appear to use name_prefix whereas cloud formation uses name
  • additionally there are issues with spacing in the userdata for launch configurations which lead to differences in the SHA forcing replacement so it cannot perfectly import the LCs.

These are largely crucial issues but they did raise questions as I did the importing.

The largest question I have is around the desired_capacity value for the ci_appliance_asg as Alert Logic appears happy with the CI behaviour with desired capacity at 0, this would be desirable to reduce EC2 spend. Is it valid to set this to 0? It appears to work in the cloud formation, so I would like to check that it is intentionally 1 in this repo.