Skip to content

Commit 84a2efd

Browse files
authored
Merge pull request #64339 from EricPonvelle/OSDOCS-7663_Terraform-QSG
OSDOCS-7663: Added a new Quick Start Guide that uses Terraform
2 parents 6e92818 + 3186071 commit 84a2efd

7 files changed

+610
-8
lines changed

_topic_maps/_topic_map_rosa.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,8 @@ Distros: openshift-rosa
203203
Topics:
204204
- Name: Creating a ROSA cluster with STS using the default options
205205
File: rosa-sts-creating-a-cluster-quickly
206+
- Name: Creating a ROSA cluster with STS using the default options with Terraform
207+
File: rosa-sts-creating-a-cluster-quickly-terraform
206208
- Name: Creating a ROSA cluster with STS using customizations
207209
File: rosa-sts-creating-a-cluster-with-customizations
208210
- Name: Interactive cluster creation mode reference

modules/rosa-sts-account-roles-terraform.adoc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ $ rosa list account-roles
3131
----
3232
+
3333
34-
3534
. In your terminal, run the following command to export link:https://console.redhat.com/openshift/token[your {cluster-manager-first} token]. This value must include the full {cluster-manager} token:
3635
+
3736
[source,terminal]
@@ -244,4 +243,4 @@ $ terraform destroy
244243
----
245244
ifeval::["{context}" == "rosa-understanding-terraform"]
246245
:!tf-full:
247-
endif::[]
246+
endif::[]
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * rosa_install_access_delete_clusters/rosa-sts-creating-a-cluster-quickly-terraform.adoc
4+
//
5+
ifeval::["{context}" == "rosa-sts-creating-a-cluster-quickly-terraform"]
6+
:tf-defaults:
7+
endif::[]
8+
:_content-type: PROCEDURE
9+
10+
[id="sd-terraform-cluster-destroy_{context}"]
11+
= Deleting your ROSA cluster with Terraform
12+
13+
Use the `terraform destroy` command to remove all of the resources that were created with the `terraform apply` command.
14+
15+
[NOTE]
16+
====
17+
Do not modify your Terraform `.tf` files
18+
ifndef::tf-defaults[]
19+
or the `terraform.tfvars` file
20+
endif::tf-defaults[]
21+
before destroying your resources. These variables are matched to resources to delete.
22+
====
23+
24+
.Procedure
25+
. In the directory where you ran the `terraform apply` command to create your cluster, run the following command to delete the cluster:
26+
+
27+
[source,terminal]
28+
----
29+
$ terraform destroy
30+
----
31+
ifndef::tf-defaults[]
32+
+
33+
[IMPORTANT]
34+
====
35+
After you enter the name of the ROSA cluster and confirm destruction by entering `yes`, you cannot stop the `terraform destroy` process. Your account, Operator roles, and cluster are deleted.
36+
====
37+
38+
. Enter the name of the cluster that you want to delete:
39+
+
40+
[source,terminal]
41+
----
42+
var.cluster_name
43+
Provide the name of your ROSA cluster.
44+
45+
Enter a value: <name_of_rosa_cluster> <1>
46+
----
47+
--
48+
<1> A valid value is the name of the ROSA cluster you want to delete.
49+
--
50+
endif::tf-defaults[]
51+
52+
. Enter `yes` to start the role and cluster deletion:
53+
+
54+
.Example output of Terraform confirmation:
55+
[source,terminal]
56+
----
57+
Plan: 0 to add, 0 to change, 39 to destroy.
58+
59+
Do you really want to destroy all resources?
60+
Terraform will destroy all your managed infrastructure, as shown above.
61+
There is no undo. Only 'yes' will be accepted to confirm.
62+
63+
Enter a value: yes
64+
----
65+
66+
.Verification
67+
. Verify that your cluster was destroyed by running the following command:
68+
+
69+
[source,terminal]
70+
----
71+
$ rosa list clusters
72+
----
73+
+
74+
.Example output showing no cluster
75+
[source,terminal]
76+
----
77+
I: No clusters available
78+
----
79+
80+
. Verify that the account roles were destroyed by running the following command:
81+
+
82+
[source,terminal]
83+
----
84+
$ rosa list account-roles
85+
----
86+
+
87+
.Example output showing no Terraform-created account roles:
88+
[source,terminal]
89+
----
90+
I: Fetching account roles
91+
I: No account roles available
92+
----
93+
94+
. Verify that the Operator roles were destroyed by running the following command:
95+
+
96+
[source,terminal]
97+
----
98+
$ rosa list operator-roles
99+
----
100+
+
101+
.Example output showing no Terraform-created Operator roles:
102+
[source,terminal]
103+
----
104+
I: Fetching operator roles
105+
I: No operator roles available
106+
----
107+
ifeval::["{context}" == "rosa-sts-creating-a-cluster-quickly-terraform"]
108+
:!tf-defaults:
109+
endif::[]

0 commit comments

Comments
 (0)