Trims the path prefix from an IAM role Amazon Resource Name (ARN). This function can be used when services require role ARNs to be passed without a path.
See the AWS IAM documentation for additional information on IAM role ARNs.
# result: arn:aws:iam::444455556666:role/example
output "example" {
value = provider::aws::trim_iam_role_path("arn:aws:iam::444455556666:role/with/path/example")
}
trim_iam_role_path(arn string) string
arn
(String) IAM role Amazon Resource Name (ARN).