pipelines.yaml [37:66]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      VersioningConfiguration:
        Status: Enabled

  S3BucketOrgPolicy: # S3 bucket policy allows remote account's access to cloudformation templates.
    Type: AWS::S3::BucketPolicy
    Properties:
      Bucket: !Ref 'S3Bucket'
      PolicyDocument:
        Id: defaultOrgAccessPolicy
        Version: '2012-10-17'
        Statement:
          - Sid: bucketPermissionsCheck
            Effect: Allow
            Action:
              - s3:GetBucketAcl
            Principal: "*"
            Resource: !GetAtt S3Bucket.Arn
            Condition:
              StringEquals:
                aws:PrincipalOrgID: !Ref OrganizationID
          - Sid: AllowObjectReadWrite
            Effect: Allow
            Action:
              - s3:GetObject
              - s3:PutObject
            Principal: "*"
            Resource: !Join ['/', [ !GetAtt S3Bucket.Arn, '*']]
            Condition:
              StringEquals:
                aws:PrincipalOrgID: !Ref OrganizationID
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



pipelines.yaml [151:180]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
              VersioningConfiguration:
                Status: Enabled

          S3BucketOrgPolicy: # S3 bucket policy allows remote account's access to cloudformation templates.
            Type: AWS::S3::BucketPolicy
            Properties:
              Bucket: !Ref 'S3Bucket'
              PolicyDocument:
                Id: defaultOrgAccessPolicy
                Version: '2012-10-17'
                Statement:
                  - Sid: bucketPermissionsCheck
                    Effect: Allow
                    Action:
                      - s3:GetBucketAcl
                    Principal: "*"
                    Resource: !GetAtt S3Bucket.Arn
                    Condition:
                      StringEquals:
                        aws:PrincipalOrgID: !Ref OrganizationID
                  - Sid: AllowObjectReadWrite
                    Effect: Allow
                    Action:
                      - s3:GetObject
                      - s3:PutObject
                    Principal: "*"
                    Resource: !Join ['/', [ !GetAtt S3Bucket.Arn, '*']]
                    Condition:
                      StringEquals:
                        aws:PrincipalOrgID: !Ref OrganizationID
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



