templates/AWSQuickstart-MSSQL.yml [951:988]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Parameters:
      commands: 
        - |     
           function DscStatusCheck () {
               $LCMState = (Get-DscLocalConfigurationManager).LCMState
               if ($LCMState -eq 'PendingConfiguration' -Or $LCMState -eq 'PendingReboot') {
                   'returning 3010, should continue after reboot'
                   exit 3010
               } else {
                 'Completed'
               }
           }
           
           Start-DscConfiguration 'C:\AWSQuickstart\AddAG' -Wait -Verbose -Force

           DscStatusCheck
- name: AdditionalCreateAGBranch
  action: aws:branch
  inputs:
    Choices:
    - Or:
      - Variable: "{{ThirdAZ}}"
        StringEquals: "no"
      - Variable: "{{ThirdAZ}}"
        StringEquals: "witness"
      NextStep: 2NodeAdditionalCreateAG
    - Variable: "{{ThirdAZ}}"
      StringEquals: "full"
      NextStep: 3NodeAdditionalCreateAG
- name: "2NodeAdditionalCreateAG"
  action: "aws:runCommand"
  onFailure: "step:signalfailure"
  inputs:
    DocumentName: "AWS-RunRemoteScript"
    InstanceIds:
      - "{{wsfcNode2InstanceId.InstanceId}}"
    CloudWatchOutputConfig:
      CloudWatchOutputEnabled: "true"
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



templates/sql.template.yaml [2138:2175]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            Parameters:
              commands: 
                - |     
                   function DscStatusCheck () {
                       $LCMState = (Get-DscLocalConfigurationManager).LCMState
                       if ($LCMState -eq 'PendingConfiguration' -Or $LCMState -eq 'PendingReboot') {
                           'returning 3010, should continue after reboot'
                           exit 3010
                       } else {
                         'Completed'
                       }
                   }
                   
                   Start-DscConfiguration 'C:\AWSQuickstart\AddAG' -Wait -Verbose -Force
        
                   DscStatusCheck
        - name: AdditionalCreateAGBranch
          action: aws:branch
          inputs:
            Choices:
            - Or:
              - Variable: "{{ThirdAZ}}"
                StringEquals: "no"
              - Variable: "{{ThirdAZ}}"
                StringEquals: "witness"
              NextStep: 2NodeAdditionalCreateAG
            - Variable: "{{ThirdAZ}}"
              StringEquals: "full"
              NextStep: 3NodeAdditionalCreateAG
        - name: "2NodeAdditionalCreateAG"
          action: "aws:runCommand"
          onFailure: "step:signalfailure"
          inputs:
            DocumentName: "AWS-RunRemoteScript"
            InstanceIds:
              - "{{wsfcNode2InstanceId.InstanceId}}"
            CloudWatchOutputConfig:
              CloudWatchOutputEnabled: "true"
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



