-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreate_template.sh
55 lines (38 loc) · 1.04 KB
/
create_template.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# this file is used to create a folder structure for a new terraform project
echo "Creating folder structure for new terraform project"
# select for aws or azure
echo "Select the cloud provider: "
echo "1. AWS"
echo "2. Azure"
read cloud_provider
# if aws then cd into aws folder else cd into azure folder
if [ $cloud_provider == 1 ]
then
cd aws
else
cd azure
fi
echo "Enter the name of the project: "
read project_name
echo "Creating folder structure for $project_name"
mkdir $project_name
# create the folder structure
echo "Opening $project_name folder"
echo "Creating folder structure for $project_name"
cd $project_name
echo "Creating backend.tf file"
touch backend.tf
echo "Creating provider.tf file"
touch provider.tf
echo "Creating main.tf file"
touch main.tf
echo "Creating variables.tf file"
touch variables.tf
echo "Creating outputs.tf file"
touch outputs.tf
echo "Creating jsons folder"
mkdir jsons
echo "Creating terraform.tfvars file"
touch terraform.tfvars
echo "DONE!"
echo "Folder structure for $project_name created"