Resources:
  AccountGateFunctionRole:
    Type: 'AWS::IAM::Role'
    Properties:
      AssumeRolePolicyDocument:
        Version: '2012-10-17'
        Statement:
          -
            Effect: Allow
            Principal:
              Service:
                - lambda.amazonaws.com
            Action:
              - 'sts:AssumeRole'
      ManagedPolicyArns:
        - 'arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole'
  AccountGateFunction:
    Type: 'AWS::Lambda::Function'
    Properties:
      FunctionName: 'AWSCloudFormationStackSetAccountGate'
      Code:
        ZipFile: |
          exports.handler = (event, context, callback) => {
              callback(null, {
                  'Status': 'FAILED'
              });
          };
      Handler: index.handler
      MemorySize: 128
      Runtime: nodejs20.x
      Timeout: 10
      Role: !GetAtt AccountGateFunctionRole.Arn
