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 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}"