On aws-rds on aws-cdk, where is the setting to make database publicly accessible?

Whether the database is made publicly accessible or not is derived from the vpcSubnets prop which is of type ec2.SubnetSelection.

const instance = new rds.DatabaseInstance(this, 'Instance', {
  ... // other props
  vpcSubnets: { subnetType: ec2.SubnetType.PUBLIC }
});

See https://github.com/aws/aws-cdk/blob/v1.62.0/packages/%40aws-cdk/aws-rds/lib/instance.ts#L315


For the python crowd:

database = rds.DatabaseInstance(self, "Instance", 
        ... // other props
            vpc_placement=ec2.SubnetSelection(subnet_type=ec2.SubnetType.PUBLIC),
        )