diff --git a/tools/terraform-create-template-files.sh b/tools/terraform-create-template-files.sh index 4b60e1e..70a41ef 100755 --- a/tools/terraform-create-template-files.sh +++ b/tools/terraform-create-template-files.sh @@ -3,6 +3,28 @@ echo "Create base terraform templates" touch main.tf variables.tf providers.tf data.tf +if [ ! -f providers.tf ] +then + echo "Create providers file" + tee providers.tf <<- PROVIDERS + providers "aws" { + region = var.region + } +PROVIDERS +fi + +if [ ! -f variables.tf ] +then + echo "Create variables file" + tee variables.tf <<- VARIABLES + variable "region" { + description = "AWS region to create resources in" + type = string + default = "ap-southeast-2" + } +VARIABLES +fi + if [ ! -f locals.tf ] then echo "Create locals template file"