Skip to content

Commit f4a01f3

Browse files
committed
improve messaging
1 parent 2676ac7 commit f4a01f3

File tree

1 file changed

+30
-3
lines changed

1 file changed

+30
-3
lines changed

README.md

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Terraform Automation Demo using Google Cloud Provider
22

3+
The purpose of this repository is to show case terraform automation for Google
4+
Cloud. This demo will provision the following cloud resources associated to
5+
corresponding terraform configurations:
6+
7+
| GCP Resource | Terraform Resource | Link to TerraHub Config |
8+
|-----------------------|--------------------|-------------------------|
9+
| Cloud Function | google_cloudfunctions_function | https://github.com/TerraHubCorp/demo-terraform-automation-gcp/blob/master/google_function/.terrahub.yml#L24 |
10+
| Cloud Storage | google_storage_bucket | https://github.com/TerraHubCorp/demo-terraform-automation-gcp/blob/master/google_storage/.terrahub.yml#L7 |
11+
| Static Website | google_storage_bucket_object | https://github.com/TerraHubCorp/demo-terraform-automation-gcp/blob/master/google_function/.terrahub.yml#L19 |
12+
| IAM Policy | iam_member_object_viewer | https://github.com/TerraHubCorp/demo-terraform-automation-gcp/blob/master/google_storage/.terrahub.yml#L7 |
13+
14+
Follow below instructions to try this out in your own Google Cloud account.
15+
316
## Login to Google Cloud
417

518
Run the following command in terminal:
@@ -116,7 +129,12 @@ bindings:
116129
version: 1
117130
```
118131

119-
## Create Terraform Configurations Using TerraHub
132+
## Terraform Automation and Orchestration Tool
133+
134+
The next couple of paragraphs are show casing the process of creating terraform
135+
configurations using [TerraHub CLI](https://github.com/TerraHubCorp/terrahub).
136+
We have opted to use YML format instead of HCL because it's easier and faster
137+
to customize and automate terraform runs (see `terrahub component` command).
120138

121139
Run the following commands in terminal:
122140
```shell
@@ -133,6 +151,8 @@ terrahub@0.0.1 (built: 2018-04-07T19:15:39.787Z)
133151
> NOTE: If you don't have TerraHub CLI, check out this
134152
[installation guide](https://www.npmjs.com/package/terrahub)
135153

154+
## Build Terraform Configurations
155+
136156
Run the following commands in terminal:
137157
```shell
138158
mkdir demo-terraform-automation-gcp
@@ -145,6 +165,13 @@ Your output should be similar to the one below:
145165
✅ Project successfully initialized
146166
```
147167

168+
> NOTE: If you want to jump directly to terraform automation part of the demo,
169+
instead of creating `demo-terraform-automation-gcp` from scratch, clone current
170+
repository, follow the instructions for `Copy Source Code for Google Function
171+
and Static Website`, after jump to `Update Project Config` and skip down to
172+
`Visualize TerraHub Components`. This way you will fast forward through terrahub
173+
components creation and customization, and switch directly to the automation part.
174+
148175
## Copy Source Code for Google Function and Static Website
149176

150177
The source code of Google Function is stored in `index.js`:
@@ -342,7 +369,7 @@ Project: demo-terraform-automation-gcp
342369

343370
Run the following command in terminal:
344371
```shell
345-
terrahub run -a -y -i google_storage,google_static_website
372+
terrahub run -y -a -i google_storage,google_static_website
346373
```
347374

348375
Your output should be similar to the one below:
@@ -365,7 +392,7 @@ Your output should be similar to the one below:
365392

366393
Run the following command in terminal:
367394
```shell
368-
terrahub run -a -y
395+
terrahub run -y -a
369396
```
370397

371398
Your output should be similar to the one below:

0 commit comments

Comments
 (0)