diff --git a/README.md b/README.md index 15ba53ef..e996dd9d 100644 --- a/README.md +++ b/README.md @@ -83,27 +83,27 @@ 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`. @@ -111,7 +111,7 @@ Note that pug automatically pulls state after a workspace is loaded for the firs 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. diff --git a/demos/getting_started/apply.png b/demos/getting_started/apply.png new file mode 100644 index 00000000..318ba6b0 Binary files /dev/null and b/demos/getting_started/apply.png differ diff --git a/demos/getting_started/configs/a/.terraform.lock.hcl b/demos/getting_started/configs/a/.terraform.lock.hcl new file mode 100644 index 00000000..fceba89c --- /dev/null +++ b/demos/getting_started/configs/a/.terraform.lock.hcl @@ -0,0 +1,10 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/hashicorp/random" { + version = "3.6.0" + constraints = "3.6.0" + hashes = [ + "h1:R5Ucn26riKIEijcsiOMBR3uOAjuOMfI1x7XvH4P6B1w=", + ] +} diff --git a/demos/getting_started/configs/a/main.tf b/demos/getting_started/configs/a/main.tf new file mode 100644 index 00000000..a250b310 --- /dev/null +++ b/demos/getting_started/configs/a/main.tf @@ -0,0 +1,15 @@ +terraform { + backend "local" {} +} + +resource "random_pet" "pet" { + count = 10 + + keepers = { + now = timestamp() + } +} + +output "pets" { + value = random_pet.pet[*].id +} diff --git a/demos/getting_started/configs/b/.terraform.lock.hcl b/demos/getting_started/configs/b/.terraform.lock.hcl new file mode 100644 index 00000000..fceba89c --- /dev/null +++ b/demos/getting_started/configs/b/.terraform.lock.hcl @@ -0,0 +1,10 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/hashicorp/random" { + version = "3.6.0" + constraints = "3.6.0" + hashes = [ + "h1:R5Ucn26riKIEijcsiOMBR3uOAjuOMfI1x7XvH4P6B1w=", + ] +} diff --git a/demos/getting_started/configs/b/main.tf b/demos/getting_started/configs/b/main.tf new file mode 100644 index 00000000..a250b310 --- /dev/null +++ b/demos/getting_started/configs/b/main.tf @@ -0,0 +1,15 @@ +terraform { + backend "local" {} +} + +resource "random_pet" "pet" { + count = 10 + + keepers = { + now = timestamp() + } +} + +output "pets" { + value = random_pet.pet[*].id +} diff --git a/demos/getting_started/configs/c/.terraform.lock.hcl b/demos/getting_started/configs/c/.terraform.lock.hcl new file mode 100644 index 00000000..fceba89c --- /dev/null +++ b/demos/getting_started/configs/c/.terraform.lock.hcl @@ -0,0 +1,10 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/hashicorp/random" { + version = "3.6.0" + constraints = "3.6.0" + hashes = [ + "h1:R5Ucn26riKIEijcsiOMBR3uOAjuOMfI1x7XvH4P6B1w=", + ] +} diff --git a/demos/getting_started/configs/c/main.tf b/demos/getting_started/configs/c/main.tf new file mode 100644 index 00000000..a250b310 --- /dev/null +++ b/demos/getting_started/configs/c/main.tf @@ -0,0 +1,15 @@ +terraform { + backend "local" {} +} + +resource "random_pet" "pet" { + count = 10 + + keepers = { + now = timestamp() + } +} + +output "pets" { + value = random_pet.pet[*].id +} diff --git a/demos/getting_started/getting_started.gif b/demos/getting_started/getting_started.gif new file mode 100644 index 00000000..352e341f Binary files /dev/null and b/demos/getting_started/getting_started.gif differ diff --git a/demos/getting_started/getting_started.tape b/demos/getting_started/getting_started.tape new file mode 100644 index 00000000..0f7917b7 --- /dev/null +++ b/demos/getting_started/getting_started.tape @@ -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 diff --git a/demos/getting_started/init.png b/demos/getting_started/init.png new file mode 100644 index 00000000..40ee9e73 Binary files /dev/null and b/demos/getting_started/init.png differ diff --git a/demos/getting_started/module.png b/demos/getting_started/module.png new file mode 100644 index 00000000..40ee9e73 Binary files /dev/null and b/demos/getting_started/module.png differ diff --git a/demos/getting_started/modules.png b/demos/getting_started/modules.png new file mode 100644 index 00000000..6c1bd066 Binary files /dev/null and b/demos/getting_started/modules.png differ diff --git a/demos/getting_started/plan.png b/demos/getting_started/plan.png new file mode 100644 index 00000000..baa63c50 Binary files /dev/null and b/demos/getting_started/plan.png differ diff --git a/demos/getting_started/reset.sh b/demos/getting_started/reset.sh new file mode 100755 index 00000000..6a1fe9a8 --- /dev/null +++ b/demos/getting_started/reset.sh @@ -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 diff --git a/demos/getting_started/resources.png b/demos/getting_started/resources.png new file mode 100644 index 00000000..041cc00e Binary files /dev/null and b/demos/getting_started/resources.png differ diff --git a/demos/modules/modules.tape b/demos/modules/modules.tape index 9bb0b8bf..96e1d677 100644 --- a/demos/modules/modules.tape +++ b/demos/modules/modules.tape @@ -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