labs/preventive-control/products/dmsendpoint/sc-dmsendpoint-products-role.yml [16:68]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AWSTemplateFormatVersion: 2010-09-09
Description: Create Service Catalog Product Role
Parameters:
  ProductRoleName:
    Description: Product IAM Role Name
    Type: String
  ProductPolicyName:
    Description: Product IAM Role Name
    Type: String

Resources:
  ProductRole:
    Type: 'AWS::IAM::Role'
    Properties:
      RoleName: !Ref ProductRoleName
      AssumeRolePolicyDocument:
        Version: 2012-10-17
        Statement:
          - Effect: Allow
            Principal:
              Service:
                - servicecatalog.amazonaws.com
            Action:
              - 'sts:AssumeRole'
      Path: /
      ManagedPolicyArns:
        - !Sub 'arn:aws:iam::${AWS::AccountId}:policy/${ProductPolicyName}'
      Policies:
        -
          PolicyName: "DMS"
          PolicyDocument:
            Version: "2012-10-17"
            Statement:
              -
                Effect: "Allow"
                Action:
                  - "dms:ListTagsForResource"
                  - "dms:DescribeReplicationInstances"
                  - "dms:CreateEndpoint"
                  - "dms:DescribeEndpointTypes"
                  - "dms:RemoveTagsFromResource"
                  - "dms:DescribeEndpoints"
                  - "dms:ModifyReplicationInstance"
                  - "dms:DeleteEndpoint"
                  - "dms:DeleteReplicationInstance"
                  - "dms:ModifyEndpoint"
                  - "dms:AddTagsToResource"
                  - "dms:CreateReplicationInstance"
                Resource: "*"
                
Outputs:
  ProductRoleArn:
    Value: !GetAtt ProductRole.Arn
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



labs/preventive-control/products/dmsinstance/sc-dmsinstance-products-role.yml [16:68]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AWSTemplateFormatVersion: 2010-09-09
Description: Create Service Catalog Product Role
Parameters:
  ProductRoleName:
    Description: Product IAM Role Name
    Type: String
  ProductPolicyName:
    Description: Product IAM Role Name
    Type: String

Resources:
  ProductRole:
    Type: 'AWS::IAM::Role'
    Properties:
      RoleName: !Ref ProductRoleName
      AssumeRolePolicyDocument:
        Version: 2012-10-17
        Statement:
          - Effect: Allow
            Principal:
              Service:
                - servicecatalog.amazonaws.com
            Action:
              - 'sts:AssumeRole'
      Path: /
      ManagedPolicyArns:
        - !Sub 'arn:aws:iam::${AWS::AccountId}:policy/${ProductPolicyName}'
      Policies:
        -
          PolicyName: "DMS"
          PolicyDocument:
            Version: "2012-10-17"
            Statement:
              -
                Effect: "Allow"
                Action:
                  - "dms:ListTagsForResource"
                  - "dms:DescribeReplicationInstances"
                  - "dms:CreateEndpoint"
                  - "dms:DescribeEndpointTypes"
                  - "dms:RemoveTagsFromResource"
                  - "dms:DescribeEndpoints"
                  - "dms:ModifyReplicationInstance"
                  - "dms:DeleteEndpoint"
                  - "dms:DeleteReplicationInstance"
                  - "dms:ModifyEndpoint"
                  - "dms:AddTagsToResource"
                  - "dms:CreateReplicationInstance"
                Resource: "*"
                
Outputs:
  ProductRoleArn:
    Value: !GetAtt ProductRole.Arn
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



