fsprojects / AzureStorageTypeProvider

An F# Azure Type Provider which can be used to explore Blob, Table and Queue Azure Storage assets and easily apply CRUD operations on them.
http://fsprojects.github.io/AzureStorageTypeProvider/
The Unlicense
84 stars 34 forks source link

Allow account details to be loaded via a file #31

Closed TWith2Sugars closed 8 years ago

TWith2Sugars commented 10 years ago

I prefer not to commit account details in to source control but with the provider as it currently stands I have no other choice.

Would be good if I could pass a file location which contain those details.

isaacabraham commented 10 years ago

Good idea. In the meantime, what I would suggest (and this is an approach I've used thus far) is to create a separate file e.g. .fsx or .fs which contains the storage key as a [Literal], and reference this in your code that connects to storage

e.g. type MyAccount = AzureTypeProvider<"myAccount", StorageKeys.SecretKey>

where StorageKeys is a module and SecretKey is the literal that contains the access key.

You can commit this file with an empty string and then place it in .gitignore.

TWith2Sugars commented 10 years ago

Good idea, also this is an example of loading from a file that I was given: https://github.com/fsprojects/DynamicsCRMProvider/blob/master/src/XrmDesignTime.fs#L438

isaacabraham commented 8 years ago

@dsyme is it worth us implementing something for this here - or do you know if there's any work anyone is planning to do with ProvidedTypes.fs to give this sort of functionality OOTB?

isaacabraham commented 8 years ago

Closed from #62.