Azure / aztfexport

A tool to bring existing Azure resources under Terraform's management
https://azure.github.io/aztfexport/
Mozilla Public License 2.0
1.53k stars 174 forks source link

How to install this in WSL (Windows Subsystem for Linux) #497

Closed 825i closed 5 months ago

825i commented 5 months ago

I use WSL for everything and I've been able to make everything I need generally compatible with it.

What is the recommended way to install this in WSL?

When trying to install it using the package manager by adding the repo key, I get a permission denied error. This is strange because I can add any other keys without any issue.

curl -sSL https://packages.microsoft.com/keys/microsoft.asc > /etc/apt/trusted.gpg.d/microsoft.asc
zsh: Permission denied

At this location /etc/apt/trusted.gpg.d/ I do not have microsoft.asc but instead I have microsoft.gpg. Everything in this folder has a .gpg extension.

I'd rather not have to compile this myself and just link it to the package manager like normal.

825i commented 5 months ago

Ok so I found the solution whilst writing. I didn't have to add the Microsoft key at all for WSL Linux.

I skipped the step and continued with step 2: Add packages-microsoft-com-prod repository 22.04.

Then installed aztfexport with apt as normal and it all looks fine.