Amazon web services – RE2 regex to match aws user arn via Terraform
My regex-foo is weak. I need to parse this string: arn:${awsPartition}:iam::010101010101:user/${userName} Partitions: aws|aws-us-gov|aws-cn Basically, the matching should isolate everything except the last bit /${userName} and leave only arn:${awsPartition}:iam::010101010101:user. I tried this in Terraform but I seem to have offended it…