Please Update New-AzureRmAutomationModule to Allow Upload From Local Source
The New-AzureRmAutomationModule appears to only take a URI (-ContentLink) location to upload zipped modules from. Can we please get an update to allow an upload from a local directory (-Path)? You are currently able to do this from the Azure Automation DSC UI.
Many thanks!
@jodoglevy Can you take a look?
You can use the Azure Storage cmdlets to upload a local module zip to Azure Blob Storage, and then pass the URI to that module in Azure Blob Storage via New-AzureRmAutomationModule.
That said, I will open an internal bug to track this.
Thanks for the quick response Joe. The use case I have would involve customers that are disinclined to publish their custom modules to a location that's publicly viewable and anonymously accessible. Rather, they would prefer to store their modules in their internal environment and publish directly from there using either a local or UNC path.
In terms of the ContentLink to the module zip needing to be public, that is not that case. Azure Blob Storage supports SAS links. Using SAS links, you can give temporary, read-only access to a private blob only to those who pass the correct SAS key. For more info please see: https://azure.microsoft.com/en-us/documentation/articles/storage-dotnet-shared-access-signature-part-1/
Alrighty. So I have this working. But doesn't it still seem redundant to have to upload the files to a blob store to be moved over to where Azure Automation stores the modules? This seems like additional work that doesn't need to be added from an automation perspective.
The Set-AzureRmAutomationModule command appears to accept the local path, but the resource must exist under Azure. A workaround would be to create the empty module and then update it. Except that the uri of the New-AzureRmAutomationModule command is mandatory. It's like the chicken and the egg!
+1 this request. The portal supports this feature, so I think the Cmdlet should support it.
552 days.. is the intention to fix this?
+1. This would be really useful for us.
+1 this would be very nice to have.
@vrdmr Can you take a look at this feature request?
Evaluating this feature. will be making it part of the team backlog.
+1
C'mon peeps! Still open after 2 years and 2 months?! Getting this done would really help to make the deployment story simpler.
Have the same need, but since this ticket has not been closed for over two years... Wasn't powershell supposed to to do everything that GUIs can and more?
:(
Two and a half YEARS later.. FFS
Because there are reasonable workarounds: (a) Portal lets you upload from local file. (b) Also, you can upload to storage blob and then pass URI to cmdlet. The community is welcome to help.
Yeah, we've all worked around it and no clicking in the UI was required, thankfully.
For automated deployments from a release definition clicking in the portal is not a viable workaround. Uploading to blob storage and then passing the URL is a workaround that we actually use, we know it can be done. My comment was meant to point out that GUI allows you to do something that command line does not. Comments in this thread show that at least some of your users do miss this possibility in the command line.
But workaround with blob doesn't accept using of private blobs, so the link should be public...