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,240 points
349 views

1 answer to this question.

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,510 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,810 points
273 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,520 points
133 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,810 points
65 views
0 votes
1 answer
+13 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,380 points
124 views
0 votes
1 answer
0 votes
1 answer