Search code examples
cloud-init

Advantages of cloud-init runcmd over a user data 'shell' script


Other than the order of execution (cloud_config_modules v cloud_final_modules respectively), what reason would I have to use runcmd over a user data script in a cloud-init setup?


Solution

  • There is no other advantage unless you're using the cloud-config for other purposes. Passing a shell script (starting with #!) will generally be easier than using runcmd.