### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

When creating a `DBInstance` with username and password from the secrets manager, I get this error in the localstack debug output:
```
2022-11-16T16:59:04.763 DEBUG --- [functhread31] l.u.c.template_deployer    : Request for resource type "SecretsManager::Secret" in region us-east-1: create_secret {'Name': 'my-stack-DatabaseSecret-8e991c0f', 'SecretString': '{"username": "username", "password": "PqrCVh!F[UR8xyi6"}'}
2022-11-16T16:59:04.786 DEBUG --- [functhread31] l.u.c.template_deployer    : Extract resource attribute: Parameter Ref
2022-11-16T16:59:04.791 DEBUG --- [functhread31] l.u.c.template_deployer    : Error applying changes for CloudFormation stack "my-stack": not enough values to unpack (expected 3, got 1) Traceback (most recent call last):
File "/opt/code/localstack/localstack/utils/cloudformation/template_deployer.py", line 1412, in _run
self.do_apply_changes_in_loop(changes, stack)
File "/opt/code/localstack/localstack/utils/cloudformation/template_deployer.py", line 1461, in do_apply_changes_in_loop
should_deploy = self.prepare_should_deploy_change(
File "/opt/code/localstack/localstack/utils/cloudformation/template_deployer.py", line 1527, in prepare_should_deploy_change
resolve_refs_recursively(stack, resource)
File "/opt/code/localstack/.venv/lib/python3.10/site-packages/localstack_ext/services/cloudformation/cloudformation_extended.py.enc", line 61, in resolve_refs_recursively
File "/opt/code/localstack/localstack/utils/functions.py", line 80, in func
return wrapped(*args, **kwargs)
File "/opt/code/localstack/localstack/utils/cloudformation/template_deployer.py", line 411, in resolve_refs_recursively
result = _resolve_refs_recursively(stack, value)
File "/opt/code/localstack/localstack/utils/functions.py", line 80, in func
return wrapped(*args, **kwargs)
File "/opt/code/localstack/localstack/utils/cloudformation/template_deployer.py", line 607, in _resolve_refs_recursively
value[key] = resolve_refs_recursively(stack, val)
File "/opt/code/localstack/.venv/lib/python3.10/site-packages/localstack_ext/services/cloudformation/cloudformation_extended.py.enc", line 61, in resolve_refs_recursively
File "/opt/code/localstack/localstack/utils/functions.py", line 80, in func
return wrapped(*args, **kwargs)
File "/opt/code/localstack/localstack/utils/cloudformation/template_deployer.py", line 411, in resolve_refs_recursively
result = _resolve_refs_recursively(stack, value)
File "/opt/code/localstack/localstack/utils/functions.py", line 80, in func
return wrapped(*args, **kwargs)
File "/opt/code/localstack/localstack/utils/cloudformation/template_deployer.py", line 607, in _resolve_refs_recursively
value[key] = resolve_refs_recursively(stack, val)
File "/opt/code/localstack/.venv/lib/python3.10/site-packages/localstack_ext/services/cloudformation/cloudformation_extended.py.enc", line 61, in resolve_refs_recursively
File "/opt/code/localstack/localstack/utils/functions.py", line 80, in func
return wrapped(*args, **kwargs)
File "/opt/code/localstack/localstack/utils/cloudformation/template_deployer.py", line 455, in resolve_refs_recursively
[json_key, version_stage, version_id] = parts[1].split(":")
ValueError: not enough values to unpack (expected 3, got 1)
```

### Expected Behavior

When creating the same `DBInstance` in AWS, it deploys without errors.

### How are you starting LocalStack?

With the `localstack` script

### Steps To Reproduce

#### How are you starting localstack (e.g., `bin/localstack` command, arguments, or `docker-compose.yml`)

```
. ./tox/py38/bin/activate
DEBUG=1 localstack start
```

#### Client commands (e.g., AWS SDK code snippet, or sequence of "awslocal" commands)

```
aws cloudformation deploy --stack-name my-stack --template-file template.yml --endpoint-url http://localhost:4566
```
Where `template.yml` contains this relevant part:
```
  DatabaseSecret:
    Type: AWS::SecretsManager::Secret
    Properties:
      GenerateSecretString:
        SecretStringTemplate: !Sub '{"username": "${DatabaseUsername}"}'
        GenerateStringKey: password
        PasswordLength: 16
        ExcludeCharacters: '"@/\'

  Database:
    Type: AWS::RDS::DBInstance
    DependsOn:
      - DatabaseSecret
    DeletionPolicy: Delete
    Properties:
      DBName: !Ref DatabaseName
      AllocatedStorage: 100
      DBInstanceClass: db.m5.large
      Engine: "postgres"
      MasterUsername: !Sub '{{resolve:secretsmanager:${DatabaseSecret}:SecretString:username}}'
      MasterUserPassword: !Sub '{{resolve:secretsmanager:${DatabaseSecret}:SecretString:password}}'
      BackupRetentionPeriod: 0
      DBSubnetGroupName: !Ref DatabaseSubnetGroup
      VPCSecurityGroups:
        - !Ref DatabaseSecurityGroup
      MaxAllocatedStorage: 1000
```

### Environment

```markdown
- OS: Ubuntu 20.04
- LocalStack: 1.2.0
```


### Anything else?

Same behavior when I try to resolve with a join:
```
      MasterUsername: !Join ['', ['{{resolve:secretsmanager:', !Ref DatabaseSecret, ':SecretString:username}}' ]]
      MasterUserPassword: !Join ['', ['{{resolve:secretsmanager:', !Ref DatabaseSecret, ':SecretString:password}}' ]]
```
action = "UPDATE" if change_set.stack.status == "CREATE_COMPLETE" else "CREATE"
        change_set.stack.set_stack_status(f"{action}_IN_PROGRESS")
        
        change_set.stack.metadata["Capabilities"] = change_set.metadata.get("Capabilities")
        try:
            self.apply_changes(
                change_set.stack,
                change_set,
                action=action,
            )
        except Exception as e:
            LOG.info(
                "Unable to apply change set %s: %s", change_set.metadata.get("ChangeSetName"), e
            )
            change_set.metadata["Status"] = f"{action}_FAILED"
            self.stack.set_stack_status(f"{action}_FAILED")
            raise
    def update_stack(self, new_stack):