Skip to content

Commit d177e7d

Browse files
committed
fix terraform doc formatting
1 parent 625e972 commit d177e7d

File tree

1 file changed

+26
-16
lines changed

1 file changed

+26
-16
lines changed

docs/TERRAFORM.adoc

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
= Provisioning Confluent Cloud Infrastructure
22

3-
Let's assume you have completed the following prereqs:
3+
== Prerequisites
44

55
* https://confluent.cloud[Confluent Cloud Account]
66
* https://docs.confluent.io/confluent-cli/current/install.html[Confluent CLI]
@@ -12,37 +12,44 @@ Let's assume you have completed the following prereqs:
1212
Log into Confluent Cloud and find the API Key and API Secret.
1313
Use the commands below to set environment variables needed to authenticate to Confluent Cloud:
1414

15-
```shell
15+
[source,bash]
16+
.Confluent Cloud API Keys
17+
----
1618
export CONFLUENT_CLOUD_API_KEY=<API KEY>
1719
export CONFLUENT_CLOUD_API_SECRET=<API SECRET>
18-
```
20+
----
1921

2022
== Execute Terraform Manifests
2123

22-
The terraform manifests require the Confluent Cloud organization ID in order to provision infrastructure.
24+
The terraform manifests require the Confluent Cloud organization ID to provision infrastructure.
2325
This can be found in the Confluent Cloud console in the "Organization Settings" and exported to an environment variable:
2426

2527
image::org-id.jpg[]
2628

2729
image::org-id-2.jpg[]
2830

29-
```bash
31+
[source,bash]
32+
.org-id.sh
33+
----
3034
export TF_VAR_org_id=<ORG ID VALUE FROM CONSOLE>
31-
```
35+
----
3236

3337
This value can also be queried by using the Confluent CLI to query your account, piping the result to a `jq` query and using that value in a `TF_VAR_`:
3438

35-
```bash
39+
[source,bash]
40+
----
3641
export TF_VAR_org_id=$(confluent organization list -o json | jq -c -r '.[] | select(.is_current)' | jq '.id')
37-
```
42+
----
3843

3944
From this directory, execute the following commands:
4045

41-
```bash
42-
terraform init
43-
terraform plan -out "tfplan"
46+
[source,bash]
47+
.terraform.sh
48+
----
49+
terraform init
50+
terraform plan -out "tfplan"
4451
terraform apply
45-
```
52+
----
4653

4754
Once completed, verify the infrastructure is created in the Confluent Cloud console.
4855

@@ -51,16 +58,19 @@ Once completed, verify the infrastructure is created in the Confluent Cloud cons
5158
In the Table API exercises, we will need API keys and secrets to connect Flink to Confluent Cloud.
5259
This `terraform output` command will create a file with those parameters:
5360

54-
```bash
61+
[source,bash]
62+
----
5563
terraform output -json \
5664
| jq -r 'to_entries | map( {key: .key|tostring|split("_")|join("."), value: .value} ) | map("client.\(.key)=\(.value.value)") | .[]' \
5765
| while read -r line ; do echo "$line"; done > ../common/utils/src/main/resources/cloud.properties
58-
```
66+
----
5967

6068
== Teardown
6169

6270
When the workshop is complete, run the following command to destroy all Confluent Cloud assets:
6371

64-
```bash
72+
[source,bash]
73+
----
6574
terraform destroy --auto-approve
66-
```
75+
----
76+

0 commit comments

Comments
 (0)