From 2fb465678ef7c8bdc7003f73177546b29f08ca3c Mon Sep 17 00:00:00 2001 From: vivekr-splunk Date: Tue, 3 Oct 2023 14:49:54 -0700 Subject: [PATCH] changed aws role creation -2 Signed-off-by: vivekr-splunk --- test/deploy-eks-cluster.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/deploy-eks-cluster.sh b/test/deploy-eks-cluster.sh index 5275c7fe6..55bffe56e 100755 --- a/test/deploy-eks-cluster.sh +++ b/test/deploy-eks-cluster.sh @@ -87,7 +87,7 @@ function createCluster() { } ] }" >aws-ebs-csi-driver-trust-policy.json - rolename=$(echo ${TEST_CLUSTER_NAME} | awk -F- '{print "EBS_" $(NF-1) "_" $(NF)}') + rolename=$(echo ${TEST_CLUSTER_NAME} | awk -F- '{print "EBS_" $(NF-1) "_" $(NF-4) "_" $(NF-3) "_" $(NF-2) "_" $(NF)}') aws iam create-role --role-name ${rolename} --assume-role-policy-document file://aws-ebs-csi-driver-trust-policy.json --description "irsa role for ${TEST_CLUSTER_NAME}" aws iam attach-role-policy --policy-arn arn:aws:iam::aws:policy/service-role/AmazonEBSCSIDriverPolicy --role-name ${rolename} kubectl annotate serviceaccount -n $namespace $service_account eks.amazonaws.com/role-arn=arn:aws:iam::$account_id:role/${rolename}