HiveBrain v1.2.0
Get Started
← Back to all entries
patterndockerMinor

terraform - how should I clone my code repo?

Submitted by: @import:stackexchange-devops··
0
Viewed 0 times
howreposhouldcodecloneterraform

Problem

I have a very simple terraform configuration. I boot up an aws instance of Ubuntu trusty and assign a security group.

My question is who is responsible of getting the latest code from my code repo? is it a bash script in terraform user_data argument or should I make a modified AMI that has a bash script to pull the code repo.

Basically my repo has docker configuration in it and all i need is to clone and do docker-compose -f env.yml up

Solution

You can achieve the clone of the repo and the execution of docker-compose in several ways.

You are right when you think that cloud-init could do that. Check this link for more information

Context

StackExchange DevOps Q#1701, answer score: 1

Revisions (0)

No revisions yet.