-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Application Insights resources #5543
Comments
For the record, this is how I'm doing it now. But being able to do this in a cleaner way and also having a command to create and retrieve application instrumentation keys would be nice: az resource create \
--resource-group $RESOURCE_GROUP \
--resource-type "Microsoft.Insights/components" \
--name $NAMESPACE_PREFIX-appinsights \
--location $PRIMARY_LOCATION \
--properties '{"ApplicationId":"facerecognition","Application_Type":"other", "Flow_Type":"Redfield", "Request_Source":"IbizaAIExtension"}' |
Thanks for the command..
|
Thanks for the tips, but any ETA on when there will be an az insights cli command? |
Does anyone know how to create an API key through the CLI? |
cc @nikmd23, this would be helpful for programmatically setting up an app insights space and referencing the instrumentation key. |
This does work. However, when I "connect" the resulting Application Insights to an app service (function app) by using the instrumentation key the Application Map seems not to work. Any ideas on that? |
I've looped in the right people at AppInsights to see this thread! |
@yugangw-msft az resource create --resource-group myresourcegroup --name myappinsights --resource-type Microsoft.Insights/components --location southcentralus --properties '{"Application_Type":"web"}' Error: Am I missing anything here ? |
@kuvinodms It can be really hard to escape the properties JSON correctly. So I tend to save it to a JSON file and then pass it to the Azure CLI with the Here's an example using PowerShell and the Azure CLI:
see my article here |
Thank you @markheath, file approach did work for me. |
The file approach works just as expected, but if anybody wants to use the command in PowerShell without writing to a file, the JSON can be escaped adding a \ in the double quotes works, like this:
|
@NicoSorrenti thanks - I thought I'd tried that, but I'll give it another go. |
Closing. PR made from @alexeldeib has taken care of this. |
Is there a roadmap for creating App Insights resources via the CLI without resorting to
resource create
?The text was updated successfully, but these errors were encountered: