What is User Data in AWS, Azure, or Terraform?

Problem scenario
You have heard about user data in AWS, Azure, or Terraform. What is it? What does user data include?

AWS User Data versus Terraform User Data

Answer for AWS
Generally it is a customization that the account owner configured to apply to an EC-2 instance when it first launches. It is either a shell script or a cloud-init directive that is used when an EC-2 instance is launched (according to Amazon's website).

Shell scripts that the customer provides are self-explanatory. The cloud-init directives are for SSH key configuration (according to Amazon's website).

Answer for Azure
"User data is a set of scripts or other metadata, that will be inserted to an Azure virtual machine at provision time." This was taken from Microsoft's website.

As of 10/31/21 in Azure, it can be called Custom Data or User Data. This picture was taken on Halloween of 2021:

We think it will only be called User Data in the future.

Answer for Terraform
It is one or more bash commands that run when a server is initially created and booted (according to page 14 of Terraform Up & Running).

Leave a comment

Your email address will not be published. Required fields are marked *