When to provision in Packer vs Terraform?

前端 未结 2 1848
旧时难觅i
旧时难觅i 2021-02-04 04:02

I am sitting with a situation where I need to provision EC2 instances with some packages on startup. There are a couple of (enterprise/corporate) constraints that exist:

2条回答
  •  长发绾君心
    2021-02-04 04:18

    I have come across the same situation. As per my understanding

    • If you bring up your EC2 instances very frequently say 2 to 3 times a day then go with creating an customized AMI with packer and then call the ami through terraform.
    • If your base image ( AMI created by packer) change frequently based on your requirements then its good to go with packer. But for me running a packer scripts are very time consuming.
    • You can do the same with packer as well. You can write your requirements in a script and call it in terraform. By having everything incorporated in a terraform script would reduce some time

    Finally its your decision and your frequency of bringing up EC2 instances.

提交回复
热议问题