templates/AWSQuickstart-MSSQL.yml [543:591]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    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\AdditionalWSFCNode' -Wait -Verbose -Force

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



templates/sql.template.yaml [1630:1678]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            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\AdditionalWSFCNode' -Wait -Verbose -Force
        
                   DscStatusCheck
        - name: SqlInstallBranch
          action: aws:branch
          inputs:
            Choices:
            - Variable: "{{SQLLicenseProvided}}"
              StringEquals: "no"
              NextStep: NodesSqlInstallBranch
            - Variable: "{{SQLLicenseProvided}}"
              StringEquals: "yes"
              NextStep: NodesReconfigureSQLBranch
        - name: NodesSqlInstallBranch
          action: aws:branch
          inputs:
            Choices:
            - Or:
              - Variable: "{{ThirdAZ}}"
                StringEquals: "no"
              - Variable: "{{ThirdAZ}}"
                StringEquals: "witness"
              NextStep: 2NodeDownloadSQL
            - Variable: "{{ThirdAZ}}"
              StringEquals: "full"
              NextStep: 3NodeDownloadSQL
        - name: "2NodeDownloadSQL"
          action: "aws:runCommand"
          onFailure: "step:signalfailure" 
          inputs:
            DocumentName: "AWS-RunRemoteScript"
            InstanceIds:
              - "{{wsfcNode1InstanceId.InstanceId}}"
              - "{{wsfcNode2InstanceId.InstanceId}}"
            CloudWatchOutputConfig:
              CloudWatchOutputEnabled: "true"
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



