Refactor remote-exec inline code into scripts
Closed this issue · 2 comments
jamierajewski commented
The terraform remote-exec blocks are getting quite messy - it would be preferable to:
- Move them to script(s)
- Copy the scripts using the
file
provisioner - Running them with
remote-exec
'sinline
mode and passing terraform variables as command-line options - At the end, remove these scripts from the instances
jamierajewski commented
A better alternative - using cloud-init
and templates to fill in the IPs. Example here.
jamierajewski commented
Closed by 3d1860c