Skip to content

Commit

Permalink
chore: update readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
leg100 committed Apr 29, 2024
1 parent faf691a commit 3048261
Show file tree
Hide file tree
Showing 17 changed files with 127 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,35 +83,35 @@ pug

At startup, pug lists your root modules:

![list root modules](./demos/getting_started/modules.gif)
![list root modules](./demos/getting_started/modules.png)

Initialize module `modules/a` by pressing `i`:

![init](./demos/getting_started/init.gif)
![init](./demos/getting_started/init.png)

That takes you to the task view, which includes the output from `terraform init`.

Press `m` to show the corresponding module page for the task:

![module](./demos/getting_started/module.gif)
![module](./demos/getting_started/module.png)

You'll be presented with multiple tabs. To cycle through tabs press the `tab` key.

On the `workspaces` tab, press `p` to create a plan:

![plan](./demos/getting_started/plan.gif)
![plan](./demos/getting_started/plan.png)

That takes you to the `plan` tab in the run view, showing the output from `terraform plan`. A run is composed of a plan, and optionally an apply. Once the plan has complete, press `a` to apply the plan:

![apply](./demos/getting_started/apply.gif)
![apply](./demos/getting_started/apply.png)

That takes you to the `apply` tab on the run view, showing the output from `terraform apply`.

Note that pug automatically pulls state after a workspace is loaded for the first time, and after an apply completes.

To see the state resources for the workspace, press `w` and cycle through the tabs to the `resources` tab.

![resources](./demos/getting_started/resources.gif)
![resources](./demos/getting_started/resources.png)

This is the end of the getting started walkthrough.

Expand Down
Binary file added demos/getting_started/apply.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions demos/getting_started/configs/a/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions demos/getting_started/configs/a/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
terraform {
backend "local" {}
}

resource "random_pet" "pet" {
count = 10

keepers = {
now = timestamp()
}
}

output "pets" {
value = random_pet.pet[*].id
}
10 changes: 10 additions & 0 deletions demos/getting_started/configs/b/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions demos/getting_started/configs/b/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
terraform {
backend "local" {}
}

resource "random_pet" "pet" {
count = 10

keepers = {
now = timestamp()
}
}

output "pets" {
value = random_pet.pet[*].id
}
10 changes: 10 additions & 0 deletions demos/getting_started/configs/c/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions demos/getting_started/configs/c/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
terraform {
backend "local" {}
}

resource "random_pet" "pet" {
count = 10

keepers = {
now = timestamp()
}
}

output "pets" {
value = random_pet.pet[*].id
}
Binary file added demos/getting_started/getting_started.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions demos/getting_started/getting_started.tape
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
Output demos/getting_started/getting_started.gif

Set Shell "bash"
Set FontSize 14
Set Width 1200
Set Height 800
Set Framerate 24
Set Padding 5

Hide
Type "demos/getting_started/reset.sh" Enter
Type `TF_CLI_CONFIG_FILE=$PWD/mirror/mirror.tfrc go run main.go -w demos/getting_started/configs` Enter
Sleep 1s
Show

# list of modules
Screenshot demos/getting_started/modules.png

# init module a
Type "i" Sleep 0.5s
Screenshot demos/getting_started/init.png

# go to module a's page
Type "m" Sleep 0.5s
Screenshot demos/getting_started/module.png

# create a plan
Type "p" Sleep 0.5s
Screenshot demos/getting_started/plan.png

# apply plan
Type "a" Sleep 0.5s
Screenshot demos/getting_started/apply.png

# wait for apply to finish and state to be reloaded
Sleep 3s

# go to workspace page and cycle through tabs to the resources tab
Type "w" Sleep 0.5s Tab Tab
Screenshot demos/getting_started/resources.png
Binary file added demos/getting_started/init.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added demos/getting_started/module.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added demos/getting_started/modules.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added demos/getting_started/plan.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions demos/getting_started/reset.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

find ./demos/getting_started -name .terraform -exec rm -rf {} \; > /dev/null 2>&1 || true
find ./demos/getting_started -name terraform.tfstate* -exec rm -rf {} \; > /dev/null 2>&1 || true
find ./demos/getting_started -name .pug -exec rm -rf {} \; > /dev/null 2>&1 || true
Binary file added demos/getting_started/resources.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions demos/modules/modules.tape
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Hide
Type "demos/modules/reset.sh" Enter
Type `TF_CLI_CONFIG_FILE=$PWD/mirror/mirror.tfrc go run main.go -w demos/modules/configs` Enter
Sleep 1s
Screenshot demos/modules/modules_listing.png
Show

Sleep 1s
Expand Down

0 comments on commit 3048261

Please sign in to comment.