Is secretsmanager dynamic reference works in Glue Cloudformation?

213 Views Asked by At

I am trying to create a Document Db connection in Glue Cloudformation with secret manager dynamic reference

({{resolve:secretsmanager:${DBSecretManagerArn}:SecretString:username}})

During build there is no evaluation failure but before the job finishes it failed - An error occurred (ValidationError) when calling the UpdateStack operation: Given input did not match expected format. I haven't found much documentation online. Can someone please guide if you have faced such issues.

Some-Name:
    Type: AWS::Glue::Connection
    Properties:
      CatalogId: !Ref AWS::AccountId
      ConnectionInput:
        Name: connection
        Description: "Document DB database."
        ConnectionType: MONGODB
        ConnectionProperties:
          CONNECTION_URL: !Ref ConnectionUri
          USERNAME: !Sub '{{resolve:secretsmanager:${DBSecretManagerArn}:SecretString:username}}'
          PASSWORD: !Ref Password
          JDBC_ENFORCE_SSL: false
        PhysicalConnectionRequirements:
          AvailabilityZone: !Select
            - 0
            - Fn::GetAZs: !Ref 'AWS::Region'
          SecurityGroupIdList:
            - sg-some
          SubnetId: !ImportValue some-value
0

There are 0 best solutions below