Reputation: 625
For every new fileshare
that we create in Azure Storage account
we get a connect
option
,
if we click connect
we get the below options,
is it possible to get that piece of code to mount this fileshare through terraform
? I could not find it anywhere. Any help on this would be appreciated
Upvotes: 1
Views: 1979
Reputation: 31424
Of course, it's possible. You just need to copy the code into a script and then use the VM extension to execute inside the VM. It's not complex at all. Here is an example.
But there is one thing you need to pay attention to, the VM extension only supports the non-interactive script. For example, the connect code for the Linux, the command sudo
is an interactive command, so it's not recommended to use in the VM extension. You can get more details about the VM extension here.
Upvotes: 2