chatops-lex-bot/devops.yml [15:79]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Resources:
    CodeRepository:
        Type: AWS::CodeCommit::Repository
        Properties:
          RepositoryName: !Ref ProjectName
          RepositoryDescription:
            !Join
              - ''
              - - "CodeCommit repository for "
                - !Ref ProjectName
          Code:
            S3: 
              Bucket: !Ref CodeS3Bucket
              Key: !Sub '${ProjectName}.zip'
          Tags:
            - 
              Key: "Stack"
              Value: !Ref AWS::StackName
            -
              Key: "Project"
              Value: !Ref ProjectName
    BuildArtifactsBucket:
        Type: AWS::S3::Bucket
        Properties:
          BucketName: !Sub 'pipeline-staging-${ProjectName}'
          BucketEncryption:
            ServerSideEncryptionConfiguration:
              - ServerSideEncryptionByDefault:
                  SSEAlgorithm: AES256
          Tags: 
            - 
              Key: "Stack"
              Value: !Ref AWS::StackName
            -
              Key: "Project"
              Value: !Ref ProjectName

    CodeBuildProject:
        Type: AWS::CodeBuild::Project
        Properties:
            Name: !Sub ${ProjectName}-Build
            Description: !Sub 'Build project for the ${ProjectName}'
            Artifacts:
              Type: CODEPIPELINE
            Environment: 
                Type: LINUX_CONTAINER
                ComputeType: BUILD_GENERAL1_SMALL
                Image: aws/codebuild/amazonlinux2-x86_64-standard:2.0 #  https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html
                EnvironmentVariables:
                  - 
                    Name: PACKAGE_BUCKET
                    Value: !Ref BuildArtifactsBucket
            Cache:
              Type: S3
              Location: !Sub ${BuildArtifactsBucket}/codebuild-cache
            ServiceRole: !GetAtt CodeBuildServiceRole.Arn
            Source: 
                Type: CODEPIPELINE
            Tags: 
              - 
                Key: "Stack"
                Value: !Ref AWS::StackName
              -
                Key: "Project"
                Value: !Ref ProjectName
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



devops.yml [26:91]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Resources:

    CodeRepository:
        Type: AWS::CodeCommit::Repository
        Properties:
          RepositoryName: !Ref ProjectName
          RepositoryDescription:
            !Join
              - ''
              - - "CodeCommit repository for "
                - !Ref ProjectName
          Code:
            S3: 
              Bucket: !Ref CodeS3Bucket
              Key: !Sub '${ProjectName}.zip'
          Tags:
            - 
              Key: "Stack"
              Value: !Ref AWS::StackName
            -
              Key: "Project"
              Value: !Ref ProjectName
    BuildArtifactsBucket:
        Type: AWS::S3::Bucket
        Properties:
          BucketName: !Sub 'pipeline-staging-${ProjectName}'
          BucketEncryption:
            ServerSideEncryptionConfiguration:
              - ServerSideEncryptionByDefault:
                  SSEAlgorithm: AES256
          Tags: 
            - 
              Key: "Stack"
              Value: !Ref AWS::StackName
            -
              Key: "Project"
              Value: !Ref ProjectName

    CodeBuildProject:
        Type: AWS::CodeBuild::Project
        Properties:
            Name: !Sub ${ProjectName}-Build
            Description: !Sub 'Build project for the ${ProjectName}'
            Artifacts:
              Type: CODEPIPELINE
            Environment: 
                Type: LINUX_CONTAINER
                ComputeType: BUILD_GENERAL1_SMALL
                Image: aws/codebuild/amazonlinux2-x86_64-standard:2.0 #  https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html
                EnvironmentVariables:
                  - 
                    Name: PACKAGE_BUCKET
                    Value: !Ref BuildArtifactsBucket
            Cache:
              Type: S3
              Location: !Sub ${BuildArtifactsBucket}/codebuild-cache
            ServiceRole: !GetAtt CodeBuildServiceRole.Arn
            Source: 
                Type: CODEPIPELINE
            Tags: 
              - 
                Key: "Stack"
                Value: !Ref AWS::StackName
              -
                Key: "Project"
                Value: !Ref ProjectName
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



