Giter Site home page Giter Site logo

Comments (5)

anthony-c-martin avatar anthony-c-martin commented on September 4, 2024

Feels related to Azure/bicep#2405

from bicep-types-az.

stephaniezyen avatar stephaniezyen commented on September 4, 2024

We will track the improvement on the issue linked, but will also route it to the VM Resource Provider.

from bicep-types-az.

 avatar commented on September 4, 2024

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Drewm3, @TravisCragg-MSFT, @nikhilpatel909, @sandeepraichura, @hilaryw29, @GabstaMSFT. Please see https://aka.ms/biceptypesinfo for troubleshooting help.

Issue Details

When deploying a VM, I use a run command in my bicep template to it. I cannot use cloud-init because the commands need to run after the extensions have been successfully added. A run command will successfully provision regardless of the exit status of the script. It would be nice to have a way to fail the deployment if the runCommand.properties.instanceView.exitStatus was not 0. Otherwise, the deployment succeeds and I think everything is good to go, when in reality the configuration failed. Below is an example:

resource configPart1 'Microsoft.Compute/virtualMachines/runCommands@2022-11-01' = {
  name: 'configPart1'
  parent: vm
  location: location
  properties: {
    protectedParameters: [{
        name: VAR_1
        value: VALUE_1
    }]
    source: {
      script: '/oops'
    }
  }
}

if (configPart1.properties.instanceView.exitStatus) {
    throw error
}
Author: matferrari-msft
Assignees: -
Labels:

enhancement, Needs: Triage :mag:, Service Attention, Compute - VM

Milestone: -

from bicep-types-az.

nikhilpatel909 avatar nikhilpatel909 commented on September 4, 2024

ack, reviewing it

from bicep-types-az.

matferrari-msft avatar matferrari-msft commented on September 4, 2024

@nikhilpatel909 Is there an update on this? Thanks!

from bicep-types-az.

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.