Skip to content

Commit

Permalink
Update with creation of variables and providers tf file
Browse files Browse the repository at this point in the history
  • Loading branch information
dyordsabuzo committed Jul 29, 2021
1 parent bde0808 commit a4f6b8d
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tools/terraform-create-template-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit a4f6b8d

Please sign in to comment.