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

Add ability to setup 'condition:' for Service deployment #4732

Open
crpietschmann opened this issue Jan 26, 2025 · 0 comments
Open

Add ability to setup 'condition:' for Service deployment #4732

crpietschmann opened this issue Jan 26, 2025 · 0 comments
Labels

Comments

@crpietschmann
Copy link

I'm trying to setup an AZD template that deploys a solution with multiple services, including a service that I want to be deployed only if a specific input parameter to the Azure Bicep is set to 'true'. Such as 'DEPLOY_AML_MODEL' = 'true'. I'm using this to conditionally provision Azure Resources in the 'infra' provisioning. In my case it's an Azure Machine Learning service. I'm using an AZD service to deploy the AML Model, and I'd like to have that model deployment conditional based on if the infra has provisioned the AML service or not.

I'd like to add a 'condition' element to the Service, when evaluated to be 'true' will trigger the deployment, when 'false' it wont deploy the service, like this:

condition: ${DEPLOY_AML_MODEL}

Here's an example of what I'm trying to do when setting up the Azure Machine Learning model deployment within the azure.yaml:

  AMLReranker:
    condition: ${DEPLOY_AML_MODEL}
    project: ./src/amlreranker
    host: ai.endpoint
    config:
      workspace: ${AZURE_AML_WORKSPACE_NAME}
      model:
        path: ./model/
        code_configuration:
          code: ./scoring/
          scoring_script: score_bgev2m3_aml.py
        environment:
          name: bgev2m3-env 
          build: 
            path: ./environment/
        instance_type: STANDARD_D16AS_V4
        instance_count: 1
        request_settings:
          request_timeout_ms: 120000
    dependsOn:
      - infra

It would be really amazing if azd could implement this functionality! Thanks!

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

No branches or pull requests

2 participants