Giter Site home page Giter Site logo

az containerapp compose create command should have an option to use an existing Log Analytics workspace instead of creating a new one about azure-cli HOT 3 CLOSED

vienleidl avatar vienleidl commented on June 19, 2024
az containerapp compose create command should have an option to use an existing Log Analytics workspace instead of creating a new one

from azure-cli.

Comments (3)

yonzhan avatar yonzhan commented on June 19, 2024

Thank you for opening this issue, we will look into it.

from azure-cli.

Greedygre avatar Greedygre commented on June 19, 2024

Hi @vienleidl

In the az containerapp compose create command, if the specified environment name does not exist in the resource group or the environment resource Id does not exist, it will auto create a new environment will a new log workspace.

If you want to create an environment with exiting log workspace, you can use this:

$logs_workspace_customer_id=$(az monitor log-analytics workspace show -g {resource-group-name} -n {your-log-workspace-name} --query "customerId")
$logs_workspace_shared_key=$(az monitor log-analytics workspace get-shared-keys -g {resource-group-name} -n {your-log-workspace-name} --query "primarySharedKey")
az containerapp env create -n {name} -g {resource-group-name} --logs-workspace-id {logs_workspace_customer_id} --logs-workspace-key {logs_workspace_shared_key}

from azure-cli.

vienleidl avatar vienleidl commented on June 19, 2024

Hi @vienleidl

In the az containerapp compose create command, if the specified environment name does not exist in the resource group or the environment resource Id does not exist, it will auto create a new environment will a new log workspace.

If you want to create an environment with exiting log workspace, you can use this:

$logs_workspace_customer_id=$(az monitor log-analytics workspace show -g {resource-group-name} -n {your-log-workspace-name} --query "customerId")
$logs_workspace_shared_key=$(az monitor log-analytics workspace get-shared-keys -g {resource-group-name} -n {your-log-workspace-name} --query "primarySharedKey")
az containerapp env create -n {name} -g {resource-group-name} --logs-workspace-id {logs_workspace_customer_id} --logs-workspace-key {logs_workspace_shared_key}

Hi @Greedygre, gotcha & thank you! Now I can see that the LA workspace is sticked with the Container App Environment, it means the workspace should be created in advance.

from azure-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.