Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Azure Function to execute a Shell Script/Function #1794

Closed
chirangaalwis opened this issue Nov 29, 2020 · 4 comments
Closed

[Question] Azure Function to execute a Shell Script/Function #1794

chirangaalwis opened this issue Nov 29, 2020 · 4 comments

Comments

@chirangaalwis
Copy link

What language does your question apply to? (e.g. C#, JavaScript, Java, All)

Shell scripting

Question

I am in need of executing a Linux Shell based script at an event trigger in Azure (most specifically for Azure Key Vault Secret rotation).

  • Is it possible to execute a Shell Script (in the form of a Shell Function) via a an Azure Function to achieve the above?
  • If yes, do you have any documentation of guidelines/samples which would aid in achieving this?
@balag0
Copy link

balag0 commented Nov 30, 2020

Shell script is not a supported language. So recommend using one of the languages with first class support since this might break in the future even if you are able to get it working now.

https://docs.microsoft.com/en-us/azure/azure-functions/supported-languages

@anthonychu
Copy link
Member

Based on what you're trying to do, here are a couple of alternatives:

  • Use PowerShell Azure Functions - you can leverage the Az PowerShell module directly to work with Key Vault
  • Use the Key Vault SDK with any of the supported languages to programmatically interact with Key Vault

In both of these cases, you can leverage Managed Identity to access Key Vault using the function app's identity.

@chirangaalwis
Copy link
Author

chirangaalwis commented Nov 30, 2020

Based on what you're trying to do, here are a couple of alternatives:

  • Use PowerShell Azure Functions - you can leverage the Az PowerShell module directly to work with Key Vault
  • Use the Key Vault SDK with any of the supported languages to programmatically interact with Key Vault

In both of these cases, you can leverage Managed Identity to access Key Vault using the function app's identity.

@balag0 @anthonychu +1, I am currently following the option 2 with Managed Identity.

Thanks for the input.

@v-anvari
Copy link

Closing the issue as resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants