From 7077186f8a2468f0c8fbf602b2eb19062b648b11 Mon Sep 17 00:00:00 2001 From: Simon Hanmer Date: Wed, 30 Oct 2024 13:03:51 +0000 Subject: [PATCH 1/2] tidying up --- .gitignore | 3 ++- README.md | 9 +++------ steps/common/common.tfvars | 1 + 3 files changed, 6 insertions(+), 7 deletions(-) create mode 100644 steps/common/common.tfvars diff --git a/.gitignore b/.gitignore index de8c734..d310640 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ .terraform *.tfstate* -*tfvars *hcl +.DS_Store +iam diff --git a/README.md b/README.md index 1b2daef..e9b53d3 100644 --- a/README.md +++ b/README.md @@ -35,11 +35,8 @@ We'll be performing the following activities: ### Steps 1. [Step 01](steps/step01/README.md) - first experiment with FIS, a simple single server setup. - +1. [Step 02](steps/step02/README.md) - second experiment, improving resilience. +1. [Step 03](steps/step03/README.md) - third experiment, full resilience - test to destruction. +1. [Step 04](steps/step04/README.md) - time permitting, a quick review of the safety level functionality. --- - - -## Useful commands -terraform plan --var-file ../common/common.tfvars -terraform apply --auto-approve --var-file ../common/common.tfvars \ No newline at end of file diff --git a/steps/common/common.tfvars b/steps/common/common.tfvars new file mode 100644 index 0000000..e316e4b --- /dev/null +++ b/steps/common/common.tfvars @@ -0,0 +1 @@ +panda_name = "" # <--- replace with your panda name From 6e568f6fe090e0f427e31bcd8cef7ef4274930e4 Mon Sep 17 00:00:00 2001 From: Simon Hanmer Date: Wed, 30 Oct 2024 13:59:15 +0000 Subject: [PATCH 2/2] strip out -test or -panda from name --- steps/init/variables.tf | 2 +- steps/step01/variables.tf | 2 +- steps/step02/variables.tf | 2 +- steps/step03/variables.tf | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/steps/init/variables.tf b/steps/init/variables.tf index 3f76f24..ac26a5b 100644 --- a/steps/init/variables.tf +++ b/steps/init/variables.tf @@ -82,7 +82,7 @@ locals { "tight", "uncommon" ] - panda_number = index(local.panda_name_list, var.panda_name) + panda_number = index(local.panda_name_list, replace(var.panda_name, "/-(test|panda)\\s*$$/", "")) resource_suffix = "${var.panda_name}_${local.playground_name}" diff --git a/steps/step01/variables.tf b/steps/step01/variables.tf index 5c56945..d2868d2 100644 --- a/steps/step01/variables.tf +++ b/steps/step01/variables.tf @@ -84,7 +84,7 @@ locals { "tight", "uncommon" ] - panda_number = index(local.panda_name_list, var.panda_name) + panda_number = index(local.panda_name_list, replace(var.panda_name, "/-(test|panda)\\s*$$/", "")) resource_suffix = "${var.panda_name}_${local.playground_name}" diff --git a/steps/step02/variables.tf b/steps/step02/variables.tf index e2ab9fa..2c84b1d 100644 --- a/steps/step02/variables.tf +++ b/steps/step02/variables.tf @@ -85,7 +85,7 @@ locals { "tight", "uncommon" ] - panda_number = index(local.panda_name_list, var.panda_name) + panda_number = index(local.panda_name_list, replace(var.panda_name, "/-(test|panda)\\s*$$/", "")) resource_suffix = "${var.panda_name}_${local.playground_name}" diff --git a/steps/step03/variables.tf b/steps/step03/variables.tf index 458cda7..fdf715b 100644 --- a/steps/step03/variables.tf +++ b/steps/step03/variables.tf @@ -85,7 +85,7 @@ locals { "tight", "uncommon" ] - panda_number = index(local.panda_name_list, var.panda_name) + panda_number = index(local.panda_name_list, replace(var.panda_name, "/-(test|panda)\\s*$$/", "")) resource_suffix = "${var.panda_name}_${local.playground_name}"