templates/mssqlfsx-mad.template.yaml [1416:1466]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  ResourceGroup:
    Type: AWS::ResourceGroups::Group
    Properties:
      Name: !Ref 'ResourceGroupName'
      Description: "A resource group for SQL servers"
      ResourceQuery:
        Type:
          "TAG_FILTERS_1_0" 
        Query:
          ResourceTypeFilters: 
            - "AWS::EC2::Instance" 
          TagFilters:
            - 
              Key: ResourceGroup
              Values: 
                - !Ref ResourceGroupName
  AppInsightsForSQLHA:
    Condition: EnableAppInsightForSQLHA
    DependsOn: SSMWaitCondition
    Type: AWS::ApplicationInsights::Application
    Properties:
      ResourceGroupName: !Ref 'ResourceGroupName'
      AutoConfigurationEnabled: false
      CustomComponents:
        - ComponentName: !Sub 'SQLHAClusterInstances-${ApplicationName}'
          ResourceList:
            - !Sub 'arn:${AWS::Partition}:ec2:${AWS::Region}:${AWS::AccountId}:instance/${SqlFSxInstance1}'
            - !Sub 'arn:${AWS::Partition}:ec2:${AWS::Region}:${AWS::AccountId}:instance/${SqlFSxInstance2}'

      ComponentMonitoringSettings:
        - ComponentName: !Sub 'SQLHAClusterInstances-${ApplicationName}'
          Tier: SQL_SERVER_ALWAYSON_AVAILABILITY_GROUP
          ComponentConfigurationMode: DEFAULT_WITH_OVERWRITE
          DefaultOverwriteComponentConfiguration:
            SubComponentTypeConfigurations:
              - SubComponentType: AWS::EC2::Instance
                SubComponentConfigurationDetails:
                  Logs:
                    - LogGroupName: !Sub 'SQL_SERVER-${ResourceGroupName}'
                      LogType: SQL_SERVER
                      LogPath: C:\Program Files\Microsoft SQL Server\MSSQL**.MSSQLSERVER\MSSQL\Log\ERRORLOG
      Tags:
        - Key: SourceTemplate
          Value: AWSQuickStart
Outputs:
  InstanceIP:
    Description: "Private IP address of SqlFSx instance."
    Value: !GetAtt SqlFSxInstance1.PrivateIp
  Postdeployment:
    Value: https://fwd.aws/5XG6A
    Description: See the deployment guide for post-deployment steps.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



templates/mssqlfsx.template.yaml [1413:1463]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  ResourceGroup:
    Type: AWS::ResourceGroups::Group
    Properties:
      Name: !Ref 'ResourceGroupName'
      Description: "A resource group for SQL servers"
      ResourceQuery:
        Type:
          "TAG_FILTERS_1_0" 
        Query:
          ResourceTypeFilters: 
            - "AWS::EC2::Instance" 
          TagFilters:
            - 
              Key: ResourceGroup
              Values: 
                - !Ref ResourceGroupName
  AppInsightsForSQLHA:
    Condition: EnableAppInsightForSQLHA
    DependsOn: SSMWaitCondition
    Type: AWS::ApplicationInsights::Application
    Properties:
      ResourceGroupName: !Ref 'ResourceGroupName'
      AutoConfigurationEnabled: false
      CustomComponents:
        - ComponentName: !Sub 'SQLHAClusterInstances-${ApplicationName}'
          ResourceList:
            - !Sub 'arn:${AWS::Partition}:ec2:${AWS::Region}:${AWS::AccountId}:instance/${SqlFSxInstance1}'
            - !Sub 'arn:${AWS::Partition}:ec2:${AWS::Region}:${AWS::AccountId}:instance/${SqlFSxInstance2}'

      ComponentMonitoringSettings:
        - ComponentName: !Sub 'SQLHAClusterInstances-${ApplicationName}'
          Tier: SQL_SERVER_ALWAYSON_AVAILABILITY_GROUP
          ComponentConfigurationMode: DEFAULT_WITH_OVERWRITE
          DefaultOverwriteComponentConfiguration:
            SubComponentTypeConfigurations:
              - SubComponentType: AWS::EC2::Instance
                SubComponentConfigurationDetails:
                  Logs:
                    - LogGroupName: !Sub 'SQL_SERVER-${ResourceGroupName}'
                      LogType: SQL_SERVER
                      LogPath: C:\Program Files\Microsoft SQL Server\MSSQL**.MSSQLSERVER\MSSQL\Log\ERRORLOG
      Tags:
        - Key: SourceTemplate
          Value: AWSQuickStart
Outputs:
  InstanceIP:
    Description: "Private IP address of SqlFSx instance."
    Value: !GetAtt SqlFSxInstance1.PrivateIp
  Postdeployment:
    Value: https://fwd.aws/5XG6A
    Description: See the deployment guide for post-deployment steps.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



