Issue with AWS RDS aws_rds_cluster and master_user_secret option

Hi

I’m trying to find a way to retrieve the ARN of the secret AWS automatically creates when the following option for the aws_rds_cluster resource is set to true: manage_master_user_password

The following doc does not indicate that the ARN of the secret is included in the Attributes Reference: aws_rds_cluster | Resources | hashicorp/aws | Terraform Registry

However, it is included in a configuration block: aws_rds_cluster | Resources | hashicorp/aws | Terraform Registry

I tried to specify the ARN of a secret in the configuration block but Terraform reports the following error:


│ Error: Value for unconfigurable attribute

│ with aws_rds_cluster.default,
│ on subnet_group_change.tf line 15, in resource “aws_rds_cluster” “default”:
│ 15: resource “aws_rds_cluster” “default” {

│ Can’t configure a value for “master_user_secret”: its value will be decided
│ automatically based on the result of applying this configuration.

I’m also not able to reference it as an output value for the aws_rds_cluster resource.

Can anyone please confirm what the purpose of the configuration block is? Also if possible how to reference the secret that is created by AWS?