Which should be prefereble between user_data and provisioner to bootstrap a resource in Terraform?

0 votes
I can use user_data with a template file or a "remote-exec" provisioner with inline commands to bootstrap. Which one would be more ideal to use?

Can anyone help me with this?

Thanks
May 31, 2018 in Other DevOps Questions by Atul
• 10,220 points
307 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

user_data should be used as it is ideal and  user data is native to AWS, and the remote-exec provisioner is specific only to Terraform, which is just a way to call the AWS API.

You can view user_data on AWS console, and often an important part of using Auto Scaling Groups in AWS, where you want each EC2 Instance to execute the same config code when it launches. Terraform's remote-exec provisioner can not do that.

I hope that above information will be helpful to you.

answered Jun 1, 2018 by Damon Salvatore
• 5,470 points

Related Questions In Other DevOps Questions

0 votes
1 answer

How to get issues count based on rules in a sonar project?

There are API docs in the footer ...READ MORE

answered May 4, 2018 in Other DevOps Questions by DareDev
• 6,710 points
181 views
+1 vote
2 answers

When do we use Chef or Azure SDK to create VM and deploy in automation

The solution to the automated deployment in ...READ MORE

answered Aug 21, 2018 in Other DevOps Questions by Priyaj
• 56,140 points
114 views
0 votes
1 answer

Using conditional to execute a command in salt

You can use unless inside your state ...READ MORE

answered Jul 23, 2018 in Other DevOps Questions by DareDev
• 6,710 points
45 views
0 votes
1 answer
+13 votes
2 answers
0 votes
1 answer
0 votes
1 answer

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.