@@ -112,10 +112,10 @@ $ rosa describe cluster \
112
112
+
113
113
[source,terminal]
114
114
----
115
- $ aws iam create-role \
115
+ ROLE_ARN=$( aws iam create-role \
116
116
--role-name "<your_cluster_name>-aws-efs-csi-operator" \
117
117
--assume-role-policy-document file://<your_trust_file_name>.json \
118
- --query "Role.Arn" --output text
118
+ --query "Role.Arn" --output text); echo $ROLE_ARN
119
119
----
120
120
+
121
121
Save the output. You will use it in the next steps.
@@ -124,27 +124,22 @@ Save the output. You will use it in the next steps.
124
124
+
125
125
[source,terminal]
126
126
----
127
- $ aws iam create-policy \
127
+ POLICY_ARN=$( aws iam create-policy \
128
128
--policy-name "<your_rosa_cluster_name>-rosa-efs-csi" \
129
129
--policy-document file://<your_policy_file_name>.json \
130
- --query 'Policy.Arn' --output text) || \
131
- POLICY=$(aws iam list-policies \
132
- --query 'Policies[?PolicyName==`rosa-efs-csi`].Arn' \
133
- --output text
130
+ --query 'Policy.Arn' --output text); echo $POLICY_ARN
134
131
----
135
132
+
136
- Save the output. You will use it in the next steps.
137
133
138
134
.. Attach the IAM policy to the IAM role:
139
135
+
140
136
[source,terminal]
141
137
----
142
138
$ aws iam attach-role-policy \
143
- --role-name "<your_rosa_cluster_name>-aws-efs-csi-operator" \
144
- --policy-arn <policy_ARN> <1>
139
+ --role-name "<your_rosa_cluster_name>-aws-efs-csi-operator" \
140
+ --policy-arn $POLICY_ARN
145
141
----
146
142
+
147
- <1> Replace `policy_ARN` with the output you saved while creating the policy.
148
143
149
144
. Create a `Secret` YAML file for the driver operator:
150
145
+
0 commit comments