Will Terraform with custom_data work with cloud-init to configure a VM in Azure?

Goldyn, George 6 Reputation points
2022-08-18T21:12:00.637+00:00

I would like to use Terraform to configure a VM in Azure and cloud-init to apply custom_data. Is the only option to use the Azure CLI with the --custom-data parameter to pass in the cloud-init config file?

Azure Cloud Services
Azure Cloud Services
An Azure platform as a service offer that is used to deploy web and cloud applications.
635 questions
Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,116 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. deherman-MSFT 33,296 Reputation points Microsoft Employee
    2022-08-19T17:18:29.213+00:00

    @Goldyn, George
    I understand you are wanting to use Terraform and load the cloud-init using custom_data. Please correct me if I am misunderstanding the issue.

    Yes, you should be able to do this. I believe this blog post covers exactly what you are trying to do. Check it out and let me know if that helps.

    -------------------------------

    Please don’t forget to "Accept the answer" and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    Disclaimer: This response contains a reference to a third-party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there.
    There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

    2 people found this answer helpful.