Azure / bicep-types-az

Bicep type definitions for ARM resources
MIT License
84 stars 27 forks source link

Deployment Script missing outputs property #2155

Open Virsukh3177 opened 5 months ago

Virsukh3177 commented 5 months ago

Resource Type

Microsoft.Resources/deploymentScripts

Api Version

2023-08-01

Issue Type

Missing property(s)

Other Notes

This code was working before now is throwing an exception: The type "object" does not contain property "outputs". Available properties include "arguments", "azCliVersion", "cleanupPreference", "containerSettings", "retentionInterval", "scriptContent", "storageAccountSettings", "timeout".

Bicep Repro

param scriptContent string
param arguments string

param storageAccountName string?

@description('Specifies the location for resources.')
param location string

@description('Provide a name suffix per CAF.')
param nameSuffixShort string

param subnetId string = ''

var configProperties = {
  azCliVersion: '2.51.0'
  arguments: arguments
  scriptContent: scriptContent
  timeout: 'PT60M'
  cleanupPreference: 'OnSuccess'
  retentionInterval: 'P1D'
  storageAccountSettings: !empty(subnetId) ? {
    storageAccountName: storageAccountName
  } : null
  containerSettings: !empty(subnetId) ? {
    subnetIds: [
      {
        id: subnetId
      }
    ]
  } : null
}

resource deploymentCliScript 'Microsoft.Resources/deploymentScripts@2023-08-01' = {
  name: 'executeAzCli'
  location: location
  kind: 'AzureCLI'
  identity: {
    type: 'UserAssigned'
    userAssignedIdentities: {
       '${managedIdentity.id}': {}
    }
  }
  properties: configProperties
}

output values object = deploymentCliScript.properties.outputs 

Confirm

anthony-c-martin commented 5 months ago

@Virsukh3177 which version of Bicep are you using? I can't repro this with 0.27.1 using your code sample

Virsukh3177 commented 4 months ago

@anthony-c-martin I'm using this 0.27.1 version.