Terraform how to modify an arn for a resource?

I am using data to get the snapshot for a cluster.

data "aws_db_cluster_snapshot" "db" {
  for_each               = toset(var.rds_sources)
  db_cluster_identifier  = each.key
  most_recent            = true
}

and i am using it like :-

jsonencode(values(data.aws_db_cluster_snapshot.db)[*].db_cluster_snapshot_arn)

and it return the snapshot in the following format :-

arn:aws:rds:us-west-2:916533587194:cluster-snapshot:rds:new-test-db-2022-09-12-08-05

How can i modify the arn to be in the following format :-

arn:aws:rds:us-west-2:916533587194:cluster-snapshot:rds:new-test-db*


Comments

Popular posts from this blog

Today Walkin 14th-Sept

Spring Elasticsearch Operations

Hibernate Search - Elasticsearch with JSON manipulation