Skip to content

[enterprise-4.16] OSDOCS-11956: Multi-line Code Copy/Paste Incorrect #81647

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 8 additions & 14 deletions cloud_experts_tutorials/cloud-experts-aws-secret-manager.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,7 @@ $ oc label csidriver.storage.k8s.io/secrets-store.csi.k8s.io security.openshift.
$ SECRET_ARN=$(aws --region "$REGION" secretsmanager create-secret \
--name MySecret --secret-string \
'{"username":"shadowman", "password":"hunter2"}' \
--query ARN --output text)
$ echo $SECRET_ARN
--query ARN --output text); echo $SECRET_ARN
----

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

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

. Attach the role to the policy by running the following command:
Expand Down Expand Up @@ -260,7 +257,7 @@ spec:
EOF
----

. Create a Deployment by using our secret in the following command:
. Create a deployment by using our secret in the following command:
+
[source,terminal]
----
Expand Down Expand Up @@ -292,7 +289,7 @@ spec:
EOF
----

. Verify the Pod has the secret mounted by running the following commandv:
. Verify the pod has the secret mounted by running the following command:
+
[source,terminal]
----
Expand All @@ -316,13 +313,12 @@ $ oc delete project my-application
$ helm delete -n csi-secrets-store csi-secrets-store-driver
----

. Delete Security Context Constraints by running the following command:
. Delete the security context constraints by running the following command:
+
[source,terminal]
----
$ oc adm policy remove-scc-from-user privileged \
system:serviceaccount:csi-secrets-store:secrets-store-csi-driver
$ oc adm policy remove-scc-from-user privileged \
system:serviceaccount:csi-secrets-store:secrets-store-csi-driver; oc adm policy remove-scc-from-user privileged \
system:serviceaccount:csi-secrets-store:csi-secrets-store-provider-aws
----

Expand All @@ -339,9 +335,7 @@ https://raw.githubusercontent.com/rh-mobb/documentation/main/content/misc/secret
[source,terminal]
----
$ aws iam detach-role-policy --role-name openshift-access-to-mysecret \
--policy-arn $POLICY_ARN
$ aws iam delete-role --role-name openshift-access-to-mysecret
$ aws iam delete-policy --policy-arn $POLICY_ARN
--policy-arn $POLICY_ARN; aws iam delete-role --role-name openshift-access-to-mysecret; aws iam delete-policy --policy-arn $POLICY_ARN
----

. Delete the Secrets Manager secret by running the following command:
Expand Down