diff --git a/modules/cco-ccoctl-deleting-sts-resources.adoc b/modules/cco-ccoctl-deleting-sts-resources.adoc index 4c0582fd96..3c3ceb12b8 100644 --- a/modules/cco-ccoctl-deleting-sts-resources.adoc +++ b/modules/cco-ccoctl-deleting-sts-resources.adoc @@ -41,27 +41,13 @@ ifdef::aws-sts[] + [source,terminal] ---- -$ ccoctl aws delete --name= --region= +$ ccoctl aws delete \ + --name= \ <1> + --region= <2> ---- + -where: -+ -** `` matches the name used to originally create and tag the cloud resources. -** `` is the AWS region in which cloud resources will be deleted. -endif::aws-sts[] -ifdef::google-cloud-platform[] -* Delete the GCP resources that `ccoctl` created: -+ -[source,terminal] ----- -$ ccoctl gcp delete --name= --project= ----- -+ -where: -+ -** `` matches the name used to originally create and tag the cloud resources. -** `` is the GCP project ID in which cloud resources will be deleted. -endif::google-cloud-platform[] +<1> `` matches the name that was originally used to create and tag the cloud resources. +<2> `` is the AWS region in which to delete cloud resources. + .Example output: + @@ -83,6 +69,40 @@ endif::google-cloud-platform[] 2021/04/08 17:51:39 Identity Provider with ARN arn:aws:iam:::oidc-provider/-oidc.s3..amazonaws.com deleted ---- //Would love a GCP version of the above output. +endif::aws-sts[] +ifdef::google-cloud-platform[] +. Obtain the {product-title} release image by running the following command: ++ +[source,terminal] +---- +$ RELEASE_IMAGE=$(./openshift-install version | awk '/release image/ {print $3}') +---- + +. Extract the list of `CredentialsRequest` custom resources (CRs) from the {product-title} release image by running the following command: ++ +[source,terminal] +---- +$ oc adm release extract --credentials-requests \ + --cloud=gcp \ + --to=/credrequests \ <1> + $RELEASE_IMAGE +---- ++ +<1> `credrequests` is the directory where the list of `CredentialsRequest` objects is stored. This command creates the directory if it does not exist. + +. Delete the GCP resources that `ccoctl` created: ++ +[source,terminal] +---- +$ ccoctl gcp delete \ + --name= \ <1> + --project= \ <2> + --credentials-requests-dir=/credrequests +---- ++ +<1> `` matches the name that was originally used to create and tag the cloud resources. +<2> `` is the GCP project ID in which to delete cloud resources. +endif::google-cloud-platform[] .Verification