Skip to content

Commit debea3d

Browse files
authored
Merge pull request #52380 from jeana-redhat/OSDOCS-4464-ccoctl-delete-param
[OSDOCS-4464]: ccoctl gcp delete specify dir param
2 parents 37a5938 + 9afdc6a commit debea3d

File tree

1 file changed

+39
-19
lines changed

1 file changed

+39
-19
lines changed

modules/cco-ccoctl-deleting-sts-resources.adoc

Lines changed: 39 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -41,27 +41,13 @@ ifdef::aws-sts[]
4141
+
4242
[source,terminal]
4343
----
44-
$ ccoctl aws delete --name=<name> --region=<aws_region>
44+
$ ccoctl aws delete \
45+
--name=<name> \ <1>
46+
--region=<aws_region> <2>
4547
----
4648
+
47-
where:
48-
+
49-
** `<name>` matches the name used to originally create and tag the cloud resources.
50-
** `<aws_region>` is the AWS region in which cloud resources will be deleted.
51-
endif::aws-sts[]
52-
ifdef::google-cloud-platform[]
53-
* Delete the GCP resources that `ccoctl` created:
54-
+
55-
[source,terminal]
56-
----
57-
$ ccoctl gcp delete --name=<name> --project=<gcp_project_id>
58-
----
59-
+
60-
where:
61-
+
62-
** `<name>` matches the name used to originally create and tag the cloud resources.
63-
** `<gcp_project_id>` is the GCP project ID in which cloud resources will be deleted.
64-
endif::google-cloud-platform[]
49+
<1> `<name>` matches the name that was originally used to create and tag the cloud resources.
50+
<2> `<aws_region>` is the AWS region in which to delete cloud resources.
6551
+
6652
.Example output:
6753
+
@@ -83,6 +69,40 @@ endif::google-cloud-platform[]
8369
2021/04/08 17:51:39 Identity Provider with ARN arn:aws:iam::<aws_account_id>:oidc-provider/<name>-oidc.s3.<aws_region>.amazonaws.com deleted
8470
----
8571
//Would love a GCP version of the above output.
72+
endif::aws-sts[]
73+
ifdef::google-cloud-platform[]
74+
. Obtain the {product-title} release image by running the following command:
75+
+
76+
[source,terminal]
77+
----
78+
$ RELEASE_IMAGE=$(./openshift-install version | awk '/release image/ {print $3}')
79+
----
80+
81+
. Extract the list of `CredentialsRequest` custom resources (CRs) from the {product-title} release image by running the following command:
82+
+
83+
[source,terminal]
84+
----
85+
$ oc adm release extract --credentials-requests \
86+
--cloud=gcp \
87+
--to=<path_to_directory_with_list_of_credentials_requests>/credrequests \ <1>
88+
$RELEASE_IMAGE
89+
----
90+
+
91+
<1> `credrequests` is the directory where the list of `CredentialsRequest` objects is stored. This command creates the directory if it does not exist.
92+
93+
. Delete the GCP resources that `ccoctl` created:
94+
+
95+
[source,terminal]
96+
----
97+
$ ccoctl gcp delete \
98+
--name=<name> \ <1>
99+
--project=<gcp_project_id> \ <2>
100+
--credentials-requests-dir=<path_to_directory_with_list_of_credentials_requests>/credrequests
101+
----
102+
+
103+
<1> `<name>` matches the name that was originally used to create and tag the cloud resources.
104+
<2> `<gcp_project_id>` is the GCP project ID in which to delete cloud resources.
105+
endif::google-cloud-platform[]
86106

87107
.Verification
88108

0 commit comments

Comments
 (0)