Question - return proxy id from RDS proxy ARN

When using the official aws terraform module, for aws_db_proxy resources, how would I be able to retrieve the end portion of the ARN? I need to create a policy which allows database connections, where the proxy id is specified.

For example: arn:aws:rds:us-east-1:1234567890:db-proxy:prx-xxxxxxxxxxxxxx/*

I would like the: prx-xxxxxxxxxxxxxx portion.
I can’t seem to get that from any of the attributes provided.