From 845fa4d4c5484d3dbecfdbad0747205fd38990fe Mon Sep 17 00:00:00 2001
From: "Diaz de Arcaya Serrano, Josu" <josu.diazdearcaya@tecnalia.com>
Date: Thu, 21 Apr 2022 09:43:26 +0200
Subject: [PATCH] Adjust repository format according to issue #1

---
 config.yaml                 |  5 +++++
 landing.sh                  | 41 -------------------------------------
 run.sh                      |  5 -----
 client.tf => tf/client.tf   |  0
 tf/config.yaml              |  8 ++++++++
 outputs.tf => tf/outputs.tf |  0
 6 files changed, 13 insertions(+), 46 deletions(-)
 create mode 100644 config.yaml
 delete mode 100755 landing.sh
 delete mode 100755 run.sh
 rename client.tf => tf/client.tf (100%)
 create mode 100644 tf/config.yaml
 rename outputs.tf => tf/outputs.tf (100%)

diff --git a/config.yaml b/config.yaml
new file mode 100644
index 0000000..89c1b2f
--- /dev/null
+++ b/config.yaml
@@ -0,0 +1,5 @@
+--- 
+iac: 
+  - tf
+...
+
diff --git a/landing.sh b/landing.sh
deleted file mode 100755
index aea7fae..0000000
--- a/landing.sh
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/bin/bash
-
-# A POSIX variable
-OPTIND=1         # Reset in case getopts has been used previously in the shell.
-
-usage="usage: landing-script.sh [-h]  [-i] [-a] [-d]
-
-This script serves as the entrypoint for the IEM
-
-arguments:
-  -h	show this help message and exit
-  -i	init configuration
-  -a	create or update infrastructure
-  -d	destroy infrastructure"
-
-init() {
-  terraform init
-}
-
-apply() {
-  terraform apply -auto-approve
-}
-
-destroy() {
-  terraform destroy -auto-approve
-}
-
-while getopts "h?iad" opt; do
-  case "$opt" in
-    h|\?)
-      echo "$usage"
-      exit 0
-      ;;
-    i)  init
-      ;;
-    a)  apply
-      ;;
-    d)  destroy
-      ;;
-  esac
-done
diff --git a/run.sh b/run.sh
deleted file mode 100755
index 6a52786..0000000
--- a/run.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/bash
-
-terraform init
-terraform apply -auto-approve
-terraform destroy -auto-approve
diff --git a/client.tf b/tf/client.tf
similarity index 100%
rename from client.tf
rename to tf/client.tf
diff --git a/tf/config.yaml b/tf/config.yaml
new file mode 100644
index 0000000..5a94ef9
--- /dev/null
+++ b/tf/config.yaml
@@ -0,0 +1,8 @@
+--- 
+input: 
+  - AWS_ACCESS_KEY_ID
+  - AWS_SECRET_ACCESS_KEY
+output: 
+  - instance_server0_ip
+engine: terraform
+...
diff --git a/outputs.tf b/tf/outputs.tf
similarity index 100%
rename from outputs.tf
rename to tf/outputs.tf
-- 
GitLab