Skip to content

Commit 6b94e69

Browse files
authored
Merge pull request openshift#81582 from jneczypor/OSDOCS-11956
OSDOCS-11956: Multi-line Code Copy/Paste Incorrect
2 parents 22b9653 + f06aa71 commit 6b94e69

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

cloud_experts_tutorials/cloud-experts-aws-secret-manager.adoc

+8-14
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,7 @@ $ oc label csidriver.storage.k8s.io/secrets-store.csi.k8s.io security.openshift.
142142
$ SECRET_ARN=$(aws --region "$REGION" secretsmanager create-secret \
143143
--name MySecret --secret-string \
144144
'{"username":"shadowman", "password":"hunter2"}' \
145-
--query ARN --output text)
146-
$ echo $SECRET_ARN
145+
--query ARN --output text); echo $SECRET_ARN
147146
----
148147

149148
. Create an IAM Access Policy document by running the following command:
@@ -172,8 +171,7 @@ EOF
172171
$ POLICY_ARN=$(aws --region "$REGION" --query Policy.Arn \
173172
--output text iam create-policy \
174173
--policy-name openshift-access-to-mysecret-policy \
175-
--policy-document file://policy.json)
176-
$ echo $POLICY_ARN
174+
--policy-document file://policy.json); echo $POLICY_ARN
177175
----
178176

179177
. Create an IAM Role trust policy document by running the following command:
@@ -212,8 +210,7 @@ EOF
212210
----
213211
$ ROLE_ARN=$(aws iam create-role --role-name openshift-access-to-mysecret \
214212
--assume-role-policy-document file://trust-policy.json \
215-
--query Role.Arn --output text)
216-
$ echo $ROLE_ARN
213+
--query Role.Arn --output text); echo $ROLE_ARN
217214
----
218215

219216
. Attach the role to the policy by running the following command:
@@ -260,7 +257,7 @@ spec:
260257
EOF
261258
----
262259

263-
. Create a Deployment by using our secret in the following command:
260+
. Create a deployment by using our secret in the following command:
264261
+
265262
[source,terminal]
266263
----
@@ -292,7 +289,7 @@ spec:
292289
EOF
293290
----
294291

295-
. Verify the Pod has the secret mounted by running the following commandv:
292+
. Verify the pod has the secret mounted by running the following command:
296293
+
297294
[source,terminal]
298295
----
@@ -316,13 +313,12 @@ $ oc delete project my-application
316313
$ helm delete -n csi-secrets-store csi-secrets-store-driver
317314
----
318315

319-
. Delete Security Context Constraints by running the following command:
316+
. Delete the security context constraints by running the following command:
320317
+
321318
[source,terminal]
322319
----
323320
$ oc adm policy remove-scc-from-user privileged \
324-
system:serviceaccount:csi-secrets-store:secrets-store-csi-driver
325-
$ oc adm policy remove-scc-from-user privileged \
321+
system:serviceaccount:csi-secrets-store:secrets-store-csi-driver; oc adm policy remove-scc-from-user privileged \
326322
system:serviceaccount:csi-secrets-store:csi-secrets-store-provider-aws
327323
----
328324

@@ -339,9 +335,7 @@ https://raw.githubusercontent.com/rh-mobb/documentation/main/content/misc/secret
339335
[source,terminal]
340336
----
341337
$ aws iam detach-role-policy --role-name openshift-access-to-mysecret \
342-
--policy-arn $POLICY_ARN
343-
$ aws iam delete-role --role-name openshift-access-to-mysecret
344-
$ aws iam delete-policy --policy-arn $POLICY_ARN
338+
--policy-arn $POLICY_ARN; aws iam delete-role --role-name openshift-access-to-mysecret; aws iam delete-policy --policy-arn $POLICY_ARN
345339
----
346340

347341
. Delete the Secrets Manager secret by running the following command:

0 commit comments

Comments
 (0)