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
3,508 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,980 points

Related Questions In Other DevOps Questions

+2 votes
1 answer

Error: Reference to undeclared resource in terraform code

Check the vpc declaration in subnets, internet ...READ MORE

answered Nov 17, 2019 in Other DevOps Questions by ahmed
24,424 views
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,890 points
2,853 views
+15 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 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,053 views
+2 votes
1 answer
0 votes
1 answer

sonar property file & Analysis properties are getting exclusion in them

I think following things should be kept ...READ MORE

answered Jun 5, 2018 in Other DevOps Questions by Damon Salvatore
• 5,980 points
1,952 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP