Skip to content

Commit fd82f4b

Browse files
committed
improve documentation
1 parent e1871ef commit fd82f4b

File tree

1 file changed

+24
-15
lines changed

1 file changed

+24
-15
lines changed

README.md

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,20 @@ gcloud auth login
1010
> NOTE: If you don't have Google Cloud CLI, check out
1111
[installation guide](https://cloud.google.com/sdk/install)
1212

13-
## Get Values from Your Google Cloud Account
13+
## Setup Environment Variables (Will Be Used Later)
14+
15+
Manual Setup (set values in double quotes and run the following command in terminal):
16+
```shell
17+
export GOOGLE_CLOUD_PROJECT="" ## e.g. terrahub-123456
18+
export GOOGLE_APPLICATION_CREDENTIALS="" ## e.g. ${HOME}/.config/gcloud/terraform.json
19+
export ORG_ID="" ## e.g. 123456789012
20+
export BILLING_ID="" ## e.g. 123456-ABCDEF-ZYXWVU
21+
export PROJECT_NAME="" ## e.g. TerraHub
22+
export IAM_NAME="" ## e.g. terraform
23+
export IAM_DESC="" ## e.g. terraform service account
24+
```
25+
26+
### Setup ORG_ID Programmatically
1427

1528
Run the following command in terminal:
1629
```shell
@@ -23,6 +36,16 @@ DISPLAY_NAME ID DIRECTORY_CUSTOMER_ID
2336
mydomain.com 123456789012 a1b2c3d4e
2437
```
2538

39+
Automated Setup (run the following command in terminal):
40+
```shell
41+
export ORG_ID="$(gcloud organizations list --format=json | jq '.[0].name[14:]')"
42+
```
43+
44+
> NOTE: If you don't have JQ CLI, check out
45+
[installation guide](https://stedolan.github.io/jq/download/)
46+
47+
### Setup BILLING_ID Programmatically
48+
2649
Run the following command in terminal:
2750
```shell
2851
gcloud beta billing accounts list
@@ -34,22 +57,8 @@ ACCOUNT_ID NAME OPEN MASTER_ACCOUNT_ID
3457
123456-ABCDEF-ZYXWVU My Billing Account True
3558
```
3659

37-
## Setup Environment Variables (Will Be Used Later)
38-
39-
Manual Setup (set values in double quotes and run the following command in terminal):
40-
```shell
41-
export GOOGLE_CLOUD_PROJECT="" ## e.g. terrahub-123456
42-
export GOOGLE_APPLICATION_CREDENTIALS="" ## e.g. ${HOME}/.config/gcloud/terraform.json
43-
export ORG_ID="" ## e.g. 123456789012
44-
export BILLING_ID="" ## e.g. 123456-ABCDEF-ZYXWVU
45-
export PROJECT_NAME="" ## e.g. TerraHub
46-
export IAM_NAME="" ## e.g. terraform
47-
export IAM_DESC="" ## e.g. terraform service account
48-
```
49-
5060
Automated Setup (run the following command in terminal):
5161
```shell
52-
export ORG_ID="$(gcloud organizations list --format=json | jq '.[0].name[14:]')"
5362
export BILLING_ID="$(gcloud beta billing accounts list --format=json | jq '.[0].name[16:]')"
5463
```
5564

0 commit comments

Comments
 (0)