templates/mongodb-atlas-peering.template.yaml [145:186]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Resources:
  AtlasApiKeySecret:
    Type: 'AWS::SecretsManager::Secret'
    Properties:
      Name: !Sub "${AWS::StackName}-ApiKey-Secret"
      Description: MongoDB Atlas API Key
      #
      # { "PublicKey" : "xxx", "PrivateKey", "yyy", "OrgId": "zzz" }
      #
      SecretString: !Join ['', ['{"PublicKey":"', !Ref "PublicKey",'", "PrivateKey":"', !Ref "PrivateKey", '", "OrgId":"', !Ref "OrgId", '"}'] ]
      Tags:
      - Key: mongodb-atlas-quickstart-stack 
        Value: !Sub "${AWS::StackName}"
  AtlasIAMRole:
    Type: AWS::IAM::Role
    Properties:
      AssumeRolePolicyDocument:
        Version: 2012-10-17
        Statement:
        - Effect: Allow
          Principal:
            AWS: !Sub "arn:aws:iam::${AWS::AccountId}:root"
          Action: 'sts:AssumeRole'
  AtlasProject:
    Type: MongoDB::Atlas::Project
    DependsOn: AtlasIAMRole
    Properties:
      OrgId: !Ref "OrgId" 
      ApiKeys:
        PublicKey:  !Ref "PublicKey"
        PrivateKey: !Ref "PrivateKey"
      Name: !Ref "ProjectName"
  AtlasProjectIPAccessList:
    Type: MongoDB::Atlas::ProjectIpAccessList
    Properties:
      ProjectId: !Ref "AtlasProject"
      ApiKeys:
        PublicKey:  !Ref "PublicKey"
        PrivateKey: !Ref "PrivateKey"
      AccessList:
      - IPAddress: "0.0.0.0/1"
        Comment: "Testing open all ips"
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



templates/mongodb-atlas.template.yaml [130:171]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Resources:
  AtlasApiKeySecret:
    Type: 'AWS::SecretsManager::Secret'
    Properties:
      Name: !Sub "${AWS::StackName}-ApiKey-Secret"
      Description: MongoDB Atlas API Key
      #
      # { "PublicKey" : "xxx", "PrivateKey", "yyy", "OrgId": "zzz" }
      #
      SecretString: !Join ['', ['{"PublicKey":"', !Ref "PublicKey",'", "PrivateKey":"', !Ref "PrivateKey", '", "OrgId":"', !Ref "OrgId", '"}'] ]
      Tags:
      - Key: mongodb-atlas-quickstart-stack 
        Value: !Sub "${AWS::StackName}"
  AtlasIAMRole:
    Type: AWS::IAM::Role
    Properties:
      AssumeRolePolicyDocument:
        Version: 2012-10-17
        Statement:
        - Effect: Allow
          Principal:
            AWS: !Sub "arn:aws:iam::${AWS::AccountId}:root"
          Action: 'sts:AssumeRole'
  AtlasProject:
    Type: MongoDB::Atlas::Project
    DependsOn: AtlasIAMRole
    Properties:
      OrgId: !Ref "OrgId" 
      ApiKeys:
        PublicKey:  !Ref "PublicKey"
        PrivateKey: !Ref "PrivateKey"
      Name: !Ref "ProjectName"
  AtlasProjectIPAccessList:
    Type: MongoDB::Atlas::ProjectIpAccessList
    Properties:
      ProjectId: !Ref "AtlasProject"
      ApiKeys:
        PublicKey:  !Ref "PublicKey"
        PrivateKey: !Ref "PrivateKey"
      AccessList:
      - IPAddress: "0.0.0.0/1"
        Comment: "Testing open all ips"
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



