Terraform - should I use user_data or provisioner to bootstrap a resource?

前端 未结 2 1079
礼貌的吻别
礼貌的吻别 2021-02-20 15:15

It seems like I can use either user_data with a template file or a \"remote-exec\" provisioner with inline commands to bootstrap. So which one is consi

2条回答
  •  醉酒成梦
    2021-02-20 15:32

    Though I do agree with Josh, if there are no run time changes to the instance you can use packer to build an ami and then use that in the launch config. That way you don't have to wait for user-data to run.

    Packer is part of the Hashicorp family of tools

    https://www.packer.io/docs/builders/amazon-ebs.html

提交回复
热议问题