Repository: EnterpriseDB/postgres-deployment (language: python)

Issue:
Segregate PEM svr provisioning from PG instances



Discussion / hints:

Fix patch:
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 00000000..fabaf75f
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,180 @@
+# Contributing
+
+This document provides guidelines on contributing to this repository. Please
+follow these guidelines when creating issues, making commits, and submitting
+pull requests. The repository maintainers review all pull requests and verify
+that they conform to these guidelines before approving and merging.
+
+Please note we have a code of conduct, please follow it in all your
+interactions with the project.
+
+## Contribution Ideas
+
+1. Raise issues for bugs, features, and enhancements.
+2. Submit updates and improvements to the documentation.
+3. Submit articles and guides, which are also part of the documentation.
+4. Help out repo maintainers by answering questions.
+5. Share feedback and let us know about interesting use cases.
+
+## What should I know before I get started?
+
+The best way to directly collaborate with the project contributors is through
+GitHub.
+
+* If you want to raise an issue such as a defect, an enhancement request,
+  feature request, or a general issue, please open a GitHub issue.
+* If you want to contribute to our code by either fixing a problem, enhancing
+  some code, or creating a new feature, please open a GitHub pull request
+  against the master branch.
+
+Before you start to code, we recommend discussing your plans through a GitHub
+issue, especially for more ambitious contributions. This gives other
+contributors a chance to point you in the right direction, give you feedback on
+your design, and help you find out if someone else is working on the same
+thing.
+
+It is your responsibility to test and verify, prior to submitting a pull
+request, that your updated code doesn't introduce any bugs. Please write a
+clear commit message for each commit. Brief messages are fine for small
+changes, but bigger changes warrant a little more detail (at least a few
+sentences).
+
+Note that all patches from all contributors get reviewed.
+
+After a pull request is made, other contributors will offer feedback. If the
+patch passes review, a maintainer will accept it with a comment.
+When a pull request fails review, the author is expected to update the pull
+request to address the issue until it passes review and the pull request merges
+successfully.
+
+At least one review from a maintainer is required for all patches.
+
+# Code of Conduct
+
+## Our Pledge
+
+We as members, contributors, and leaders pledge to make participation in our
+community a harassment-free experience for everyone, regardless of age, body
+size, visible or invisible disability, ethnicity, sex characteristics, gender
+identity and expression, level of experience, education, socio-economic status,
+nationality, personal appearance, race, religion, or sexual identity
+and orientation.
+
+We pledge to act and interact in ways that contribute to an open, welcoming,
+diverse, inclusive, and healthy community.
+
+## Our Standards
+
+Examples of behavior that contributes to a positive environment for our
+community include:
+
+* Demonstrating empathy and kindness toward other people
+* Being respectful of differing opinions, viewpoints, and experiences
+* Giving and gracefully accepting constructive feedback
+* Accepting responsibility and apologizing to those affected by our mistakes,
+  and learning from the experience
+* Focusing on what is best not just for us as individuals, but for the
+  overall community
+
+Examples of unacceptable behavior include:
+
+* The use of sexualized language or imagery, and sexual attention or
+  advances of any kind
+* Trolling, insulting or derogatory comments, and personal or political attacks
+* Public or private harassment
+* Publishing others' private information, such as a physical or email
+  address, without their explicit permission
+* Other conduct which could reasonably be considered inappropriate in a
+  professional setting
+
+## Enforcement Responsibilities
+
+Community leaders are responsible for clarifying and enforcing our standards of
+acceptable behavior and will take appropriate and fair corrective action in
+response to any behavior that they deem inappropriate, threatening, offensive,
+or harmful.
+
+Community leaders have the right and responsibility to remove, edit, or reject
+comments, commits, code, wiki edits, issues, and other contributions that are
+not aligned to this Code of Conduct, and will communicate reasons for moderation
+decisions when appropriate.
+
+## Scope
+
+This Code of Conduct applies within all community spaces, and also applies when
+an individual is officially representing the community in public spaces.
+Examples of representing our community include using an official e-mail address,
+posting via an official social media account, or acting as an appointed
+representative at an online or offline event.
+
+## Enforcement
+
+Instances of abusive, harassing, or otherwise unacceptable behavior may be
+reported to the community leaders responsible for enforcement at
+edb-devops at enterprisedb.com.
+All complaints will be reviewed and investigated promptly and fairly.
+
+All community leaders are obligated to respect the privacy and security of the
+reporter of any incident.
+
+## Enforcement Guidelines
+
+Community leaders will follow these Community Impact Guidelines in determining
+the consequences for any action they deem in violation of this Code of Conduct:
+
+### 1. Correction
+
+**Community Impact**: Use of inappropriate language or other behavior deemed
+unprofessional or unwelcome in the community.
+
+**Consequence**: A private, written warning from community leaders, providing
+clarity around the nature of the violation and an explanation of why the
+behavior was inappropriate. A public apology may be requested.
+
+### 2. Warning
+
+**Community Impact**: A violation through a single incident or series
+of actions.
+
+**Consequence**: A warning with consequences for continued behavior. No
+interaction with the people involved, including unsolicited interaction with
+those enforcing the Code of Conduct, for a specified period of time. This
+includes avoiding interactions in community spaces as well as external channels
+like social media. Violating these terms may lead to a temporary or
+permanent ban.
+
+### 3. Temporary Ban
+
+**Community Impact**: A serious violation of community standards, including
+sustained inappropriate behavior.
+
+**Consequence**: A temporary ban from any sort of interaction or public
+communication with the community for a specified period of time. No public or
+private interaction with the people involved, including unsolicited interaction
+with those enforcing the Code of Conduct, is allowed during this period.
+Violating these terms may lead to a permanent ban.
+
+### 4. Permanent Ban
+
+**Community Impact**: Demonstrating a pattern of violation of community
+standards, including sustained inappropriate behavior,  harassment of an
+individual, or aggression toward or disparagement of classes of individuals.
+
+**Consequence**: A permanent ban from any sort of public interaction within
+the community.
+
+## Attribution
+
+This Code of Conduct is adapted from the [Contributor Covenant][homepage],
+version 2.0, available at
+https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
+
+Community Impact Guidelines were inspired by [Mozilla's code of conduct
+enforcement ladder](https://github.com/mozilla/diversity).
+
+[homepage]: https://www.contributor-covenant.org
+
+For answers to common questions about this code of conduct, see the FAQ at
+https://www.contributor-covenant.org/faq. Translations are available at
+https://www.contributor-covenant.org/translations.
+
diff --git a/edb-deployment b/edb-deployment
index 122c4825..80714fef 100755
--- a/edb-deployment
+++ b/edb-deployment
@@ -55,10 +55,10 @@ ARGUMENTS="$(echo ${ARGUMENTS} | sed -e "s/  */ /g" \
 
 verify_arguments ${ARGUMENTS}
 
-if [[ "x${PROJECT_NAME}" = "x" ]] 
+if [[ "x${PROJECT_NAME}" = "x" ]]
 then
    read -r -e -p "Enter the project name: " PROJECT_NAME
-   
+
    if [[ -z ${PROJECT_NAME} ]]
    then
        exit_on_error "Project name cannot be empty. Try again!"
@@ -79,18 +79,18 @@ fi
 if [[ "${AWS_SERVER}" = "create" ]]
 then
     verify_aws
-    
+
     aws_config_file "${PROJECT_NAME}"
-    
+
     aws_build_server "${OSNAME}" \
                      "${REGION}" \
-                     "${INSTANCE_COUNT}" \
+                     "${PG_INSTANCE_COUNT}" \
                      "${PUB_FILE_PATH}" \
                      "${PEM_INSTANCE_COUNT}" \
                      "${PROJECT_NAME}" \
                      "${PRIV_FILE_PATH}" \
                      "${AMI_ID}" \
-                    2>&1 | tee ${TERRAFORM_LOG}    
+                    2>&1 | tee ${TERRAFORM_LOG}
 
     copy_files_to_project_folder "aws"
 fi
@@ -98,14 +98,14 @@ fi
 if [[ "${AZURE_SERVER}" = "create" ]]
 then
     verify_azure
-    
+
     azure_config_file "${PROJECT_NAME}"
-   
+
     azure_build_server "${PUBLISHER}" \
                        "${OFFER}" \
                        "${SKU}" \
                        "${LOCATION}" \
-                       "${INSTANCE_COUNT}" \
+                       "${PG_INSTANCE_COUNT}" \
                        "${PUB_FILE_PATH}" \
                        "${PROJECT_NAME}" \
                        "${PEM_INSTANCE_COUNT}" \
@@ -118,12 +118,12 @@ fi
 if [[ "${GCLOUD_SERVER}" = "create" ]]
 then
     verify_gcloud
-    
+
     gcloud_config_file "${PROJECT_NAME}"
-   
+
     gcloud_build_server "${OSNAME}" \
                         "${SUBNETWORK_REGION}" \
-                        "${INSTANCE_COUNT}" \
+                        "${PG_INSTANCE_COUNT}" \
                         "${PUB_FILE_PATH}" \
                         "${PROJECT_ID}" \
                         "${PROJECT_NAME}" \
@@ -141,7 +141,7 @@ fi
 if [[ "${AWS_POSTGRES_INSTALL}" = "install" ]]
 then
     aws_config_file "${PROJECT_NAME}"
-    
+
     aws_ansible_pg_install "${OSNAME}" \
                        "${PG_TYPE}" \
                        "${PG_VERSION}" \
@@ -156,7 +156,7 @@ fi
 if [[ "${AZURE_POSTGRES_INSTALL}" = "install" ]]
 then
     azure_config_file "${PROJECT_NAME}"
-    
+
     azure_ansible_pg_install "${PG_TYPE}" \
                        "${PG_VERSION}" \
                        "${YUM_USERNAME}" \
@@ -170,7 +170,7 @@ fi
 if [[ "${GCLOUD_POSTGRES_INSTALL}" = "install" ]]
 then
     gcloud_config_file "${PROJECT_NAME}"
-    
+
     gcloud_ansible_pg_install "${PG_TYPE}" \
                        "${PG_VERSION}" \
                        "${YUM_USERNAME}" \
@@ -186,7 +186,7 @@ fi
 ################################################################################
 if [[ "${AWS_CONFIG}" = "show" ]]
 then
-    aws_show_config_file "${PROJECT_NAME}"    
+    aws_show_config_file "${PROJECT_NAME}"
 fi
 
 if [[ "${AWS_CONFIG}" = "update" ]]
@@ -196,7 +196,7 @@ fi
 
 if [[ "${AZURE_CONFIG}" = "show" ]]
 then
-    azure_show_config_file "${PROJECT_NAME}"    
+    azure_show_config_file "${PROJECT_NAME}"
 fi
 
 if [[ "${AZURE_CONFIG}" = "update" ]]
@@ -206,7 +206,7 @@ fi
 
 if [[ "${GCLOUD_CONFIG}" = "show" ]]
 then
-    gcloud_show_config_file "${PROJECT_NAME}"    
+    gcloud_show_config_file "${PROJECT_NAME}"
 fi
 
 if [[ "${GCLOUD_CONFIG}" = "update" ]]
@@ -220,27 +220,27 @@ then
 fi
 
 if [[ "${AWS_PROJECT}" = "switch" ]]
-then 
+then
     aws_switch_projects "${PROJECT_NAME}"
 fi
 
 if [[ "${AZURE_PROJECT}" = "list" ]]
-then 
+then
     azure_list_projects
 fi
 
 if [[ "${AZURE_PROJECT}" = "switch" ]]
-then 
+then
     azure_switch_projects "${PROJECT_NAME}"
 fi
 
 if [[ "${GCLOUD_PROJECT}" = "list" ]]
-then 
+then
     gcloud_list_projects
 fi
 
 if [[ "${GCLOUD_PROJECT}" = "switch" ]]
-then 
+then
     gcloud_switch_projects "${PROJECT_NAME}"
 fi
 
@@ -252,7 +252,7 @@ then
     RESULT=""
     custom_yesno_prompt "Are you sure you want to destroy project: '${PROJECT_NAME}'?" "Enter: (Y)es/(N)o " RESULT
     if [[ "${RESULT}" = "Yes" ]]
-    then    
+    then
         aws_config_file "${PROJECT_NAME}"
         aws_destroy_server "${REGION}" "${PROJECT_NAME}" | tee  ${TERRAFORM_LOG}
     fi
@@ -263,7 +263,7 @@ then
     RESULT=""
     custom_yesno_prompt "Are you sure you want to destroy project: '${PROJECT_NAME}'?" "Enter: (Y)es/(N)o " RESULT
     if [[ "${RESULT}" = "Yes" ]]
-    then    
+    then
         azure_config_file "${PROJECT_NAME}"
         azure_destroy_server "${LOCATION}" "${PROJECT_NAME}" "${PUB_FILE_PATH}" | tee  ${TERRAFORM_LOG}
     fi
@@ -274,8 +274,8 @@ then
     RESULT=""
     custom_yesno_prompt "Are you sure you want to destroy project: '${PROJECT_NAME}'?" "Enter: (Y)es/(N)o " RESULT
     if [[ "${RESULT}" = "Yes" ]]
-    then    
+    then
         gcloud_config_file "${PROJECT_NAME}"
         gcloud_destroy_server "${SUBNETWORK_REGION}" "${PROJECT_ID}" "${PUB_FILE_PATH}" "${PROJECT_NAME}" | tee  ${TERRAFORM_LOG}
-    fi        
+    fi
 fi
diff --git a/lib/build_servers.sh b/lib/build_servers.sh
index b6fca6b7..a5ce120e 100644
--- a/lib/build_servers.sh
+++ b/lib/build_servers.sh
@@ -26,9 +26,9 @@ function aws_build_server()
 {
     local F_OSNAME="$1"
     local F_REGION="$2"
-    local F_INSTANCES="$3"
+    local F_PG_INSTANCE_COUNT="$3"
     local F_KEYPATH="$4"
-    local F_PEMINSTANCE="$5"
+    local F_PEM_INSTANCE_COUNT="$5"
     local F_PROJECTNAME="$6"
     local F_AMI_ID=""
     local F_IMAGE_NAME=""
@@ -37,47 +37,47 @@ function aws_build_server()
     local F_AMI_ID="$8"
     local F_PUB_KEYNAMEANDEXTENSION=""
     local F_PRIV_KEYNAMEANDEXTENSION=""
-    
+
     process_log "Building AWS Servers"
     cd ${DIRECTORY}/terraform/aws || exit 1
     process_log "including project names in the variables and tags"
     sed "s/PROJECT_NAME/${F_PROJECTNAME}/g" tags.tf.template > tags.tf
     sed "s/PROJECT_NAME/${F_PROJECTNAME}/g" variables.tf.template \
-                                        > variables.tf 
+                                        > variables.tf
 
     if [ "$F_AMI_ID" = "No" ]
-    then   
+    then
         case $F_OSNAME in
             "CentOS7")
-                shift; 
+                shift;
                 F_IMAGE_NAME="CentOS Linux 7 x86_64 HVM EBS*"
                 export F_IMAGE_NAME
                 ;;
             "CentOS8")
-                shift; 
+                shift;
                 F_IMAGE_NAME="CentOS 8*"
                 export F_IMAGE_NAME
                 ;;
             "RHEL7")
-                shift; 
+                shift;
                 F_IMAGE_NAME="RHEL-7.8-x86_64*"
                 export F_IMAGE_NAME
-                ;;            
+                ;;
             "RHEL8")
-                shift; 
+                shift;
                 F_IMAGE_NAME="RHEL-8.2-x86_64*"
                 export F_IMAGE_NAME
-                ;;                       
+                ;;
         esac
 
-        if [[ "${F_OSNAME}" =~ "Cent" ]]        
+        if [[ "${F_OSNAME}" =~ "Cent" ]]
         then
             ANSIBLE_USER="centos"
         elif [[ "${F_OSNAME}" =~ "RHEL" ]]
         then
             ANSIBLE_USER="ec2-user"
         fi
-    
+
         process_log "Checking availability of Instance Type in target region"
         instancetypeExists=$(aws ec2 describe-instance-type-offerings --location-type availability-zone  --filters Name=instance-type,Values=${F_INSTANCE_TYPE} --region ${REGION} --output text)
         if [ ! -z "$instancetypeExists" ]
@@ -86,7 +86,7 @@ function aws_build_server()
         else
             exit_on_error "Instance Type: '${F_INSTANCE_TYPE}' is not available in region: '${REGION}'"
         fi
-       
+
         process_log "Checking availability of Instance Image in target region"
         F_AMI_ID=$(aws ec2 describe-images --filters Name=name,Values="${F_IMAGE_NAME}" --query 'sort_by(Images, &Name)[-1].ImageId' --region ${REGION} --output text)
     fi
@@ -101,7 +101,7 @@ function aws_build_server()
     F_PUB_KEYNAMEANDEXTENSION=$(get_string_after_lastslash "${F_KEYPATH}")
     F_PRIV_KEYNAMEANDEXTENSION=$(get_string_after_lastslash "${F_PRIV_FILE_KEYPATH}")
     F_NEW_PUB_KEYNAME=$(join_strings_with_underscore "${F_PROJECTNAME}" "${F_PUB_KEYNAMEANDEXTENSION}")
-    F_NEW_PRIV_KEYNAME=$(join_strings_with_underscore "${F_PROJECTNAME}" "${F_PRIV_KEYNAMEANDEXTENSION}")    
+    F_NEW_PRIV_KEYNAME=$(join_strings_with_underscore "${F_PROJECTNAME}" "${F_PRIV_KEYNAMEANDEXTENSION}")
     cp -f "${F_KEYPATH}" "${F_NEW_PUB_KEYNAME}"
     cp -f "${F_PRIV_FILE_KEYPATH}" "${F_NEW_PRIV_KEYNAME}"
     cp -f ${DIRECTORY}/terraform/aws/${F_NEW_PUB_KEYNAME} \
@@ -115,14 +115,14 @@ function aws_build_server()
     else
         terraform workspace new "${F_PROJECTNAME}"
     fi
-        
+
     terraform init
-    
+
     terraform apply -auto-approve \
         -var="os=${F_OSNAME}" \
         -var="ami_id=${F_AMI_ID}" \
         -var="aws_region=${REGION}" \
-        -var="instance_count=${F_INSTANCES}" \
+        -var="pg_instance_count=${F_PG_INSTANCE_COUNT}" \
         -var="instance_volume_type=${INSTANCE_VOLUME_TYPE}" \
         -var="instance_volume_iops=${INSTANCE_VOLUME_IOPS}" \
         -var="instance_volume_size=${INSTANCE_VOLUME_SIZE}" \
@@ -135,7 +135,7 @@ function aws_build_server()
         -var="full_private_ssh_key_path=${PROJECTS_DIRECTORY}/aws/${F_PROJECTNAME}/${F_NEW_PRIV_KEYNAME}" \
         -var="root_user=${ANSIBLE_USER}" \
         -var="cluster_name=$F_PROJECTNAME" \
-        -var="pem_instance_count=${F_PEMINSTANCE}"
+        -var="pem_instance_count=${F_PEM_INSTANCE_COUNT}"
 
     if [[ $? -eq 0 ]]
     then
@@ -145,10 +145,11 @@ function aws_build_server()
     else
         exit_on_error "Failed to build the servers."
     fi
-    #sed -i "/^ */d" inventory.yml
-    sed -i "/^ *$/d" pem-inventory.yml
-    
-    cp -f pem-inventory.yml hosts.yml
+
+    # Remove empty lines from inventory file
+    sed -i.bak "/^ *$/d" inventory.yml
+    rm inventory.yml.bak
+
     mv -f ${DIRECTORY}/terraform/aws/${F_NEW_PUB_KEYNAME} \
         ${PROJECTS_DIRECTORY}/aws/${F_PROJECTNAME}/${F_NEW_PUB_KEYNAME}
     mv -f ${DIRECTORY}/terraform/aws/${F_NEW_PRIV_KEYNAME} \
@@ -162,20 +163,21 @@ function azure_build_server()
     local F_OFFER="$2"
     local F_SKU="$3"
     local F_LOCATION="$4"
-    local F_INSTANCE_COUNT="$5"
+    local F_PG_INSTANCE_COUNT="$5"
     local F_PUB_FILE_PATH="$6"
     local F_PROJECTNAME="$7"
     local F_EDB_PREREQ_GROUP="${7}_EDB-PREREQS-RESOURCEGROUP"
     local F_PEM_INSTANCE_COUNT="$8"
     local F_PRIV_FILE_KEYPATH="$9"
-    #Minimal size
+    # Minimal size
     #local F_AZURE_INSTANCE_SIZE="Standard_A1"
-    #Small size
-    local F_AZURE_INSTANCE_SIZE="Standard_A2_v2"
-    #Larger size
-    #local F_AZURE_INSTANCE_SIZE="Standard_A8_v2"
+    # Small size
+    # Before adding managed disks
+    #local F_AZURE_INSTANCE_SIZE="Standard_A2_v2"
+    # Larger size
+    local F_AZURE_INSTANCE_SIZE="Standard_A8_v2"
     local ANSIBLE_USER=""
-    
+
     process_log "Building Azure Servers"
     cd ${DIRECTORY}/terraform/azure || exit 1
     process_log "including project names in the variables and tags"
@@ -191,7 +193,7 @@ function azure_build_server()
     else
         exit_on_error "Instance Size: '${F_AZURE_INSTANCE_SIZE}' is not available in region: '${F_LOCATION}'"
     fi
-       
+
     process_log "Checking availability of Instance Image in target region"
     amiExists=$(az vm image list --all -p ${F_PUBLISHER} -f ${F_OFFER} -s ${F_SKU} -l ${F_LOCATION} --output table)
     if [ ! -z "$amiExists" ]
@@ -207,6 +209,10 @@ function azure_build_server()
     F_NEW_PRIV_KEYNAME=$(join_strings_with_underscore "${F_PROJECTNAME}" "${F_PRIV_KEYNAMEANDEXTENSION}")
     cp -f "${F_PUB_FILE_PATH}" "${F_NEW_PUB_KEYNAME}"
     cp -f "${F_PRIV_FILE_KEYPATH}" "${F_NEW_PRIV_KEYNAME}"
+    cp -f ${DIRECTORY}/terraform/azure/${F_NEW_PUB_KEYNAME} \
+        ${PROJECTS_DIRECTORY}/azure/${F_PROJECTNAME}/${F_NEW_PUB_KEYNAME}
+    cp -f ${DIRECTORY}/terraform/azure/${F_NEW_PRIV_KEYNAME} \
+        ${PROJECTS_DIRECTORY}/azure/${F_PROJECTNAME}/${F_NEW_PRIV_KEYNAME}
 
     if output=$(terraform workspace list | grep "${F_PROJECTNAME}")  &&  [ ! -z "$output" ]
     then
@@ -215,7 +221,7 @@ function azure_build_server()
         terraform workspace new "${F_PROJECTNAME}"
     fi
 
-    if [[ "${OFFER}" =~ "Cent" ]]        
+    if [[ "${OFFER}" =~ "Cent" ]]
     then
         ANSIBLE_USER="centos"
     elif [[ "${OFFER}" =~ "RHEL" ]]
@@ -224,7 +230,7 @@ function azure_build_server()
     else
         exit_on_error "Unknown Operating system"
     fi
-                                                    
+
     terraform init
 
 #    terraform apply -auto-approve \
@@ -236,9 +242,9 @@ function azure_build_server()
 #         -var="admin_username=${ANSIBLE_USER}" \
 #         -var="instance_count=1" \
 #         -var="ssh_key_path=./${F_NEW_PUB_KEYNAME}"
- 
+
 #    if [ "$?" = "0" ]; then
-#      # Wait for VMs to be fully available
+#      # Wait for instances to be fully available
 #      az vm wait --ids $(az vm list -g "$F_EDB_PREREQ_GROUP" --query "[].id" -o tsv) --created
 #    fi
 
@@ -250,10 +256,14 @@ function azure_build_server()
          -var="azure_location=${F_LOCATION}" \
          -var="instance_size=${F_AZURE_INSTANCE_SIZE}" \
          -var="admin_username=${ANSIBLE_USER}" \
-         -var="instance_count=${F_INSTANCE_COUNT}" \
+         -var="pg_instance_count=${F_PG_INSTANCE_COUNT}" \
          -var="pem_instance_count=${F_PEM_INSTANCE_COUNT}" \
          -var="cluster_name=$F_PROJECTNAME" \
-         -var="ssh_key_path=./${F_NEW_PUB_KEYNAME}"
+         -var="vm_manageddisk_count=$ADDITIONAL_VOLUMES_COUNT" \
+         -var="vm_manageddisk_disktype=$ADDITIONAL_VOLUMES_DISKTYPE" \
+         -var="vm_manageddisk_volume_size=$ADDITIONAL_VOLUMES_SIZE" \
+         -var="ssh_key_path=./${F_NEW_PUB_KEYNAME}" \
+         -var="full_private_ssh_key_path=${PROJECTS_DIRECTORY}/azure/${F_PROJECTNAME}/${F_NEW_PRIV_KEYNAME}"
 
     if [[ $? -eq 0 ]]
     then
@@ -263,15 +273,15 @@ function azure_build_server()
     else
         exit_on_error "Failed to build the servers."
     fi
-    #sed -i "/^ */d" inventory.yml
-    sed -i "/^ *$/d" pem-inventory.yml
-    
-    cp -f pem-inventory.yml hosts.yml
-        
+
+    # Remove empty lines from inventory file
+    sed -i.bak "/^ *$/d" inventory.yml
+    rm inventory.yml.bak
+
     mv -f ${DIRECTORY}/terraform/azure/${F_NEW_PUB_KEYNAME} \
        ${PROJECTS_DIRECTORY}/azure/${F_PROJECTNAME}/${F_NEW_PUB_KEYNAME}
     mv -f ${DIRECTORY}/terraform/azure/${F_NEW_PRIV_KEYNAME} \
-       ${PROJECTS_DIRECTORY}/azure/${F_PROJECTNAME}/${F_NEW_PRIV_KEYNAME}    
+       ${PROJECTS_DIRECTORY}/azure/${F_PROJECTNAME}/${F_NEW_PRIV_KEYNAME}
 }
 
 function gcloud_build_server()
@@ -279,9 +289,9 @@ function gcloud_build_server()
     local F_OSVERSION=""
     local F_OS="$1"
     local F_SUBNETWORK_REGION="$2"
-    local F_INSTANCE_COUNT="$3"
+    local F_PG_INSTANCE_COUNT="$3"
     local F_PUB_FILE_PATH="$4"
-    local F_PROJECTID="$5"    
+    local F_PROJECTID="$5"
     local F_PROJECTNAME="$6"
     local F_PEM_INSTANCE_COUNT="$7"
     local F_CREDENTIALS_FILE_LOCATION="$8"
@@ -297,31 +307,35 @@ function gcloud_build_server()
                                         > variables.tf
 
     if [[ "${F_OS}" =~ "centos" ]]
-    then  
+    then
         F_ANSIBLE_USER="centos"
-    fi
-
-    if [[ "${F_OS}" =~ "rhel" ]]
-    then  
+    elif [[ "${F_OS}" =~ "rhel" ]]
+    then
         F_ANSIBLE_USER="ec2-user"
+    else
+        exit_on_error "Unknown Operating system"
     fi
-        
+
     process_log "Checking availability of Image in target region"
     F_IMAGE_LIST=$(gcloud compute images list --filter="family=${F_OS}" --format="[list,no-heading]")
-    F_IMAGE_NAME=$(get_first_word_from_output "${F_IMAGE_LIST}")    
+    F_IMAGE_NAME=$(get_first_word_from_output "${F_IMAGE_LIST}")
     if [ ! -z "$F_IMAGE_NAME" ]
     then
         process_log "Instance Image for: Family: '${F_OS}' is available in region: '${F_SUBNETWORK_REGION}'"
     else
         exit_on_error "Instance Image for: Family: '${F_OS}' is not available in location: '${F_SUBNETWORK_REGION}'"
     fi
-        
+
     F_PUB_KEYNAMEANDEXTENSION=$(get_string_after_lastslash "${F_PUB_FILE_PATH}")
     F_PRIV_KEYNAMEANDEXTENSION=$(get_string_after_lastslash "${F_PRIV_FILE_KEYPATH}")
     F_NEW_PUB_KEYNAME=$(join_strings_with_underscore "${F_PROJECTNAME}" "${F_PUB_KEYNAMEANDEXTENSION}")
     F_NEW_PRIV_KEYNAME=$(join_strings_with_underscore "${F_PROJECTNAME}" "${F_PRIV_KEYNAMEANDEXTENSION}")
     cp -f "${F_PUB_FILE_PATH}" "${F_NEW_PUB_KEYNAME}"
     cp -f "${F_PRIV_FILE_KEYPATH}" "${F_NEW_PRIV_KEYNAME}"
+    cp -f ${DIRECTORY}/terraform/gcloud/${F_NEW_PUB_KEYNAME} \
+        ${PROJECTS_DIRECTORY}/gcloud/${F_PROJECTNAME}/${F_NEW_PUB_KEYNAME}
+    cp -f ${DIRECTORY}/terraform/gcloud/${F_NEW_PRIV_KEYNAME} \
+        ${PROJECTS_DIRECTORY}/gcloud/${F_PROJECTNAME}/${F_NEW_PRIV_KEYNAME}
 
     if output=$(terraform workspace list | grep "${F_PROJECTNAME}")  &&  [ ! -z "$output" ]
     then
@@ -329,20 +343,26 @@ function gcloud_build_server()
     else
         terraform workspace new "${F_PROJECTNAME}"
     fi
- 
+
     terraform init
 
     terraform apply -auto-approve \
          -var="os=$F_IMAGE_NAME" \
          -var="project_name=$F_PROJECTID" \
          -var="subnetwork_region=$F_SUBNETWORK_REGION" \
-         -var="instance_count=$F_INSTANCE_COUNT" \
+         -var="pg_instance_count=$F_PG_INSTANCE_COUNT" \
          -var="pem_instance_count=${F_PEM_INSTANCE_COUNT}" \
          -var="credentials=$F_CREDENTIALS_FILE_LOCATION" \
          -var="ssh_user=$F_ANSIBLE_USER" \
          -var="instance_name=$F_PROJECTNAME" \
-         -var="ssh_key_location=./${F_NEW_PUB_KEYNAME}"
- 
+         -var="volume_count=$ADDITIONAL_VOLUMES_COUNT" \
+         -var="volume_disk_type=$ADDITIONAL_VOLUMES_DISKTYPE" \
+         -var="volume_disk_size=$ADDITIONAL_VOLUMES_SIZE" \
+         -var="ssh_key_location=./${F_NEW_PUB_KEYNAME}" \
+         -var="full_private_ssh_key_path=${PROJECTS_DIRECTORY}/gcloud/${F_PROJECTNAME}/${F_NEW_PRIV_KEYNAME}" \
+         -var="disk_encryption_key=${DISK_ENCRYPTION_KEY}"
+
+    # Force application of startup script
     if [[ $? -eq 0 ]]
     then
         process_log "Waiting for Instances to be available"
@@ -351,15 +371,30 @@ function gcloud_build_server()
     else
         exit_on_error "Failed to build the servers."
     fi
-    #sed -i "/^ */d" inventory.yml
-    sed -i "/^ *$/d" pem-inventory.yml
-       
-    cp -f pem-inventory.yml hosts.yml
-        
+
+    # Remove empty lines from inventory file
+    sed -i.bak "/^ *$/d" inventory.yml
+    rm inventory.yml.bak
+
+    mv -f ${DIRECTORY}/terraform/gcloud/hosts \
+       ${PROJECTS_DIRECTORY}/gcloud/${F_PROJECTNAME}/hosts
     mv -f ${DIRECTORY}/terraform/gcloud/${F_NEW_PUB_KEYNAME} \
        ${PROJECTS_DIRECTORY}/gcloud/${F_PROJECTNAME}/${F_NEW_PUB_KEYNAME}
     mv -f ${DIRECTORY}/terraform/gcloud/${F_NEW_PRIV_KEYNAME} \
        ${PROJECTS_DIRECTORY}/gcloud/${F_PROJECTNAME}/${F_NEW_PRIV_KEYNAME}
+
+    # Force Re-Running Startup Script
+    if [[ "$ADDITIONAL_VOLUMES_COUNT" != "0" ]]
+    then
+       cd ${PROJECTS_DIRECTORY}/gcloud/${PROJECT_NAME} || exit 1
+
+       ansible all -i ./hosts \
+           --ssh-common-args='-o StrictHostKeyChecking=no' \
+           --user="${F_ANSIBLE_USER}" \
+           --private-key="./${F_NEW_PRIV_KEYNAME}" \
+           -m shell -a "sudo google_metadata_script_runner startup"
+    fi
+    process_log "Cluster was provisioned successfully!"
 }
 
 ################################################################################
@@ -374,13 +409,13 @@ function aws_destroy_server()
     cd ${DIRECTORY}/terraform/aws || exit 1
 
     terraform workspace select "${F_PROJECTNAME}"
-        
+
     terraform destroy -auto-approve \
         -var="aws_region=${REGION}"
 
     terraform workspace select default
     terraform workspace delete "${F_PROJECTNAME}"
-    
+
     rm -Rf ${PROJECTS_DIRECTORY}/aws/${F_PROJECTNAME}
 }
 
@@ -397,13 +432,13 @@ function azure_destroy_server()
 
     F_PUB_KEYNAMEANDEXTENSION=$(get_string_after_lastslash "${F_PUB_FILE_PATH}")
     F_NEW_PUB_KEYNAME=$(join_strings_with_underscore "${F_PROJECTNAME}" "${F_PUB_KEYNAMEANDEXTENSION}")
-    
+
     terraform workspace select "${F_PROJECTNAME}"
-        
+
     terraform destroy -auto-approve \
         -var="azure_location=${F_LOCATION}" \
-         -var="ssh_key_path=./${F_NEW_PUB_KEYNAME}"        
-        
+         -var="ssh_key_path=./${F_NEW_PUB_KEYNAME}"
+
     terraform workspace select default
     terraform workspace delete "${F_PROJECTNAME}"
 
@@ -418,10 +453,10 @@ function gcloud_destroy_server()
     local F_PROJECTNAME="$4"
 
     process_log "Removing Google Cloud Servers"
-    cd ${DIRECTORY}/terraform/gcloud || exit 1    
+    cd ${DIRECTORY}/terraform/gcloud || exit 1
 
     terraform workspace select "${F_PROJECTNAME}"
-    
+
     terraform destroy -auto-approve \
         -var="subnetwork_region=${F_SUBNETWORK_REGION}" \
         -var="project_name=${F_PROJECT_ID}" \
diff --git a/lib/common_funcs.sh b/lib/common_funcs.sh
index db5dedda..537e8fdd 100644
--- a/lib/common_funcs.sh
+++ b/lib/common_funcs.sh
@@ -90,14 +90,16 @@ function validate_variable()
         echo "${VARIABLE}=${VAR_VALUE}" >> ${FILE}
     elif [[ "${CHECK_VAR}" = "exists_empty" ]]
     then
-        sed -i "/${VARIABLE}=/d" ${FILE}
+        sed -i.bak "/${VARIABLE}=/d" ${FILE}
+        rm ${FILE}.bak
         echo "${VARIABLE}=${VAR_VALUE}" >> ${FILE}
     elif [[ "${CHECK_VAR}" = "exists_not_empty" ]]
     then
         OLD_VALUE=$(grep "^${VARIABLE}=" ${FILE} | cut -d"=" -f2)
         if [[ "${OLD_VALUE}" != "${VAR_VALUE}" ]]
         then
-            sed -i "/${VARIABLE}=/d" ${FILE}
+            sed -i.bak "/${VARIABLE}=/d" ${FILE}
+            rm ${FILE}.bak
             echo "${VARIABLE}=${VAR_VALUE}" >> ${FILE}
         fi
     fi
@@ -132,7 +134,7 @@ function get_string_after_lastslash {
    set +u
    local filenameandpath=$1
    local F_Result=""
-   
+
    F_Result=$(echo "${filenameandpath##*/}")
 
    echo "$F_Result"
@@ -146,7 +148,7 @@ function get_string_before_last_hyphen {
    set +u
    local content=$1
    local F_Result=""
-   
+
    F_Result=$(echo "${content%-*}")
 
    echo "$F_Result"
@@ -161,7 +163,7 @@ function join_strings_with_underscore {
    local string1=$1
    local string2=$2
    local F_Result=""
-   
+
    F_Result="${string1}_${string2}"
 
    echo "$F_Result"
@@ -175,7 +177,7 @@ function get_first_word_from_output {
    set +u
    local text=$1
    local F_Result=""
-   
+
    F_Result=$(echo $text | grep -o "^\S*")
 
    echo "$F_Result"
@@ -188,13 +190,11 @@ function get_first_word_from_output {
 function copy_files_to_project_folder {
    set +u
    local cloud=$1
-   
+
    cp -f ${DIRECTORY}/playbook/ansible.cfg ${PROJECTS_DIRECTORY}/${cloud}/${PROJECT_NAME}/.
    cp -f ${DIRECTORY}/playbook/playbook*.yml ${PROJECTS_DIRECTORY}/${cloud}/${PROJECT_NAME}/.
-   cp -f ${DIRECTORY}/playbook/rhel_firewald_rule.yml ${PROJECTS_DIRECTORY}/${cloud}/${PROJECT_NAME}/.        
-   mv -f ${DIRECTORY}/terraform/${cloud}/hosts.yml ${PROJECTS_DIRECTORY}/${cloud}/${PROJECT_NAME}/.
 
-   mv -f ${DIRECTORY}/terraform/${cloud}/pem-inventory.yml ${PROJECTS_DIRECTORY}/${cloud}/${PROJECT_NAME}/.
+   mv -f ${DIRECTORY}/terraform/${cloud}/inventory.yml ${PROJECTS_DIRECTORY}/${cloud}/${PROJECT_NAME}/.
    mv -f ${DIRECTORY}/terraform/${cloud}/os.csv ${PROJECTS_DIRECTORY}/${cloud}/${PROJECT_NAME}/.
    mv -f ${DIRECTORY}/terraform/${cloud}/add_host.sh ${PROJECTS_DIRECTORY}/${cloud}/${PROJECT_NAME}/.
 
@@ -212,7 +212,7 @@ function custom_yesno_prompt()
     local VALUETORETURN="$3"
     local YES="Yes"
     local NO="No"
- 
+
     while true
     do
        echo $QUESTION
@@ -227,7 +227,7 @@ function custom_yesno_prompt()
                 VALUETORETURN=${YES}
                 break
                 ;;
-          [nN]) 
+          [nN])
                 #echo "You responded: ${OPTION}"
                 VALUETORETURN=${NO}
                 break
@@ -259,7 +259,7 @@ function custom_options_prompt()
        do
            echo "$opt"
        done
-       echo -e "${MESSAGE} \c"       
+       echo -e "${MESSAGE} \c"
        read ANSWER
 
        #echo "You responded: ${ANSWER}"
@@ -275,7 +275,7 @@ function custom_options_prompt()
     done
 
     #echo "${ANSWER}"
-    RESULT="${ANSWER}"    
+    RESULT="${ANSWER}"
 }
 
 ################################################################################
@@ -294,7 +294,7 @@ function validate_string_not_empty()
            echo -e "$QUESTION \c"
        else
            echo "$QUESTION"
-           echo -e "$MESSAGE \c"           
+           echo -e "$MESSAGE \c"
        fi
        read ANSWER
 
diff --git a/lib/config_funcs.sh b/lib/config_funcs.sh
index 3dbbe3fb..2c292068 100644
--- a/lib/config_funcs.sh
+++ b/lib/config_funcs.sh
@@ -49,7 +49,7 @@ function check_update_param()
                 exit_on_error "${PARAM} value cannot be string"
             fi
         fi
-        if [[ "${PARAM}" = "INSTANCE_COUNT" ]]
+        if [[ "${PARAM}" = "PG_INSTANCE_COUNT" ]]
         then
             if [[ "${VALUE}" -lt 1 ]]
             then
@@ -61,17 +61,15 @@ function check_update_param()
             VALUE=$(echo ${VALUE}|tr '[:upper:]' '[:lower:]')
             if [[ "${VALUE}" = "yes" ]]
             then
-                INSTANCE_COUNT=$(grep INSTANCE_COUNT ${CONFIG_FILE} \
+                PG_INSTANCE_COUNT=$(grep PG_INSTANCE_COUNT ${CONFIG_FILE} \
                                     |cut -d"=" -f2)
-                if [[ "x${INSTANCE_COUNT}" = "x" ]]
+                if [[ "x${PG_INSTANCE_COUNT}" = "x" ]]
                 then
-                    INSTANCE_COUNT=1
-                else
-                    INSTANCE_COUNT=$(( INSTANCE_COUNT + 1 ))
+                    PG_INSTANCE_COUNT=1
                 fi
-                validate_variable "INSTANCE_COUNT" \
+                validate_variable "PG_INSTANCE_COUNT" \
                                   "${CONFIG_FILE}"  \
-                                  "${INSTANCE_COUNT}"
+                                  "${PG_INSTANCE_COUNT}"
                 PEM_INSTANCE_COUNT=1
                 validate_variable "PEM_INSTANCE_COUNT" \
                                   "${CONFIG_FILE}"  \
@@ -80,17 +78,15 @@ function check_update_param()
 
             if [[ "${VALUE}" = "no" ]]
             then
-                INSTANCE_COUNT=$(grep INSTANCE_COUNT ${CONFIG_FILE} \
+                PG_INSTANCE_COUNT=$(grep PG_INSTANCE_COUNT ${CONFIG_FILE} \
                                     |cut -d"=" -f2)
-                if [[ "x${INSTANCE_COUNT}" = "x" ]]
+                if [[ "x${PG_INSTANCE_COUNT}" = "x" ]]
                 then
-                    INSTANCE_COUNT=1
-                else
-                    INSTANCE_COUNT=$(( INSTANCE_COUNT ))
+                    PG_INSTANCE_COUNT=1
                 fi
-                validate_variable "INSTANCE_COUNT" \
+                validate_variable "PG_INSTANCE_COUNT" \
                                   "${CONFIG_FILE}"  \
-                                  "${INSTANCE_COUNT}"
+                                  "${PG_INSTANCE_COUNT}"
                 PEM_INSTANCE_COUNT=0
                 validate_variable "PEM_INSTANCE_COUNT" \
                                   "${CONFIG_FILE}"  \
@@ -106,8 +102,8 @@ function check_update_param()
             if [[ "${VALUE}" -gt 12 ]]
             then
                 exit_on_error "Instance count cannot be less than 10"
-            fi            
-        fi        
+            fi
+        fi
         validate_variable "${PARAM}" "${CONFIG_FILE}" "${VALUE}"
     fi
 }
@@ -121,7 +117,7 @@ function aws_config_file()
     local CONFIG_FILE="${PROJECTS_DIRECTORY}/aws/${PROJECT_NAME}/${PROJECT_NAME}.cfg"
 
     mkdir -p ${LOGDIR}
-    mkdir -p ${PROJECTS_DIRECTORY}/aws/${PROJECT_NAME}    
+    mkdir -p ${PROJECTS_DIRECTORY}/aws/${PROJECT_NAME}
 
     if [[ ! -f ${CONFIG_FILE} ]]
     then
@@ -130,7 +126,7 @@ function aws_config_file()
     else
         source ${CONFIG_FILE}
     fi
-    
+
     set +u
 
     # Prompt for OSNAME
@@ -139,7 +135,7 @@ function aws_config_file()
     then
         declare -a OPTIONS=('1. CentOS 7' '2. CentOS 8' '3. RHEL 7' '4. RHEL 8')
         declare -a CHOICES=('1' '2' '3' '4')
-        
+
         RESULT=""
         custom_options_prompt "Which Operating System would you like to Install?" \
            "Please enter your choice:" \
@@ -163,14 +159,14 @@ function aws_config_file()
     fi
     export OSNAME
     validate_variable "OSNAME" "${CONFIG_FILE}" "${OSNAME}"
-    
+
     # Prompt for REGION
     CHECK=$(check_variable "REGION" "${CONFIG_FILE}")
     if [[ "${CHECK}" = "not_exists" ]] || [[ "${CHECK}" = "exists_empty" ]]
     then
         declare -a OPTIONS=('1. us-east-1' '2. us-east-2' '3. us-west-1' '4. us-west-2')
         declare -a CHOICES=('1' '2' '3' '4')
-        
+
         RESULT=""
         custom_options_prompt "Which Region would you like to use?" \
           "Please enter your choice:" \
@@ -190,17 +186,17 @@ function aws_config_file()
           4)
             REGION="us-west-2"
             ;;
-        esac   
+        esac
     fi
     export REGION
     validate_variable "REGION" "${CONFIG_FILE}" "${REGION}"
 
-    CHECK=$(check_variable "INSTANCE_COUNT" "${CONFIG_FILE}")
+    CHECK=$(check_variable "PG_INSTANCE_COUNT" "${CONFIG_FILE}")
     if [[ "${CHECK}" = "not_exists" ]] || [[ "${CHECK}" = "exists_empty" ]]
     then
         declare -a OPTIONS=('1. Single Installation' '2. Multi-Node Installation')
         declare -a CHOICES=('1' '2')
-        
+
         RESULT=""
         custom_options_prompt "How many AWS EC2 Instances would you like to create?" \
           "Please enter your choice:" \
@@ -209,10 +205,10 @@ function aws_config_file()
           RESULT
         case "${RESULT}" in
           1)
-            validate_variable "INSTANCE_COUNT" "${CONFIG_FILE}" "1"
+            validate_variable "PG_INSTANCE_COUNT" "${CONFIG_FILE}" "1"
             validate_variable "PEM_INSTANCE_COUNT" "${CONFIG_FILE}" "0"
             validate_variable "PEMSERVER" "${CONFIG_FILE}" "No"
-            export INSTANCE_COUNT
+            export PG_INSTANCE_COUNT
             export PEM_INSTANCE_COUNT
             export PEMSERVER
             ;;
@@ -223,11 +219,10 @@ function aws_config_file()
               "Please enter how many AWS EC2 Instances you would like for the Multi-Node Cluster? " \
               "" \
               RESULT
-            RESULT=$(( RESULT + 1 ))
-            validate_variable "INSTANCE_COUNT" "${CONFIG_FILE}" "${RESULT}"
+            validate_variable "PG_INSTANCE_COUNT" "${CONFIG_FILE}" "${RESULT}"
             validate_variable "PEM_INSTANCE_COUNT" "${CONFIG_FILE}" "1"
             validate_variable "PEMSERVER" "${CONFIG_FILE}" "Yes"
-            export INSTANCE_COUNT
+            export PG_INSTANCE_COUNT
             export PEM_INSTANCE_COUNT
             export PEMSERVER
             ;;
@@ -240,7 +235,7 @@ function aws_config_file()
     then
         declare -a OPTIONS=("1. Default = [${HOME}/.ssh/id_rsa.pub]" '2. Custom')
         declare -a CHOICES=('1' '2')
-        
+
         RESULT=""
         custom_options_prompt "Which public key file will you choose?" \
           "Please enter your choice:" \
@@ -263,7 +258,7 @@ function aws_config_file()
             export PUB_FILE_PATH
             ;;
         esac
-            
+
         #RESULT=""
         #validate_string_not_empty "What will the absolute path of the public key file be?" \
         #  "[${HOME}/.ssh/id_rsa.pub] (Enter will utilize the listed value as default): " \
@@ -279,7 +274,7 @@ function aws_config_file()
     then
         declare -a OPTIONS=("1. Default = [${HOME}/.ssh/id_rsa]" '2. Custom')
         declare -a CHOICES=('1' '2')
-        
+
         RESULT=""
         custom_options_prompt "Which private key file will you choose?" \
           "Please enter your choice:" \
@@ -302,7 +297,7 @@ function aws_config_file()
             export PRIV_FILE_PATH
             ;;
         esac
-    
+
         #RESULT=""
         #validate_string_not_empty "What will the absolute path of the private key file be?" \
         #  "[${HOME}/.ssh/id_rsa]: (Enter will utilize the listed value as default)" \
@@ -311,14 +306,14 @@ function aws_config_file()
     fi
     #validate_variable "PRIV_FILE_PATH" "${CONFIG_FILE}" "${PRIV_FILE_PATH}"
     #export PRIV_FILE_PATH
-      
+
     # Prompt for Database Engine
     CHECK=$(check_variable "PG_TYPE" "${CONFIG_FILE}")
     if [[ "${CHECK}" = "not_exists" ]] || [[ "${CHECK}" = "exists_empty" ]]
     then
         declare -a OPTIONS=('1. Postgres' '2. EDB Postgres Advanced Server')
         declare -a CHOICES=('1' '2')
-        
+
         RESULT=""
         custom_options_prompt "Which Database Engine would you like to install?" \
           "Please enter your choice:" \
@@ -335,7 +330,7 @@ function aws_config_file()
         esac
     fi
     validate_variable "PG_TYPE" "${CONFIG_FILE}" "${PG_TYPE}"
-    export PG_TYPE    
+    export PG_TYPE
 
     # Prompt for Database Engine Version
     CHECK=$(check_variable "PG_VERSION" "${CONFIG_FILE}")
@@ -343,7 +338,7 @@ function aws_config_file()
     then
         declare -a OPTIONS=('1. 10' '2. 11' '3. 12')
         declare -a CHOICES=('1' '2' '3')
-        
+
         RESULT=""
         custom_options_prompt "Which Database Version do you wish to install?" \
           "Please enter your choice:" \
@@ -360,19 +355,19 @@ function aws_config_file()
             ;;
           3)
             PG_VERSION="12"
-            ;;          
+            ;;
         esac
     fi
     validate_variable "PG_VERSION" "${CONFIG_FILE}" "${PG_VERSION}"
-    export PG_VERSION    
-  
+    export PG_VERSION
+
     # Prompt for Standby Replication Type
     CHECK=$(check_variable "STANDBY_TYPE" "${CONFIG_FILE}")
     if [[ "${CHECK}" = "not_exists" ]] || [[ "${CHECK}" = "exists_empty" ]]
     then
         declare -a OPTIONS=('1. synchronous' '2. asynchronous')
         declare -a CHOICES=('1' '2')
-        
+
         RESULT=""
         custom_options_prompt "Which type of replication would you like for standby nodes?" \
           "Please enter your choice:" \
@@ -389,10 +384,10 @@ function aws_config_file()
         esac
     fi
     export STANDBY_TYPE
-    validate_variable "STANDBY_TYPE" "${CONFIG_FILE}" "${STANDBY_TYPE}"      
+    validate_variable "STANDBY_TYPE" "${CONFIG_FILE}" "${STANDBY_TYPE}"
 
     # AMI ID
-    CHECK=$(check_variable "AMI_ID" "${CONFIG_FILE}")    
+    CHECK=$(check_variable "AMI_ID" "${CONFIG_FILE}")
     if [[ "${CHECK}" = "not_exists" ]] || [[ "${CHECK}" = "exists_empty" ]]
     then
         RESULT=""
@@ -415,16 +410,21 @@ function aws_config_file()
     CHECK=$(check_variable "INSTANCE_VOLUME_TYPE" "${CONFIG_FILE}")
     if [[ "${CHECK}" = "not_exists" ]] || [[ "${CHECK}" = "exists_empty" ]]
     then
-        RESULT=""
-        custom_yesno_prompt "Do you want to configure the instances main volume?" \
-          "Enter: (Y)es/(N)o" \
-          RESULT
+
+        # Comment below for prompting details about Additional Volumes
+        RESULT="No"
+        # Un-Comment to prompt for Additional Volumes in CLI
+        # Additional Volumes
+        #RESULT=""
+        #custom_yesno_prompt "Do you want to configure the instances main volume?" \
+        #  "Enter: (Y)es/(N)o" \
+        #  RESULT
         if [[ "${RESULT}" = "Yes" ]]
         then
             # Volume Type
             declare -a OPTIONS=('1. gp2' '2. io1' '3. io2')
             declare -a CHOICES=('1' '2' '3')
-        
+
             RESULT=""
             custom_options_prompt "Which type of disk type for the instances main volume would you like?" \
                "Please enter your choice:" \
@@ -448,7 +448,7 @@ function aws_config_file()
             # Volume Size
             CHECK=$(check_variable "INSTANCE_VOLUME_SIZE" "${CONFIG_FILE}")
             if [[ "${CHECK}" = "not_exists" ]] || [[ "${CHECK}" = "exists_empty" ]]
-            then     
+            then
                 RESULT=""
                 validate_string_not_empty "Please enter the size in GB for main volume: " "" RESULT
                 VS="${RESULT}"
@@ -465,7 +465,7 @@ function aws_config_file()
                 then
                     declare -a OPTIONS=('1. 250' '2. 350' '3. 3000' '4. Custom')
                     declare -a CHOICES=('1' '2' '3' '4')
-        
+
                     RESULT=""
 
                     custom_options_prompt "Which provisioned size for iops for the instances main volume would you like?" \
@@ -507,15 +507,20 @@ function aws_config_file()
     CHECK=$(check_variable "ADDITIONAL_VOLUMES_COUNT" "${CONFIG_FILE}")
     if [[ "${CHECK}" = "not_exists" ]] || [[ "${CHECK}" = "exists_empty" ]]
     then
-        RESULT=""
-        custom_yesno_prompt "Do you want separate volume for PGDATA, PGWAL and Tablespaces?" \
-          "Enter: (Y)es/(N)o" \
-          RESULT
+
+        # Comment below for prompting details about Additional Volumes
+        RESULT="No"
+        # Un-Comment to prompt for Additional Volumes in CLI
+        # Additional Volumes
+        #RESULT=""
+        #custom_yesno_prompt "Do you want separate volume for PGDATA, PGWAL and Tablespaces?" \
+        #  "Enter: (Y)es/(N)o" \
+        #  RESULT
         if [[ "${RESULT}" = "Yes" ]]
-        then    
+        then
             declare -a OPTIONS=('1. gp2' '2. io1' '3. io2')
             declare -a CHOICES=('1' '2' '3')
-        
+
             RESULT=""
             custom_options_prompt "Which type of disk volume would you like?" \
               "Please enter your choice:" \
@@ -539,7 +544,7 @@ function aws_config_file()
             then
                 declare -a OPTIONS=('1. 250' '2. 350' '3. 3000' '4. Custom')
                 declare -a CHOICES=('1' '2' '3' '4')
-            
+
                 RESULT=""
                 custom_options_prompt "Which provisioned size for iops would you like?" \
                   "Please enter your choice:" \
@@ -565,7 +570,7 @@ function aws_config_file()
             fi
             RESULT=""
             validate_string_not_empty "Please enter the size in GB for volumes: " "" RESULT
-            AVS="${RESULT}"         
+            AVS="${RESULT}"
             RESULT=""
             custom_yesno_prompt "Do you wish to encrypt the volumes ?" \
               "Enter: (Y)es/(N)o" \
@@ -575,7 +580,7 @@ function aws_config_file()
                 AVS_ENCRYPTION="true"
             else
                 AVS_ENCRYPTION="false"
-            fi                                
+            fi
             validate_variable "ADDITIONAL_VOLUMES_COUNT" "${CONFIG_FILE}" "5"
             validate_variable "ADDITIONAL_VOLUMES_TYPE" "${CONFIG_FILE}" "${AIOPSTYPE}"
             validate_variable "ADDITIONAL_VOLUMES_SIZE" "${CONFIG_FILE}" "${AVS}"
@@ -585,7 +590,7 @@ function aws_config_file()
             export ADDITIONAL_VOLUMES_TYPE
             export ADDITIONAL_VOLUMES_SIZE
             export ADDITIONAL_VOLUMES_IOPS
-            export ADDITIONAL_VOLUMES_ENCRYPTION                
+            export ADDITIONAL_VOLUMES_ENCRYPTION
         else
             validate_variable "ADDITIONAL_VOLUMES_COUNT" "${CONFIG_FILE}" "0"
             validate_variable "ADDITIONAL_VOLUMES_TYPE" "${CONFIG_FILE}" "No"
@@ -597,11 +602,11 @@ function aws_config_file()
             export ADDITIONAL_VOLUMES_SIZE
             export ADDITIONAL_VOLUMES_IOPS
             export ADDITIONAL_VOLUMES_ENCRYPTION
-        fi    
+        fi
     fi
 
     # EDB YUM UserName
-    CHECK=$(check_variable "YUM_USERNAME" "${CONFIG_FILE}")    
+    CHECK=$(check_variable "YUM_USERNAME" "${CONFIG_FILE}")
     if [[ "${CHECK}" = "not_exists" ]] || [[ "${CHECK}" = "exists_empty" ]]
     then
         RESULT=""
@@ -610,9 +615,9 @@ function aws_config_file()
     fi
     validate_variable "YUM_USERNAME" "${CONFIG_FILE}" "${YUM_USERNAME}"
     export YUM_USERNAME
-    
+
     # EDB YUM Password
-    CHECK=$(check_variable "YUM_PASSWORD" "${CONFIG_FILE}")    
+    CHECK=$(check_variable "YUM_PASSWORD" "${CONFIG_FILE}")
     if [[ "${CHECK}" = "not_exists" ]] || [[ "${CHECK}" = "exists_empty" ]]
     then
         RESULT=""
@@ -624,7 +629,7 @@ function aws_config_file()
 
     echo " "
     set -u
-               
+
     process_log "set all parameters"
     source ${CONFIG_FILE}
 }
@@ -632,10 +637,10 @@ function aws_config_file()
 function azure_config_file()
 {
     local PROJECT_NAME="$1"
-    local CONFIG_FILE="${PROJECTS_DIRECTORY}/azure/${PROJECT_NAME}/${PROJECT_NAME}.cfg"    
+    local CONFIG_FILE="${PROJECTS_DIRECTORY}/azure/${PROJECT_NAME}/${PROJECT_NAME}.cfg"
 
     mkdir -p ${LOGDIR}
-    mkdir -p ${PROJECTS_DIRECTORY}/azure/${PROJECT_NAME}        
+    mkdir -p ${PROJECTS_DIRECTORY}/azure/${PROJECT_NAME}
 
     if [[ ! -f ${CONFIG_FILE} ]]
     then
@@ -644,8 +649,8 @@ function azure_config_file()
     else
         source ${CONFIG_FILE}
     fi
-    
-    set +u    
+
+    set +u
 
     # Prompt for Publisher
     CHECK=$(check_variable "PUBLISHER" "${CONFIG_FILE}")
@@ -653,7 +658,7 @@ function azure_config_file()
     then
         declare -a OPTIONS=('1. OpenLogic' '2. Redhat')
         declare -a CHOICES=('1' '2')
-        
+
         RESULT=""
         custom_options_prompt "Which Publisher would you like to choose?" \
           "Please enter your choice:" \
@@ -671,7 +676,7 @@ function azure_config_file()
     fi
     validate_variable "PUBLISHER" "${CONFIG_FILE}" "${PUBLISHER}"
     export PUBLISHER
-    
+
     # Prompt for Offer
     CHECK=$(check_variable "OFFER" "${CONFIG_FILE}")
     if [[ "${CHECK}" = "not_exists" ]] || [[ "${CHECK}" = "exists_empty" ]]
@@ -753,7 +758,7 @@ function azure_config_file()
     export LOCATION
     validate_variable "LOCATION" "${CONFIG_FILE}" "${LOCATION}"
 
-    CHECK=$(check_variable "INSTANCE_COUNT" "${CONFIG_FILE}")
+    CHECK=$(check_variable "PG_INSTANCE_COUNT" "${CONFIG_FILE}")
     if [[ "${CHECK}" = "not_exists" ]] || [[ "${CHECK}" = "exists_empty" ]]
     then
         declare -a OPTIONS=('1. Single Installation' '2. Multi-Node Installation')
@@ -767,12 +772,12 @@ function azure_config_file()
           RESULT
         case "${RESULT}" in
           1)
-            validate_variable "INSTANCE_COUNT" "${CONFIG_FILE}" "1"
+            validate_variable "PG_INSTANCE_COUNT" "${CONFIG_FILE}" "1"
             validate_variable "PEM_INSTANCE_COUNT" "${CONFIG_FILE}" "0"
             validate_variable "PEMSERVER" "${CONFIG_FILE}" "No"
-            export INSTANCE_COUNT
+            export PG_INSTANCE_COUNT
             export PEM_INSTANCE_COUNT
-            export PEMSERVER            
+            export PEMSERVER
             ;;
           2)
             # Ask about how many instances for multi-node cluster
@@ -781,13 +786,12 @@ function azure_config_file()
               "Please enter how many Virtual Machines you would like for the Multi-Node Cluster? " \
               "" \
               RESULT
-            RESULT=$(( RESULT + 1 ))
-            validate_variable "INSTANCE_COUNT" "${CONFIG_FILE}" "${RESULT}"
+            validate_variable "PG_INSTANCE_COUNT" "${CONFIG_FILE}" "${RESULT}"
             validate_variable "PEM_INSTANCE_COUNT" "${CONFIG_FILE}" "1"
             validate_variable "PEMSERVER" "${CONFIG_FILE}" "Yes"
-            export INSTANCE_COUNT
+            export PG_INSTANCE_COUNT
             export PEM_INSTANCE_COUNT
-            export PEMSERVER            
+            export PEMSERVER
             ;;
         esac
     fi
@@ -817,14 +821,14 @@ function azure_config_file()
     fi
     validate_variable "PRIV_FILE_PATH" "${CONFIG_FILE}" "${PRIV_FILE_PATH}"
     export PRIV_FILE_PATH
- 
+
     # Prompt for Database Engine
     CHECK=$(check_variable "PG_TYPE" "${CONFIG_FILE}")
     if [[ "${CHECK}" = "not_exists" ]] || [[ "${CHECK}" = "exists_empty" ]]
     then
         declare -a OPTIONS=('1. Postgres' '2. EDB Postgres Advanced Server')
         declare -a CHOICES=('1' '2')
-        
+
         RESULT=""
         echo "${options[@]}"
         custom_options_prompt "Which Database Engine would you like to install?" \
@@ -850,7 +854,7 @@ function azure_config_file()
     then
         declare -a OPTIONS=('1. 10' '2. 11' '3. 12')
         declare -a CHOICES=('1' '2' '3')
-        
+
         RESULT=""
         custom_options_prompt "Which Database Version do you wish to install?" \
           "Please enter your choice:" \
@@ -867,19 +871,19 @@ function azure_config_file()
             ;;
           3)
             PG_VERSION="12"
-            ;;          
+            ;;
         esac
     fi
     validate_variable "PG_VERSION" "${CONFIG_FILE}" "${PG_VERSION}"
-    export PG_VERSION    
- 
+    export PG_VERSION
+
     # Prompt for Standby Replication Type
     CHECK=$(check_variable "STANDBY_TYPE" "${CONFIG_FILE}")
     if [[ "${CHECK}" = "not_exists" ]] || [[ "${CHECK}" = "exists_empty" ]]
     then
         declare -a OPTIONS=('1. synchronous' '2. asynchronous')
         declare -a CHOICES=('1' '2')
-        
+
         RESULT=""
         custom_options_prompt "Which type of replication would you like for standby nodes?" \
           "Please enter your choice:" \
@@ -896,10 +900,62 @@ function azure_config_file()
         esac
     fi
     export STANDBY_TYPE
-    validate_variable "STANDBY_TYPE" "${CONFIG_FILE}" "${STANDBY_TYPE}"      
+    validate_variable "STANDBY_TYPE" "${CONFIG_FILE}" "${STANDBY_TYPE}"
+
+    # Additional Volumes
+    CHECK=$(check_variable "ADDITIONAL_VOLUMES_COUNT" "${CONFIG_FILE}")
+    if [[ "${CHECK}" = "not_exists" ]] || [[ "${CHECK}" = "exists_empty" ]]
+    then
+
+        # Comment below for prompting details about Additional Volumes
+        RESULT="No"
+        # Un-Comment to prompt for Additional Volumes in CLI
+        # Additional Volumes
+        #RESULT=""
+        #custom_yesno_prompt "Do you want separate volume for PGDATA, PGWAL and Tablespaces?" \
+        #  "Enter: (Y)es/(N)o" \
+        #  RESULT
+        if [[ "${RESULT}" = "Yes" ]]
+        then
+            declare -a OPTIONS=('1. Standard' '2. SSD')
+            declare -a CHOICES=('1' '2')
+
+            RESULT=""
+            custom_options_prompt "Which type of disk volume would you like?" \
+              "Please enter your choice:" \
+              OPTIONS \
+              CHOICES \
+              RESULT
+            case "${RESULT}" in
+              1)
+                ADISKTYPE="Standard_LRS"
+                ;;
+              2)
+                ADISKTYPE="StandardSSD_LRS"
+                ;;
+            esac
+
+            RESULT=""
+            validate_string_not_empty "Please enter the size in GB for volumes: " "" RESULT
+            AVS="${RESULT}"
+            validate_variable "ADDITIONAL_VOLUMES_COUNT" "${CONFIG_FILE}" "5"
+            validate_variable "ADDITIONAL_VOLUMES_DISKTYPE" "${CONFIG_FILE}" "${ADISKTYPE}"
+            validate_variable "ADDITIONAL_VOLUMES_SIZE" "${CONFIG_FILE}" "${AVS}"
+            export ADDITIONAL_VOLUMES_COUNT
+            export ADDITIONAL_VOLUMES_DISKTYPE
+            export ADDITIONAL_VOLUMES_SIZE
+        else
+            validate_variable "ADDITIONAL_VOLUMES_COUNT" "${CONFIG_FILE}" "0"
+            validate_variable "ADDITIONAL_VOLUMES_DISKTYPE" "${CONFIG_FILE}" "Standard_LRS"
+            validate_variable "ADDITIONAL_VOLUMES_SIZE" "${CONFIG_FILE}" "0"
+            export ADDITIONAL_VOLUMES_COUNT
+            export ADDITIONAL_VOLUMES_DISKTYPE
+            export ADDITIONAL_VOLUMES_SIZE
+        fi
+    fi
 
     # EDB YUM UserName
-    CHECK=$(check_variable "YUM_USERNAME" "${CONFIG_FILE}")    
+    CHECK=$(check_variable "YUM_USERNAME" "${CONFIG_FILE}")
     if [[ "${CHECK}" = "not_exists" ]] || [[ "${CHECK}" = "exists_empty" ]]
     then
         RESULT=""
@@ -910,7 +966,7 @@ function azure_config_file()
     export YUM_USERNAME
 
     # EDB YUM Password
-    CHECK=$(check_variable "YUM_PASSWORD" "${CONFIG_FILE}")    
+    CHECK=$(check_variable "YUM_PASSWORD" "${CONFIG_FILE}")
     if [[ "${CHECK}" = "not_exists" ]] || [[ "${CHECK}" = "exists_empty" ]]
     then
         RESULT=""
@@ -921,7 +977,7 @@ function azure_config_file()
     export YUM_PASSWORD
 
     set -u
-        
+
     process_log "set all parameters"
     source ${CONFIG_FILE}
 }
@@ -929,7 +985,7 @@ function azure_config_file()
 function gcloud_config_file()
 {
     local PROJECT_NAME="$1"
-    local CONFIG_FILE="${PROJECTS_DIRECTORY}/gcloud/${PROJECT_NAME}/${PROJECT_NAME}.cfg"    
+    local CONFIG_FILE="${PROJECTS_DIRECTORY}/gcloud/${PROJECT_NAME}/${PROJECT_NAME}.cfg"
     local READ_INPUT="read -r -e -p"
 
     local MESSAGE
@@ -945,7 +1001,7 @@ function gcloud_config_file()
         source ${CONFIG_FILE}
     fi
 
-    set +u    
+    set +u
 
     # Prompt for OSNAME
     CHECK=$(check_variable "OSNAME" "${CONFIG_FILE}")
@@ -953,7 +1009,7 @@ function gcloud_config_file()
     then
         declare -a OPTIONS=('1. centos-7' '2. centos-8' '3. rhel-7' '4. rhel-8')
         declare -a CHOICES=('1' '2' '3' '4')
-        
+
         RESULT=""
         custom_options_prompt "Which Operating System and Version would you like to use?" \
           "Please enter your choice:" \
@@ -973,7 +1029,7 @@ function gcloud_config_file()
           4)
             OSNAME="rhel-8"
             ;;
-        esac   
+        esac
     fi
     export OSNAME
     validate_variable "OSNAME" "${CONFIG_FILE}" "${OSNAME}"
@@ -990,7 +1046,7 @@ function gcloud_config_file()
     fi
     validate_variable "PROJECT_ID" "${CONFIG_FILE}" "${PROJECT_ID}"
     export PROJECT_ID
-        
+
     # Prompt for SUBNETWORK_REGION
     CHECK=$(check_variable "SUBNETWORK_REGION" "${CONFIG_FILE}")
     if [[ "${CHECK}" = "not_exists" ]] || [[ "${CHECK}" = "exists_empty" ]]
@@ -998,7 +1054,7 @@ function gcloud_config_file()
         declare -a OPTIONS=('1. us-central1' '2. us-east1' '3. us-east4' '4. us-west1' \
           '5. us-west2' '6. us-west3' '7. us-west4')
         declare -a CHOICES=('1' '2' '3' '4' '5' '6' '7')
-        
+
         RESULT=""
         custom_options_prompt "Which Azure Location will you deploy towards?" \
           "Please enter your choice:" \
@@ -1027,17 +1083,17 @@ function gcloud_config_file()
           7)
             SUBNETWORK_REGION="us-west4"
             ;;
-        esac   
+        esac
     fi
     export SUBNETWORK_REGION
     validate_variable "SUBNETWORK_REGION" "${CONFIG_FILE}" "${SUBNETWORK_REGION}"
-   
-    CHECK=$(check_variable "INSTANCE_COUNT" "${CONFIG_FILE}")
+
+    CHECK=$(check_variable "PG_INSTANCE_COUNT" "${CONFIG_FILE}")
     if [[ "${CHECK}" = "not_exists" ]] || [[ "${CHECK}" = "exists_empty" ]]
     then
         declare -a OPTIONS=('1. Single Installation' '2. Multi-Node Installation')
         declare -a CHOICES=('1' '2')
-        
+
         RESULT=""
         custom_options_prompt "How many Virtual Machines would you like to create?" \
           "Please enter your choice:" \
@@ -1046,12 +1102,12 @@ function gcloud_config_file()
           RESULT
         case "${RESULT}" in
           1)
-            validate_variable "INSTANCE_COUNT" "${CONFIG_FILE}" "1"
+            validate_variable "PG_INSTANCE_COUNT" "${CONFIG_FILE}" "1"
             validate_variable "PEM_INSTANCE_COUNT" "${CONFIG_FILE}" "0"
             validate_variable "PEMSERVER" "${CONFIG_FILE}" "No"
-            export INSTANCE_COUNT
+            export PG_INSTANCE_COUNT
             export PEM_INSTANCE_COUNT
-            export PEMSERVER              
+            export PEMSERVER
             ;;
           2)
             # Ask about how many instances for multi-node cluster
@@ -1060,13 +1116,12 @@ function gcloud_config_file()
               "Please enter how many Virtual Machines you would like for the Multi-Node Cluster? " \
               "" \
               RESULT
-            RESULT=$(( RESULT + 1 ))
-            validate_variable "INSTANCE_COUNT" "${CONFIG_FILE}" "${RESULT}"
+            validate_variable "PG_INSTANCE_COUNT" "${CONFIG_FILE}" "${RESULT}"
             validate_variable "PEM_INSTANCE_COUNT" "${CONFIG_FILE}" "1"
             validate_variable "PEMSERVER" "${CONFIG_FILE}" "Yes"
-            export INSTANCE_COUNT
+            export PG_INSTANCE_COUNT
             export PEM_INSTANCE_COUNT
-            export PEMSERVER              
+            export PEMSERVER
             ;;
         esac
     fi
@@ -1109,14 +1164,14 @@ function gcloud_config_file()
     fi
     validate_variable "PRIV_FILE_PATH" "${CONFIG_FILE}" "${PRIV_FILE_PATH}"
     export PRIV_FILE_PATH
- 
+
     # Prompt for Database Engine
     CHECK=$(check_variable "PG_TYPE" "${CONFIG_FILE}")
     if [[ "${CHECK}" = "not_exists" ]] || [[ "${CHECK}" = "exists_empty" ]]
     then
         declare -a OPTIONS=('1. Postgres' '2. EDB Postgres Advanced Server')
         declare -a CHOICES=('1' '2')
-        
+
         RESULT=""
         custom_options_prompt "Which Database Engine would you like to install?" \
           "Please enter your choice:" \
@@ -1141,7 +1196,7 @@ function gcloud_config_file()
     then
         declare -a OPTIONS=('1. 10' '2. 11' '3. 12')
         declare -a CHOICES=('1' '2' '3')
-        
+
         RESULT=""
         custom_options_prompt "Which Database Version do you wish to install?" \
           "Please enter your choice:" \
@@ -1158,19 +1213,19 @@ function gcloud_config_file()
             ;;
           3)
             PG_VERSION="12"
-            ;;          
+            ;;
         esac
     fi
     validate_variable "PG_VERSION" "${CONFIG_FILE}" "${PG_VERSION}"
     export PG_VERSION
- 
+
     # Prompt for Standby Replication Type
     CHECK=$(check_variable "STANDBY_TYPE" "${CONFIG_FILE}")
     if [[ "${CHECK}" = "not_exists" ]] || [[ "${CHECK}" = "exists_empty" ]]
     then
         declare -a OPTIONS=('1. synchronous' '2. asynchronous')
         declare -a CHOICES=('1' '2')
-        
+
         RESULT=""
         custom_options_prompt "Which type of replication would you like for standby nodes?" \
           "Please enter your choice:" \
@@ -1187,10 +1242,87 @@ function gcloud_config_file()
         esac
     fi
     export STANDBY_TYPE
-    validate_variable "STANDBY_TYPE" "${CONFIG_FILE}" "${STANDBY_TYPE}"      
+    validate_variable "STANDBY_TYPE" "${CONFIG_FILE}" "${STANDBY_TYPE}"
+
+    CHECK=$(check_variable "ADDITIONAL_VOLUMES_COUNT" "${CONFIG_FILE}")
+    if [[ "${CHECK}" = "not_exists" ]] || [[ "${CHECK}" = "exists_empty" ]]
+    then
+        RESULT=""
+        # Comment below for prompting details about Additional Volumes
+        RESULT="No"
+        # Un-Comment to prompt for Additional Volumes in CLI
+        # Additional Volumes
+        # custom_yesno_prompt "Do you want separate volume for PGDATA, PGWAL and Tablespaces?" \
+        #   "Enter: (Y)es/(N)o" \
+        #   RESULT
+        if [[ "${RESULT}" = "Yes" ]]
+        then
+            declare -a OPTIONS=('1. Standard' '2. Balanced' '3. SSD')
+            declare -a CHOICES=('1' '2' '3')
+
+            RESULT=""
+            custom_options_prompt "Which type of disk volume would you like?" \
+              "Please enter your choice:" \
+              OPTIONS \
+              CHOICES \
+              RESULT
+            case "${RESULT}" in
+              1)
+                ADISKTYPE="pd-standard"
+                ;;
+              2)
+                ADISKTYPE="pd-balanced"
+                ;;
+              3)
+                ADISKTYPE="pd-ssd"
+                ;;
+            esac
+
+            RESULT=""
+            validate_string_not_empty "Please enter the size in GB for volumes: " "" RESULT
+            AVS="${RESULT}"
+            validate_variable "ADDITIONAL_VOLUMES_COUNT" "${CONFIG_FILE}" "5"
+            validate_variable "ADDITIONAL_VOLUMES_DISKTYPE" "${CONFIG_FILE}" "${ADISKTYPE}"
+            validate_variable "ADDITIONAL_VOLUMES_SIZE" "${CONFIG_FILE}" "${AVS}"
+            export ADDITIONAL_VOLUMES_COUNT
+            export ADDITIONAL_VOLUMES_DISKTYPE
+            export ADDITIONAL_VOLUMES_SIZE
+        else
+            validate_variable "ADDITIONAL_VOLUMES_COUNT" "${CONFIG_FILE}" "0"
+            validate_variable "ADDITIONAL_VOLUMES_DISKTYPE" "${CONFIG_FILE}" "pd-standard"
+            validate_variable "ADDITIONAL_VOLUMES_SIZE" "${CONFIG_FILE}" "0"
+            export ADDITIONAL_VOLUMES_COUNT
+            export ADDITIONAL_VOLUMES_DISKTYPE
+            export ADDITIONAL_VOLUMES_SIZE
+        fi
+    fi
+
+    CHECK=$(check_variable "DISK_ENCRYPTION_KEY" "${CONFIG_FILE}")
+    if [[ "${CHECK}" = "not_exists" ]] || [[ "${CHECK}" = "exists_empty" ]]
+    then
+        RESULT=""
+        # Comment below for prompting details about Additional Volumes
+        RESULT="No"
+        # Un-Comment to prompt for Disk Encryption Key
+        # Additional Volumes
+        #custom_yesno_prompt "Do you want to provide an Encryption Key for the Disks?" \
+        #  "Enter: (Y)es/(N)o" \
+        #  RESULT
+        if [[ "${RESULT}" = "Yes" ]]
+        then
+            RESULT=""
+            validate_string_not_empty "Please enter the encryption key: " "" RESULT
+            EKEY="${RESULT}"
+            validate_variable "DISK_ENCRYPTION_KEY" "${CONFIG_FILE}" "${EKEY}"
+            export DISK_ENCRYPTION_KEY
+        else
+            validate_variable "DISK_ENCRYPTION_KEY" "${CONFIG_FILE}" "${EKEY}"
+            export DISK_ENCRYPTION_KEY
+        fi
+    fi
 
     # EDB YUM UserName
-    CHECK=$(check_variable "YUM_USERNAME" "${CONFIG_FILE}")    
+    CHECK=$(check_variable "YUM_USERNAME" "${CONFIG_FILE}")
     if [[ "${CHECK}" = "not_exists" ]] || [[ "${CHECK}" = "exists_empty" ]]
     then
         RESULT=""
@@ -1201,7 +1333,7 @@ function gcloud_config_file()
     export YUM_USERNAME
 
     # EDB YUM Password
-    CHECK=$(check_variable "YUM_PASSWORD" "${CONFIG_FILE}")    
+    CHECK=$(check_variable "YUM_PASSWORD" "${CONFIG_FILE}")
     if [[ "${CHECK}" = "not_exists" ]] || [[ "${CHECK}" = "exists_empty" ]]
     then
         RESULT=""
@@ -1212,7 +1344,7 @@ function gcloud_config_file()
     export YUM_PASSWORD
 
     set -u
-    
+
     process_log "set all parameters"
     source ${CONFIG_FILE}
 }
@@ -1222,7 +1354,7 @@ function aws_show_config_file()
     local PROJECT_NAME="$1"
     local CONFIG_FILE="${PROJECTS_DIRECTORY}/aws/${PROJECT_NAME}/${PROJECT_NAME}.cfg"
 
-    SHOW="$(echo cat ${CONFIG_FILE})"    
+    SHOW="$(echo cat ${CONFIG_FILE})"
     eval "$SHOW"
 
     process_log "showed aws project config details"
@@ -1233,7 +1365,7 @@ function azure_show_config_file()
     local PROJECT_NAME="$1"
     local CONFIG_FILE="${PROJECTS_DIRECTORY}/azure/${PROJECT_NAME}/${PROJECT_NAME}.cfg"
 
-    SHOW="$(echo cat ${CONFIG_FILE})"    
+    SHOW="$(echo cat ${CONFIG_FILE})"
     eval "$SHOW"
 
     process_log "showed azure project config details"
@@ -1244,7 +1376,7 @@ function gcloud_show_config_file()
     local PROJECT_NAME="$1"
     local CONFIG_FILE="${PROJECTS_DIRECTORY}/gcloud/${PROJECT_NAME}/${PROJECT_NAME}.cfg"
 
-    SHOW="$(echo cat ${CONFIG_FILE})"    
+    SHOW="$(echo cat ${CONFIG_FILE})"
     eval "$SHOW"
 
     process_log "showed gcloud project config details"
@@ -1255,7 +1387,7 @@ function aws_update_config_file()
     local PROJECT_NAME="$1"
     local CONFIG_FILE="${PROJECTS_DIRECTORY}/aws/${PROJECT_NAME}/${PROJECT_NAME}.cfg"
 
-    EDIT="$(echo vi ${CONFIG_FILE})"    
+    EDIT="$(echo vi ${CONFIG_FILE})"
     eval "$EDIT"
 
     process_log "edited aws project config details"
@@ -1266,7 +1398,7 @@ function azure_update_config_file()
     local PROJECT_NAME="$1"
     local CONFIG_FILE="${PROJECTS_DIRECTORY}/azure/${PROJECT_NAME}/${PROJECT_NAME}.cfg"
 
-    EDIT="$(echo vi ${CONFIG_FILE})"    
+    EDIT="$(echo vi ${CONFIG_FILE})"
     eval "$EDIT"
 
     process_log "edited azure project config details"
@@ -1277,7 +1409,7 @@ function gcloud_update_config_file()
     local PROJECT_NAME="$1"
     local CONFIG_FILE="${PROJECTS_DIRECTORY}/gcloud/${PROJECT_NAME}/${PROJECT_NAME}.cfg"
 
-    EDIT="$(echo vi ${CONFIG_FILE})"    
+    EDIT="$(echo vi ${CONFIG_FILE})"
     eval "$EDIT"
 
     process_log "edited gcloud project config details"
diff --git a/lib/gcp-sdk.sh b/lib/gcp-sdk.sh
index 9bd57eb3..8f989080 100755
--- a/lib/gcp-sdk.sh
+++ b/lib/gcp-sdk.sh
@@ -11,7 +11,7 @@ case $OS in
     curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -
 
     # Update the package list and install the Cloud SDK
-    sudo apt-get -y update 
+    sudo apt-get -y update
     sudo apt-get install -y --force-yes google-cloud-sdk
     ;;
   *"Ubuntu"*)
@@ -22,9 +22,9 @@ case $OS in
     curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -
 
     # Update the package list and install the Cloud SDK
-    sudo apt-get -y update 
+    sudo apt-get -y update
     sudo apt-get install -y --force-yes google-cloud-sdk
-    ;; 
+    ;;
   *"CentOS"*)
     sudo rm -r ~/google-cloud-sdk
     sudo curl https://sdk.cloud.google.com/ > install.sh
diff --git a/lib/pg_install_funcs.sh b/lib/pg_install_funcs.sh
index 94adb2de..cdc85598 100644
--- a/lib/pg_install_funcs.sh
+++ b/lib/pg_install_funcs.sh
@@ -48,7 +48,7 @@ function aws_ansible_pg_install()
     ANSIBLE_EXTRA_VARS="${ANSIBLE_EXTRA_VARS} yum_username=${EDB_YUM_USERNAME}"
     ANSIBLE_EXTRA_VARS="${ANSIBLE_EXTRA_VARS} yum_password=${EDB_YUM_PASSWORD}"
     ANSIBLE_EXTRA_VARS="${ANSIBLE_EXTRA_VARS} pass_dir=${PROJECTS_DIRECTORY}/aws/${PROJECT_NAME}/.edbpass"
-    
+
     local LOG_FILE="${PROJECTS_DIRECTORY}/aws/${PROJECT_NAME}/projectdetails.txt"
 
     if [[ "${OSNAME}" =~ "CentOS" ]]
@@ -60,10 +60,10 @@ function aws_ansible_pg_install()
     else
         exit_on_error "Unknown Operating system"
     fi
-    
+
     ansible-galaxy collection install edb_devops.edb_postgres \
                 --force >> ${PG_INSTALL_LOG} 2>&1
-                
+
     cd ${PROJECTS_DIRECTORY}/aws/${PROJECT_NAME} || exit 1
 
     F_PUB_KEYNAMEANDEXTENSION=$(get_string_after_lastslash "${F_PUB_FILE_KEYPATH}")
@@ -79,27 +79,29 @@ function aws_ansible_pg_install()
                      --user="${ANSIBLE_USER}" \
                      --extra-vars="${ANSIBLE_EXTRA_VARS}" \
                      --private-key="./${F_NEW_PRIV_KEYNAME}" \
+                     -i inventory.yml \
                     playbook.yml
     else
        ansible-playbook --ssh-common-args='-o StrictHostKeyChecking=no' \
                      --user="${ANSIBLE_USER}" \
                      --extra-vars="${ANSIBLE_EXTRA_VARS}" \
                      --private-key="./${F_NEW_PRIV_KEYNAME}" \
-                    playbook-single-instance.yml   
+                     -i inventory.yml \
+                    playbook-single-instance.yml
     fi
 
-    PEM_EXISTS=$(parse_yaml hosts.yml|grep pemserver|wc -l)
-    PRIMARY_EXISTS=$(parse_yaml hosts.yml|grep primary|wc -l)
-    STANDBY_EXISTS=$(parse_yaml hosts.yml|grep standby|wc -l)
+    PEM_EXISTS=$(parse_yaml inventory.yml|grep "all_children_pemserver"|wc -l)
+    PRIMARY_EXISTS=$(parse_yaml inventory.yml|grep "all_children_primary"|wc -l)
+    STANDBY_EXISTS=$(parse_yaml inventory.yml|grep "all_children_standby"|wc -l)
 
     exec 3>&1 1>>"${LOG_FILE}" 2>&1
-    
-    if [[ ${PEM_INSTANCE_COUNT} -gt 0 ]]    
+
+    if [[ ${PEM_INSTANCE_COUNT} -gt 0 ]]
     then
         echo -e "PEM SERVER:" | tee /dev/fd/3
         echo -e "-----------" | tee /dev/fd/3
-        for pemsvr in $(parse_yaml hosts.yml|grep pemserver \
-                            |grep public_ip|cut -d"=" -f2|xargs echo)
+        for pemsvr in $(parse_yaml inventory.yml|grep "all_children_pemserver" \
+                            |grep "ansible_host"|cut -d"=" -f2|xargs echo)
         do
            echo -e "  PEM URL:\thttps://${pemsvr}:8443/pem" | tee /dev/fd/3
            if [[ "${PG_TYPE}" = "PG" ]]
@@ -114,18 +116,18 @@ function aws_ansible_pg_install()
            fi
         done
     fi
-   
-    if [[ ${PRIMARY_EXISTS} -gt 0 ]] || [[ ${INSTANCE_COUNT} -lt 2 ]]    
+
+    if [[ ${PRIMARY_EXISTS} -gt 0 ]] || [[ ${PG_INSTANCE_COUNT} -lt 2 ]]
     then
-        if [[ ${INSTANCE_COUNT} -lt 2 ]]    
+        if [[ ${PG_INSTANCE_COUNT} -lt 2 ]]
         then
            echo -e "SERVER" | tee /dev/fd/3
         else
            echo -e "PRIMARY SERVER" | tee /dev/fd/3
         fi
         echo -e "--------------" | tee /dev/fd/3
-        for srv  in $(parse_yaml hosts.yml|grep primary \
-                         |grep public_ip|cut -d"=" -f2|xargs echo)
+        for srv  in $(parse_yaml inventory.yml|grep "all_children_primary" \
+                         |grep "ansible_host"|cut -d"=" -f2|xargs echo)
         do
             echo -e "  Username:\t${ANSIBLE_USER}" | tee /dev/fd/3
             echo -e "  Public Ip:\t${srv}" | tee /dev/fd/3
@@ -136,8 +138,8 @@ function aws_ansible_pg_install()
     then
         echo -e "STANDBY SERVERS" | tee /dev/fd/3
         echo -e "--------------" | tee /dev/fd/3
-        for srv  in $(parse_yaml hosts.yml|grep standby \
-                         |grep public_ip|cut -d"=" -f2|xargs echo)
+        for srv  in $(parse_yaml inventory.yml|grep "all_children_standby" \
+                         |grep "ansible_host"|cut -d"=" -f2|xargs echo)
         do
             echo -e "  Username:\t${ANSIBLE_USER}" | tee /dev/fd/3
             echo -e "  Public Ip:\t${srv}" | tee /dev/fd/3
@@ -160,7 +162,7 @@ function azure_ansible_pg_install()
     local EDB_YUM_PASSWORD="$4"
     local SSH_KEY="$5"
     local F_PRIV_FILE_KEYPATH="$6"
-    local F_PROJECTNAME="$7"    
+    local F_PROJECTNAME="$7"
     local PEM_INSTANCE_COUNT="$8"
     local PEM_EXISTS=0
     local PRIMARY_EXISTS=0
@@ -168,8 +170,8 @@ function azure_ansible_pg_install()
 
     local ANSIBLE_EXTRA_VARS
 
-    cd ${PROJECTS_DIRECTORY}/azure/${PROJECT_NAME} || exit 1    
-    
+    cd ${PROJECTS_DIRECTORY}/azure/${PROJECT_NAME} || exit 1
+
     while IFS=, read -r os_name_and_version
     do
       [[ "$os_name_and_version" != "os_name_and_version" ]] && OS_NAME_AND_VERSION=$os_name_and_version
@@ -177,32 +179,32 @@ function azure_ansible_pg_install()
 
     OS="$(echo -e "$OS_NAME_AND_VERSION" | tr -d '[:space:]')"
 
-    if [[ "${OS}" =~ "Centos" ]]        
+    if [[ "${OS}" =~ "Centos" ]]
     then
         ANSIBLE_USER="centos"
-        OSNAME="CentOS8"        
+        OSNAME="CentOS8"
     elif [[ "${OS}" =~ "RHEL" ]]
     then
         ANSIBLE_USER="ec2-user"
-        OSNAME="RHEL8"        
+        OSNAME="RHEL8"
     else
         exit_on_error "Unknown Operating system"
     fi
 
     cd ${DIRECTORY} || exit 1
-        
+
     ANSIBLE_EXTRA_VARS="os=${OSNAME} pg_type=${PG_TYPE}"
     ANSIBLE_EXTRA_VARS="${ANSIBLE_EXTRA_VARS} pg_version=${PG_VERSION}"
     ANSIBLE_EXTRA_VARS="${ANSIBLE_EXTRA_VARS} yum_username=${EDB_YUM_USERNAME}"
     ANSIBLE_EXTRA_VARS="${ANSIBLE_EXTRA_VARS} yum_password=${EDB_YUM_PASSWORD}"
-    ANSIBLE_EXTRA_VARS="${ANSIBLE_EXTRA_VARS} pass_dir=${PROJECTS_DIRECTORY}/azure/${PROJECT_NAME}/.edbpass"    
+    ANSIBLE_EXTRA_VARS="${ANSIBLE_EXTRA_VARS} pass_dir=${PROJECTS_DIRECTORY}/azure/${PROJECT_NAME}/.edbpass"
 
     local LOG_FILE="${PROJECTS_DIRECTORY}/azure/${PROJECT_NAME}/projectdetails.txt"
-    
+
     ansible-galaxy collection install edb_devops.edb_postgres \
                 --force >> ${PG_INSTALL_LOG} 2>&1
-                
-    cd ${PROJECTS_DIRECTORY}/azure/${PROJECT_NAME} || exit 1    
+
+    cd ${PROJECTS_DIRECTORY}/azure/${PROJECT_NAME} || exit 1
 
     F_PUB_KEYNAMEANDEXTENSION=$(get_string_after_lastslash "${SSH_KEY}")
     F_PRIV_KEYNAMEANDEXTENSION=$(get_string_after_lastslash "${F_PRIV_FILE_KEYPATH}")
@@ -217,27 +219,29 @@ function azure_ansible_pg_install()
                      --user="${ANSIBLE_USER}" \
                      --extra-vars="${ANSIBLE_EXTRA_VARS}" \
                      --private-key="./${F_NEW_PRIV_KEYNAME}" \
+                     -i inventory.yml \
                     playbook.yml
     else
        ansible-playbook --ssh-common-args='-o StrictHostKeyChecking=no' \
                      --user="${ANSIBLE_USER}" \
                      --extra-vars="${ANSIBLE_EXTRA_VARS}" \
                      --private-key="./${F_NEW_PRIV_KEYNAME}" \
-                    playbook-single-instance.yml   
+                     -i inventory.yml \
+                    playbook-single-instance.yml
     fi
-                    
-    PEM_EXISTS=$(parse_yaml hosts.yml|grep pemserver|wc -l)
-    PRIMARY_EXISTS=$(parse_yaml hosts.yml|grep primary|wc -l)
-    STANDBY_EXISTS=$(parse_yaml hosts.yml|grep standby|wc -l)
+
+    PEM_EXISTS=$(parse_yaml inventory.yml|grep "all_children_pemserver"|wc -l)
+    PRIMARY_EXISTS=$(parse_yaml inventory.yml|grep "all_children_primary"|wc -l)
+    STANDBY_EXISTS=$(parse_yaml inventory.yml|grep "all_children_standby"|wc -l)
 
     exec 3>&1 1>>"${LOG_FILE}" 2>&1
-        
-    if [[ ${PEM_INSTANCE_COUNT} -gt 0 ]]    
+
+    if [[ ${PEM_INSTANCE_COUNT} -gt 0 ]]
     then
         echo -e "PEM SERVER:" | tee /dev/fd/3
         echo -e "-----------" | tee /dev/fd/3
-        for pemsvr in $(parse_yaml hosts.yml|grep pemserver \
-                            |grep public_ip|cut -d"=" -f2|xargs echo)
+        for pemsvr in $(parse_yaml inventory.yml|grep "all_children_pemserver" \
+                            |grep "ansible_host"|cut -d"=" -f2|xargs echo)
         do
            echo -e "  PEM URL:\thttps://${pemsvr}:8443/pem" | tee /dev/fd/3
            if [[ "${PG_TYPE}" = "PG" ]]
@@ -252,18 +256,18 @@ function azure_ansible_pg_install()
            fi
         done
     fi
-   
-    if [[ ${PRIMARY_EXISTS} -gt 0 ]] || [[ ${INSTANCE_COUNT} -lt 2 ]]    
+
+    if [[ ${PRIMARY_EXISTS} -gt 0 ]] || [[ ${PG_INSTANCE_COUNT} -lt 2 ]]
     then
-        if [[ ${INSTANCE_COUNT} -lt 2 ]]    
+        if [[ ${PG_INSTANCE_COUNT} -lt 2 ]]
         then
            echo -e "SERVER" | tee /dev/fd/3
         else
            echo -e "PRIMARY SERVER" | tee /dev/fd/3
         fi
         echo -e "--------------" | tee /dev/fd/3
-        for srv  in $(parse_yaml hosts.yml|grep primary \
-                         |grep public_ip|cut -d"=" -f2|xargs echo)
+        for srv  in $(parse_yaml inventory.yml|grep "all_children_primary" \
+                         |grep "ansible_host"|cut -d"=" -f2|xargs echo)
         do
             echo -e "  Username:\t${ANSIBLE_USER}" | tee /dev/fd/3
             echo -e "  Public Ip:\t${srv}" | tee /dev/fd/3
@@ -274,15 +278,15 @@ function azure_ansible_pg_install()
     then
         echo -e "STANDBY SERVERS" | tee /dev/fd/3
         echo -e "--------------" | tee /dev/fd/3
-        for srv  in $(parse_yaml hosts.yml|grep standby \
-                         |grep public_ip|cut -d"=" -f2|xargs echo)
+        for srv  in $(parse_yaml inventory.yml|grep "all_children_standby" \
+                         |grep "ansible_host"|cut -d"=" -f2|xargs echo)
         do
             echo -e "  Username:\t${ANSIBLE_USER}" | tee /dev/fd/3
             echo -e "  Public Ip:\t${srv}" | tee /dev/fd/3
             echo "" | tee /dev/fd/3
         done
     fi
-    
+
     exec > /dev/tty 2>&1
 }
 
@@ -296,9 +300,9 @@ function gcloud_ansible_pg_install()
     local PG_VERSION="$2"
     local EDB_YUM_USERNAME="$3"
     local EDB_YUM_PASSWORD="$4"
-    local SSH_KEY="$5"    
+    local SSH_KEY="$5"
     local F_PRIV_FILE_KEYPATH="$6"
-    local F_PROJECTNAME="$7"    
+    local F_PROJECTNAME="$7"
     local PEM_INSTANCE_COUNT="$8"
     local PEM_EXISTS=0
     local PRIMARY_EXISTS=0
@@ -307,7 +311,7 @@ function gcloud_ansible_pg_install()
     local ANSIBLE_EXTRA_VARS
 
     cd ${PROJECTS_DIRECTORY}/gcloud/${PROJECT_NAME} || exit 1
-    
+
     while IFS=, read -r os_name_and_version
     do
       [[ "$os_name_and_version" != "os_name_and_version" ]] && OS_NAME_AND_VERSION=$os_name_and_version
@@ -318,82 +322,84 @@ function gcloud_ansible_pg_install()
 
     case $FORMATTED_OS in
         "centos-7")
-            shift; 
+            shift;
             ANSIBLE_USER="centos"
             OSNAME="CentOS7"
             export ANSIBLE_USER
             export OSNAME
             ;;
         "centos-8")
-            shift; 
+            shift;
             ANSIBLE_USER="centos"
             OSNAME="CentOS8"
             export ANSIBLE_USER
             export OSNAME
             ;;
         "rhel-7")
-            shift; 
+            shift;
             ANSIBLE_USER="ec2-user"
             OSNAME="RHEL7"
             export ANSIBLE_USER
             export OSNAME
-            ;;            
+            ;;
         "rhel-8")
-            shift; 
+            shift;
             ANSIBLE_USER="ec2-user"
             OSNAME="RHEL8"
             export ANSIBLE_USER
             export OSNAME
-            ;;                       
-    esac 
-    
+            ;;
+    esac
+
     cd ${DIRECTORY} || exit 1
-        
+
     ANSIBLE_EXTRA_VARS="os=${OSNAME} pg_type=${PG_TYPE}"
     ANSIBLE_EXTRA_VARS="${ANSIBLE_EXTRA_VARS} pg_version=${PG_VERSION}"
     ANSIBLE_EXTRA_VARS="${ANSIBLE_EXTRA_VARS} yum_username=${EDB_YUM_USERNAME}"
     ANSIBLE_EXTRA_VARS="${ANSIBLE_EXTRA_VARS} yum_password=${EDB_YUM_PASSWORD}"
-    ANSIBLE_EXTRA_VARS="${ANSIBLE_EXTRA_VARS} pass_dir=${PROJECTS_DIRECTORY}/gcloud/${PROJECT_NAME}/.edbpass"    
+    ANSIBLE_EXTRA_VARS="${ANSIBLE_EXTRA_VARS} pass_dir=${PROJECTS_DIRECTORY}/gcloud/${PROJECT_NAME}/.edbpass"
 
     local LOG_FILE="${PROJECTS_DIRECTORY}/gcloud/${PROJECT_NAME}/projectdetails.txt"
 
     ansible-galaxy collection install edb_devops.edb_postgres \
                 --force >> ${PG_INSTALL_LOG} 2>&1
-                
-    cd ${PROJECTS_DIRECTORY}/gcloud/${PROJECT_NAME} || exit 1    
+
+    cd ${PROJECTS_DIRECTORY}/gcloud/${PROJECT_NAME} || exit 1
 
     F_PUB_KEYNAMEANDEXTENSION=$(get_string_after_lastslash "${SSH_KEY}")
     F_PRIV_KEYNAMEANDEXTENSION=$(get_string_after_lastslash "${F_PRIV_FILE_KEYPATH}")
     F_NEW_PUB_KEYNAME=$(join_strings_with_underscore "${F_PROJECTNAME}" "${F_PUB_KEYNAMEANDEXTENSION}")
     F_NEW_PRIV_KEYNAME=$(join_strings_with_underscore "${F_PROJECTNAME}" "${F_PRIV_KEYNAMEANDEXTENSION}")
-        
+
     if [[ ${PEM_INSTANCE_COUNT} -gt 0 ]]
     then
        ansible-playbook --ssh-common-args='-o StrictHostKeyChecking=no' \
                      --user="${ANSIBLE_USER}" \
                      --extra-vars="${ANSIBLE_EXTRA_VARS}" \
                      --private-key="./${F_NEW_PRIV_KEYNAME}" \
+                     -i inventory.yml \
                     playbook.yml
     else
        ansible-playbook --ssh-common-args='-o StrictHostKeyChecking=no' \
                      --user="${ANSIBLE_USER}" \
                      --extra-vars="${ANSIBLE_EXTRA_VARS}" \
                      --private-key="./${F_NEW_PRIV_KEYNAME}" \
-                    playbook-single-instance.yml   
+                     -i inventory.yml \
+                    playbook-single-instance.yml
     fi
-                    
-    PEM_EXISTS=$(parse_yaml hosts.yml|grep pemserver|wc -l)
-    PRIMARY_EXISTS=$(parse_yaml hosts.yml|grep primary|wc -l)
-    STANDBY_EXISTS=$(parse_yaml hosts.yml|grep standby|wc -l)
+
+    PEM_EXISTS=$(parse_yaml inventory.yml|grep "all_children_pemserver"|wc -l)
+    PRIMARY_EXISTS=$(parse_yaml inventory.yml|grep "all_children_primary"|wc -l)
+    STANDBY_EXISTS=$(parse_yaml inventory.yml|grep "all_children_standby"|wc -l)
 
     exec 3>&1 1>>"${LOG_FILE}" 2>&1
-        
-    if [[ ${PEM_INSTANCE_COUNT} -gt 0 ]]    
+
+    if [[ ${PEM_INSTANCE_COUNT} -gt 0 ]]
     then
         echo -e "PEM SERVER:" | tee /dev/fd/3
         echo -e "-----------" | tee /dev/fd/3
-        for pemsvr in $(parse_yaml hosts.yml|grep pemserver \
-                            |grep public_ip|cut -d"=" -f2|xargs echo)
+        for pemsvr in $(parse_yaml inventory.yml|grep "all_children_pemserver" \
+                            |grep "ansible_host"|cut -d"=" -f2|xargs echo)
         do
            echo -e "  PEM URL:\thttps://${pemsvr}:8443/pem" | tee /dev/fd/3
            if [[ "${PG_TYPE}" = "PG" ]]
@@ -411,15 +417,15 @@ function gcloud_ansible_pg_install()
 
     if [[ ${PRIMARY_EXISTS} -gt 0 ]] || [[ ${INSTANCE_COUNT} -lt 2 ]]
     then
-        if [[ ${INSTANCE_COUNT} -lt 2 ]]    
+        if [[ ${INSTANCE_COUNT} -lt 2 ]]
         then
            echo -e "SERVER" | tee /dev/fd/3
         else
            echo -e "PRIMARY SERVER" | tee /dev/fd/3
         fi
         echo -e "--------------" | tee /dev/fd/3
-        for srv  in $(parse_yaml hosts.yml|grep primary \
-                         |grep public_ip|cut -d"=" -f2|xargs echo)
+        for srv  in $(parse_yaml inventory.yml|grep "all_children_primary" \
+                         |grep "ansible_host"|cut -d"=" -f2|xargs echo)
         do
             echo -e "  Username:\t${ANSIBLE_USER}" | tee /dev/fd/3
             echo -e "  Public Ip:\t${srv}" | tee /dev/fd/3
@@ -430,8 +436,8 @@ function gcloud_ansible_pg_install()
     then
         echo -e "STANDBY SERVERS" | tee /dev/fd/3
         echo -e "--------------" | tee /dev/fd/3
-        for srv  in $(parse_yaml hosts.yml|grep standby \
-                         |grep public_ip|cut -d"=" -f2|xargs echo)
+        for srv  in $(parse_yaml inventory.yml|grep "all_children_standby" \
+                         |grep "ansible_host"|cut -d"=" -f2|xargs echo)
         do
             echo -e "  Username:\t${ANSIBLE_USER}" | tee /dev/fd/3
             echo -e "  Public Ip:\t${srv}" | tee /dev/fd/3
diff --git a/lib/pre_reqs_funcs.sh b/lib/pre_reqs_funcs.sh
index c60d9230..f70d54f1 100644
--- a/lib/pre_reqs_funcs.sh
+++ b/lib/pre_reqs_funcs.sh
@@ -27,7 +27,7 @@ function package_command()
 {
    local F_OSINFO=$(cat /etc/*release | grep ^NAME)
    local F_OSTYPE
- 
+
    if [[ "${F_OSINFO}" =~ "Red" ]] || [[ "${F_OSINFO}" =~ "CentOS" ]]
    then
        echo "sudo yum -y install"
@@ -52,21 +52,21 @@ function install_wget_curl()
     F_INSTALL_CMD=$(package_command)
     F_WGET_EXISTS=$(which wget >/dev/null 2>&1 && echo $? || echo $?)
     F_CURL_EXISTS=$(which curl >/dev/null 2>&1 && echo $? || echo $?)
-    
+
     if [[ ${F_WGET_EXISTS} -ne 0 ]]
     then
         #process_log "Installing wget package"
-        #${F_INSTALL_CMD} wget >>${INSTALL_LOG} 2>&1 
+        #${F_INSTALL_CMD} wget >>${INSTALL_LOG} 2>&1
         process_log "wget is not installed"
         exit_on_error "wget is not installed"
     fi
-    
+
     if [[ ${F_CURL_EXISTS} -ne 0 ]]
     then
         #process_log "installing curl"
         #${F_INSTALL_CMD} curl >>${INSTALL_LOG} 2>&1
         process_log "curl is not installed"
-        exit_on_error "curl is not installed"       
+        exit_on_error "curl is not installed"
     fi
 }
 
@@ -81,7 +81,7 @@ function install_gawk()
 
     F_INSTALL_CMD=$(package_command)
     F_GAWK_EXISTS=$(which gawk >/dev/null 2>&1 && echo $? || echo $?)
-    
+
     if [[ ${F_GAWK_EXISTS} -ne 0 ]]
     then
         #process_log "Installing gawk package"
@@ -144,7 +144,7 @@ function install_ansible()
     IS_YUM=$(echo ${INSTALL_CMD}|grep -q yum)
     set -e
     DEBIAN_URL="http://ppa.launchpad.net/ansible/ansible/ubuntu bionic main"
-    
+
     if [[ ${ANSIBLE_EXISTS} -ne 0 ]] && [[ ${IS_APT} -eq 0 ]]
     then
         set +e
@@ -156,7 +156,7 @@ function install_ansible()
         #apt update >>${INSTALL_LOG} 2>&1
         #${INSTALL_CMD} ansible >>${INSTALL_LOG} 2>&1
         process_log "Ansible is not installed"
-        exit_on_error "Ansible is not installed"        
+        exit_on_error "Ansible is not installed"
         set -e
     fi
 
@@ -169,7 +169,7 @@ function install_ansible()
         #    >>${INSTALL_LOG} 2>&1
         #${INSTALL_CMD} ansible >>${INSTALL_LOG} 2>&1
         process_log "Ansible is not installed"
-        exit_on_error "Ansible is not installed"        
+        exit_on_error "Ansible is not installed"
         set -e
     fi
     #ansible --version >>${INSTALL_LOG} 2>&1
@@ -185,14 +185,14 @@ function verify_aws()
     local AWS_EXISTS
 
     AWS_EXISTS=$(which aws >/dev/null 2>&1 && echo $? || echo $?)
-    
+
     #if [[ ${AWS_EXISTS} -ne 0 ]]
     #then
     #    wget ${AWS_URL} >>${INSTALL_LOG} 2>&1
     #    unzip ${AWS_ZIP} >>${INSTALL_LOG} 2>&1
     #    sudo ./aws/install --update >>${INSTALL_LOG} 2>&1
     #fi
-    
+
     # check if we have credential files
     if [[ ! -f ~/.aws/credentials ]]
     then
@@ -220,7 +220,7 @@ function verify_azure()
     IS_APT=$(echo ${INSTALL_CMD}|grep -q apt)
     IS_YUM=$(echo ${INSTALL_CMD}|grep -q yum)
     set -e
-  
+
     #if [[ ${AZURE_EXISTS} -ne 0 ]] && [[ ${IS_APT} -eq 0 ]]
     #then
     #    set +e
@@ -234,7 +234,7 @@ function verify_azure()
     #    AZURE_CLI_REPO="$(echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $AZ_REPO main" | sudo tee /etc/apt/sources.list.d/azure-cli.list)"
     #    apt update >>${INSTALL_LOG} 2>&1
     #    ${INSTALL_CMD} azure-cli >>${INSTALL_LOG} 2>&1
-    #    set -e    
+    #    set -e
     #fi
 
     #if [[ ${AZURE_EXISTS} -ne 0 ]] && [[ ${IS_YUM} -eq 0 ]]
@@ -253,9 +253,9 @@ function verify_azure()
 #gpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/azure-cli.repo)"
     #    apt update >>${INSTALL_LOG} 2>&1
     #    ${INSTALL_CMD} azure-cli >>${INSTALL_LOG} 2>&1
-    #    set -e    
+    #    set -e
     #fi
-     
+
     # check if we have credential files
     if [[ ! -f ~/.azure/accessTokens.json ]]
     then
@@ -278,14 +278,14 @@ function verify_gcloud()
     local GCLOUD_EXISTS
 
     GCLOUD_EXISTS=$(which gcloud >/dev/null 2>&1 && echo $? || echo $?)
-    
+
     #if [[ ${GCLOUD_EXISTS} -ne 0 ]]
     #then
     #    wget ${GCLOUD_URL} >>${INSTALL_LOG} 2>&1
     #    unzip ${GCLOUD_ZIP} >>${INSTALL_LOG} 2>&1
     #    sudo ./google-cloud-sdk/install.sh >>${INSTALL_LOG} 2>&1
     #fi
-    
+
     # check if we have default credential file
     if [[ ! -f ~/.config/gcloud/configurations/config_default ]]
     then
@@ -298,5 +298,5 @@ function verify_gcloud()
     then
         process_log "Google Cloud proper configuration not found"
         gcloud auth application-default login
-    fi    
+    fi
 }
diff --git a/lib/prereqs.sh b/lib/prereqs.sh
index 4a0a329f..3393605f 100644
--- a/lib/prereqs.sh
+++ b/lib/prereqs.sh
@@ -9,19 +9,19 @@ fi
 if cat /etc/*release | grep ^NAME | grep Debian; then
   sudo apt -y install curl
   sudo apt -y install wget
-  sudo apt -y install gawk  
-fi 
+  sudo apt -y install gawk
+fi
 
 if cat /etc/*release | grep ^NAME | grep CentOS; then
-  sudo yum -y install curl 
+  sudo yum -y install curl
   sudo yum -y install wget
-  sudo yum -y install gawk  
+  sudo yum -y install gawk
 fi
 
 if cat /etc/*release | grep ^NAME | grep Red; then
-  sudo yum -y install curl 
+  sudo yum -y install curl
   sudo yum -y install wget
-  sudo yum -y install gawk  
+  sudo yum -y install gawk
 fi
 
 # Terraform
diff --git a/lib/usage_funcs.sh b/lib/usage_funcs.sh
index c0e4df71..597f8dff 100644
--- a/lib/usage_funcs.sh
+++ b/lib/usage_funcs.sh
@@ -43,7 +43,7 @@ function usage()
   echo "    azure-config    [show|update]     PROJECT_NAME"
   echo "    gcloud-config   [show|update]     PROJECT_NAME"
   echo "    aws-project     [list]"
-  echo "    aws-project     [switch]          PROJECT_NAME"  
+  echo "    aws-project     [switch]          PROJECT_NAME"
   echo "    azure-project   [list]"
   echo "    azure-project   [switch]          PROJECT_NAME"
   echo "    gcloud-project  [list]"
@@ -188,7 +188,7 @@ function verify_arguments()
                 else
                     if [[ "${AWS_PROJECT}" = "list" ]]
                     then
-                        shift; PROJECT_NAME=" "                    
+                        shift; PROJECT_NAME=" "
                     else
                         shift; PROJECT_NAME="${1}"
                     fi
@@ -205,7 +205,7 @@ function verify_arguments()
                 else
                     if [[ "${AZURE_PROJECT}" = "list" ]]
                     then
-                        shift; PROJECT_NAME=" "                    
+                        shift; PROJECT_NAME=" "
                     else
                         shift; PROJECT_NAME="${1}"
                     fi
@@ -222,7 +222,7 @@ function verify_arguments()
                 else
                     if [[ "${GCLOUD_PROJECT}" = "list" ]]
                     then
-                        shift; PROJECT_NAME=" "                    
+                        shift; PROJECT_NAME=" "
                     else
                         shift; PROJECT_NAME="${1}"
                     fi
diff --git a/log/.log b/log/.log
deleted file mode 100644
index d40b26dd..00000000
--- a/log/.log
+++ /dev/null
@@ -1,1 +0,0 @@
-log file
diff --git a/playbook/playbook-single-instance.yml b/playbook/playbook-single-instance.yml
index 81fd1b22..576d5942 100644
--- a/playbook/playbook-single-instance.yml
+++ b/playbook/playbook-single-instance.yml
@@ -1,27 +1,26 @@
 ---
-- hosts: localhost
+- hosts: all
   name: Configure Postgres or EPAS on Instances
-  become: true
-  gather_facts: no
+  become: yes
+  gather_facts: yes
 
-  # When using collections
   collections:
-      - edb_devops.edb_postgres
-
-  vars_files:
-    - hosts.yml
+    - edb_devops.edb_postgres
 
   pre_tasks:
-      - name: Initialize the user defined variables
-        set_fact:
-            os: "CentOS8"
-            pg_version: 12
-            pg_type: "PG"
-            yum_username: ""
-            yum_password: ""
+    - name: Initialize the user defined variables
+      set_fact:
+        pg_version: 12
+        pg_type: "PG"
+        yum_username: ""
+        yum_password: ""
 
   roles:
-    - setup_repo
-    - install_dbserver
-    - init_dbserver
-    - manage_dbserver
+    - role: setup_repo
+      when: "'setup_repo' in lookup('edb_devops.edb_postgres.supported_roles')"
+    - role: install_dbserver
+      when: "'install_dbserver' in lookup('edb_devops.edb_postgres.supported_roles')"
+    - role: init_dbserver
+      when: "'init_dbserver' in lookup('edb_devops.edb_postgres.supported_roles')"
+    - role: manage_dbserver
+      when: "'manage_dbserver' in lookup('edb_devops.edb_postgres.supported_roles')"
diff --git a/playbook/playbook.yml b/playbook/playbook.yml
index f6cf565e..8aaf8e75 100644
--- a/playbook/playbook.yml
+++ b/playbook/playbook.yml
@@ -1,30 +1,35 @@
 ---
-- hosts: localhost
+- hosts: all
   name: Configure Postgres or EPAS on Instances
-  become: true
-  gather_facts: no
+  become: yes
+  gather_facts: yes
 
   # When using collections
   collections:
-      - edb_devops.edb_postgres
-
-  vars_files:
-    - hosts.yml
+    - edb_devops.edb_postgres
 
   pre_tasks:
-      - name: Initialize the user defined variables
-        set_fact:
-            os: "CentOS8"
-            pg_version: 12
-            pg_type: "PG"
-            yum_username: ""
-            yum_password: ""
+    - name: Initialize the user defined variables
+      set_fact:
+        pg_version: 12
+        pg_type: "PG"
+        yum_username: ""
+        yum_password: ""
 
   roles:
-    - setup_repo
-    - install_dbserver
-    - init_dbserver
-    - setup_replication
-    - setup_efm
-    - setup_pem
-    - manage_dbserver
+    - role: setup_repo
+      when: "'setup_repo' in lookup('edb_devops.edb_postgres.supported_roles')"
+    - role: install_dbserver
+      when: "'install_dbserver' in lookup('edb_devops.edb_postgres.supported_roles')"
+    - role: init_dbserver
+      when: "'init_dbserver' in lookup('edb_devops.edb_postgres.supported_roles')"
+    - role: setup_replication
+      when: "'setup_replication' in lookup('edb_devops.edb_postgres.supported_roles')"
+    - role: setup_efm
+      when: "'setup_efm' in lookup('edb_devops.edb_postgres.supported_roles')"
+    - role: manage_dbserver
+      when: "'manage_dbserver' in lookup('edb_devops.edb_postgres.supported_roles')"
+    - role: setup_pemserver
+      when: "'setup_pemserver' in lookup('edb_devops.edb_postgres.supported_roles')"
+    - role: setup_pemagent
+      when: "'setup_pemagent' in lookup('edb_devops.edb_postgres.supported_roles')"
diff --git a/playbook/rhel_firewald_rule.yml b/playbook/rhel_firewald_rule.yml
deleted file mode 100644
index d913a196..00000000
--- a/playbook/rhel_firewald_rule.yml
+++ /dev/null
@@ -1,46 +0,0 @@
----
-#ansible-playbook --private-key=<id_rsa> rhel_firewalld_rule.yml -u ec2-user -vv
-- hosts: localhost
-#  vars:
-#    ansible_python_interpreter: /usr/bin/python2
-#    ansible_python_interpreter: /usr/bin/python3
-  name: Stop Firewalld service on Remote Hosts
-  #connection: local
-  #connection: ssh
-  become: true
-  gather_facts: no
-
-  vars_files:
-    - hosts.yml
-
-  tasks:
-    - name: Display current Node to Install
-      block:
-        - debug:
-            msg: "Private IP = {{ item.value.private_ip }},
-                Public IP = {{ item.value.public_ip }}"
-          with_dict: "{{ servers }}"
-
-    - name: Update the firewalld to allow connections on 5444
-      firewalld:
-        port: 5444/tcp
-        permanent: yes
-        state: enabled
-      delegate_to: "{{ item.value.public_ip }}"
-      with_dict: "{{ servers }}"
-
-    - name: Update the firewalld to allow connections on 5432
-      firewalld:
-        port: 5432/tcp
-        permanent: yes
-        state: enabled
-      delegate_to: "{{ item.value.public_ip }}"
-      with_dict: "{{ servers }}"
-
-    - name: Update the firewalld to allow connections on 7800-7810
-      firewalld:
-        port: 7800-7810/tcp
-        permanent: yes
-        state: enabled
-      delegate_to: "{{ item.value.public_ip }}"
-      with_dict: "{{ servers }}"
diff --git a/terraform/aws/LICENSE.txt b/terraform/aws/LICENSE.txt
deleted file mode 100755
index 6c1e1235..00000000
--- a/terraform/aws/LICENSE.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-Original work Copyright 2019-2020, EnterpriseDB Corporation
-
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are 
-met:
-
-1. Redistributions of source code must retain the above copyright 
-notice, this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright 
-notice, this list of conditions and the following disclaimer in the 
-documentation and/or other materials provided with the distribution.
-
-3. Neither the name of EnterpriseDB nor the names of its contributors 
-may be used to endorse or promote products derived from this software 
-without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEV
-ER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
diff --git a/terraform/aws/README.md b/terraform/aws/README.md
deleted file mode 100755
index 4ab6b4c6..00000000
--- a/terraform/aws/README.md
+++ /dev/null
@@ -1,139 +0,0 @@
-# Getting Started
-Postgres Deployment scripts are an easy way to deploy Postgres and EDB Tools at no charge. It is a contribution by the EDB team members which can help people explore both Postgres and EDB tools. Users can interact via the git repository comments section. Feel free to leave comments there. However, these scripts are not officially supported by the EnterpriseDb Team.
-
-EnterpriseDb has the largest base of PostgreSQL experts available.
-
-Learn more about [Professional Support] (https://www.enterprisedb.com/services/ongoing-postgresql-help/postgresql-technical-support)
-
-The intention of this repository is as an introductory self starting guide.
-
-Before starting to delve into this repository, it is best to get familiar with the steps in the deployment process towards Amazon Web Services.
-
-## The overall process consists of the following steps:
-
-1. Set up Software Prerequisites
-   * Linux based Operating System
-   * Package dependencies installation are accomplished via bash script
-   * AWS CLI v2 installed via bash script
-   * Requires configuration of AWS Command Line Interface v2 for authentication
-2. Configure AWS CLI v2 with credentials
-3. Create Cloud Infrastructure Prerequisites Resources
-   * Performed by Terraform scripts in ```terraform/aws``` folder
-4. Setup Postgres or EnterpriseDB Postgres Advanced Server
-   * Performed by Ansible scripts in Ansible Galaxy downloaded collection: ```edb_devops.edb_postgres```
-5. Execute SQL Scripts
-   * Performed by Ansible scripts in ```02-sqlexec``` folder
-
-----
-### Software Prerequisites
-1. Terraform installed and configured
-2. Ansible installed and configured
-
-**Require Installation**
-
-* [Terraform Installation]  (https://learn.hashicorp.com/terraform/getting-started/install.html)
-  ![Terraform 0.13 Installation](../../demos/Terraform_0.13_Installation.gif)
-
-* [Ansible Installation] (https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html)
-
-### Prerequisites Setup
-##### Dependencies
-1. Vendor Cloud SDK ( AWS, GCP or Azure )
-2. Packages: curl and wget
-1. Terraform >= 0.13
-2. Ansible >= 2.9
-
-### Steps
-
-* Items to consider:
-  * The Operating Systems Images ( CentOS7 and RHEL7 ) are supported across the following AWS Regions: 'us-east-1', 'us-east-2', 'us-west-1'or 'us-west-2'
-  * A minimum of 3 instances is recommended
-
-* The bash scripts utilized in the scripts have been tested on:
-  * Red Hat 7
-  * CentOS 7
-  * Debian 9
-  * Ubuntu 20.04
-
-* Create your SSH Key or make it available for its reference
-  ![Create SSH Key](../../demos/KeyGen.gif)
-
-* The dependent packages are:
-  * curl, wget, curl, terraform and ansible
-  * An example script is provided that is located at: ```./lib/prereqs.sh```
-
-* A CLI or SDK depending on the Cloud vendor to utilize is required: 
-  * AWS - An example script is provided that is located at: ```./lib/aws-cli.sh```
-  * Azure - An example script is provided that is located at: ```./lib/azure-cli.sh```
-  * Google Cloud - An example script is provided that is located at: ```./lib/gcp-sdk.sh```
-
-* Configure the CLI or SDK
-  * AWS - ```aws configure``` and pressing **Enter** button
-  * Azure - ```az login``` and pressing **Enter** button
-  * Google Cloud - ```gcloud init``` and pressing **Enter** button
-  
-* Download ```postgres-deployment``` github repo by clicking on the green **Code** button followed by clicking the **Download Zip** link
-
-* Extract the zip file to a desired destination
-
-* Copy the ```postgres-deployment.zip``` file to the desired target directory
-  
-* Extract the zip file to a desired destination by utilizing Archive Manager or by: typing ```unzip postgres-deployment.zip``` and pressing the **Enter** button
- 
-* Open the ```Terminal``` command line
-
-* Navigate to the extracted folder location and type: ```cd postgres-deployment``` finishing with pressing the **Enter** button
-
-* Type: ```./lib_sh/keygen.sh``` and execute the bash script by pressing the **Enter** button.
-  ![SSH Key Generation](../../demos/AWS_SSHKey_Generation.gif)
-
-* Type: ```./edb-deployment``` and execute the command by pressing the **Enter** button. The subcommands below will be listed as options:
-
-```
-edb-deployment [<cloud>-server|<cloud>-postgres] [OPTION]...
-
-EDB deployment script for aws, azure and gcp
-
-Subcommands:
-    aws-server      [create|destroy]  PROJECT_NAME
-    azure-server    [create|destroy]  PROJECT_NAME
-    gcloud-server   [create|destroy]  PROJECT_NAME
-    aws-postgres    install           PROJECT_NAME
-    azure-postgres  install           PROJECT_NAME
-    gcloud-postgres install           PROJECT_NAME
-
-Other Options:
-    -h, --help Display help and exit
-```
-
-* Type: ```./edb-deployment aws-server create PROJECT_NAME``` and execute the command by pressing the **Enter** button.
-  ![Create PEM AWS Resources](../../demos/AWS_Create_test.gif)
-
-* Type: ```./edb-deployment aws-postgres install PROJECT_NAME``` and execute the command by pressing the **Enter** button.
-  ![Install Postgres on AWS Resources](../../demos/AWS_Postgres_Install.gif)
-
-* Type: ```./edb-deployment aws-server destroy PROJECT_NAME``` and execute the command by pressing the **Enter** button.
-  ![Removed Created AWS Resources](../../demos/AWS_Destroy_test.gif)
-
-### Manual Configurations
-* The steps below are for reference in case there is a desire to perform configurations manually. The steps are in listed and described in their execution order and are located in the ```lib_sh``` directory:
-  * keygen.sh - Removes and creates the SSH Keys
-  ![Generate SSH Keys](../../demos/AWS_SSHKey_Generation.gif)
-  * aws-cli.sh - Installs AWS CLI and initiates the AWS Credentials Configuration
-   The results should be similar as the video below:
-  ![AWS CLI v2 Installation](../../demos/AWS_CLI_v2_Installation.gif)
-  * Configure the AWS CLI by typing: ```AWS configure``` and pressing **Enter** button
-  ![AWS CLI v2 Configuration](../../demos/AWS_CLI_v2_Configuration.gif)
-  
-### Execute SQL Statements on Postgres Cluster
-##### Dependencies
-1. Ansible
-2. Cloud Infrastructure Prerequisites
-3. Previously setup and configured Postgres or EnterpriseDB Postgres Advanced Server Instances
-
-**Steps**
-
-* Navigate to the **sqlexec** folder
-
-* Refer to the example files: ```hosts.yml``` and ```playbook.yml``` located in the ```sqlexec``` directory
-  ![SQLExec](../../demos/SQLExec.gif)
diff --git a/terraform/aws/environments/ec2/ec2.tf b/terraform/aws/environments/ec2/ec2.tf
index e9e4cf2e..944f967e 100755
--- a/terraform/aws/environments/ec2/ec2.tf
+++ b/terraform/aws/environments/ec2/ec2.tf
@@ -1,27 +1,31 @@
-variable os {}
-variable ami_id {}
-variable instance_count {}
-variable pem_instance_count {}
-variable synchronicity {}
-variable vpc_id {}
-variable instance_type {}
-variable instance_volume_type {}
-variable instance_volume_iops {}
-variable instance_volume_size {}
-variable ebs_volume_count {}
-variable ebs_volume_type {}
-variable ebs_volume_size {}
-variable ebs_volume_iops {}
-variable ebs_volume_encryption {}
-variable ansible_pem_inventory_yaml_filename {}
-variable os_csv_filename {}
-variable add_hosts_filename {}
-variable ssh_key_path {}
-variable full_private_ssh_key_path {}
-variable custom_security_group_id {}
-variable cluster_name {}
-variable root_user {}
-variable created_by {}
+variable "os" {}
+variable "ami_id" {}
+variable "pg_instance_count" {
+  type = number
+}
+variable "pem_instance_count" {
+  type = number
+}
+variable "synchronicity" {}
+variable "vpc_id" {}
+variable "instance_type" {}
+variable "instance_volume_type" {}
+variable "instance_volume_iops" {}
+variable "instance_volume_size" {}
+variable "ebs_volume_count" {}
+variable "ebs_volume_type" {}
+variable "ebs_volume_size" {}
+variable "ebs_volume_iops" {}
+variable "ebs_volume_encryption" {}
+variable "ansible_inventory_yaml_filename" {}
+variable "os_csv_filename" {}
+variable "add_hosts_filename" {}
+variable "ssh_key_path" {}
+variable "full_private_ssh_key_path" {}
+variable "custom_security_group_id" {}
+variable "cluster_name" {}
+variable "root_user" {}
+variable "created_by" {}
 
 
 locals {
@@ -42,8 +46,8 @@ resource "aws_key_pair" "key_pair" {
   public_key = file(var.ssh_key_path)
 }
 
-resource "aws_instance" "EDB_DB_Cluster" {
-  count = var.instance_count
+resource "aws_instance" "pg_server" {
+  count = var.pg_instance_count
 
   ami = var.ami_id
 
@@ -60,7 +64,69 @@ resource "aws_instance" "EDB_DB_Cluster" {
   }
 
   tags = {
-    Name       = (var.pem_instance_count == "1" && count.index == 0 ? format("%s-%s", var.cluster_name, "pemserver") : (var.pem_instance_count == "0" && count.index == 1 ? format("%s-%s", var.cluster_name, "primary") : (count.index > 1 ? format("%s-%s%s", var.cluster_name, "standby", count.index) : format("%s-%s", var.cluster_name, "primary"))))
+    Name       = (count.index == 0 ? format("%s-%s", var.cluster_name, "primary") : format("%s-%s%s", var.cluster_name, "standby", count.index))
+    Created_By = var.created_by
+  }
+
+  connection {
+    private_key = file(var.ssh_key_path)
+  }
+
+}
+
+resource "aws_ebs_volume" "pg_ebs_vol" {
+  count = var.pg_instance_count * var.ebs_volume_count
+
+  availability_zone = element(aws_instance.pg_server.*.availability_zone, count.index)
+  size              = var.ebs_volume_size
+  type              = var.ebs_volume_type
+  iops              = var.ebs_volume_type == "io2" ? var.ebs_volume_iops : var.ebs_volume_type == "io1" ? var.ebs_volume_iops : null
+  encrypted         = var.ebs_volume_encryption
+
+  tags = {
+    Name = format("pg-%s-%s-%s", var.cluster_name, "ebs", count.index)
+  }
+}
+
+resource "aws_volume_attachment" "pg_attached_vol" {
+  count = var.pg_instance_count * var.ebs_volume_count
+
+  device_name = element(local.lnx_ebs_device_names, count.index)
+  volume_id   = aws_ebs_volume.pg_ebs_vol.*.id[count.index]
+  instance_id = element(aws_instance.pg_server.*.id, count.index)
+
+  provisioner "remote-exec" {
+    script = "../../terraform/aws/environments/ec2/setup_volumes.sh"
+
+    connection {
+      type        = "ssh"
+      user        = var.root_user
+      host        = element(aws_instance.pg_server.*.public_ip, floor(count.index / length(var.ebs_volume_count)))
+      private_key = file(var.full_private_ssh_key_path)
+    }
+  }
+}
+
+// PEM SERVER
+resource "aws_instance" "pem_server" {
+  count = var.pem_instance_count
+
+  ami = var.ami_id
+
+  instance_type          = var.instance_type
+  key_name               = aws_key_pair.key_pair.id
+  subnet_id              = element(tolist(data.aws_subnet_ids.selected.ids), var.pg_instance_count + count.index)
+  vpc_security_group_ids = [var.custom_security_group_id]
+
+  root_block_device {
+    delete_on_termination = "true"
+    volume_size           = var.instance_volume_size
+    volume_type           = var.instance_volume_type
+    iops                  = var.instance_volume_type == "io2" ? var.instance_volume_iops : var.instance_volume_type == "io1" ? var.instance_volume_iops : null
+  }
+
+  tags = {
+    Name       = format("%s-%s", var.cluster_name, "pemserver")
     Created_By = var.created_by
   }
 
@@ -70,26 +136,26 @@ resource "aws_instance" "EDB_DB_Cluster" {
 
 }
 
-resource "aws_ebs_volume" "ebs-vol" {
-  count = var.instance_count * var.ebs_volume_count
+resource "aws_ebs_volume" "pem_ebs_vol" {
+  count = var.pem_instance_count * var.ebs_volume_count
 
-  availability_zone = element(aws_instance.EDB_DB_Cluster.*.availability_zone, count.index)
+  availability_zone = element(aws_instance.pem_server.*.availability_zone, count.index)
   size              = var.ebs_volume_size
   type              = var.ebs_volume_type
   iops              = var.ebs_volume_type == "io2" ? var.ebs_volume_iops : var.ebs_volume_type == "io1" ? var.ebs_volume_iops : null
   encrypted         = var.ebs_volume_encryption
 
   tags = {
-    Name = format("%s-%s-%s", var.cluster_name, "ebs", count.index)
+    Name = format("pem-%s-%s-%s", var.cluster_name, "ebs", count.index)
   }
 }
 
-resource "aws_volume_attachment" "attached-vol" {
-  count = var.instance_count * var.ebs_volume_count
+resource "aws_volume_attachment" "pem_attached_vol" {
+  count = var.pem_instance_count * var.ebs_volume_count
 
   device_name = element(local.lnx_ebs_device_names, count.index)
-  volume_id   = aws_ebs_volume.ebs-vol.*.id[count.index]
-  instance_id = element(aws_instance.EDB_DB_Cluster.*.id, count.index)
+  volume_id   = aws_ebs_volume.pem_ebs_vol.*.id[count.index]
+  instance_id = element(aws_instance.pem_server.*.id, count.index)
 
   provisioner "remote-exec" {
     script = "../../terraform/aws/environments/ec2/setup_volumes.sh"
@@ -97,7 +163,7 @@ resource "aws_volume_attachment" "attached-vol" {
     connection {
       type        = "ssh"
       user        = var.root_user
-      host        = element(aws_instance.EDB_DB_Cluster.*.public_ip, floor(count.index / length(var.ebs_volume_count)))
+      host        = element(aws_instance.pem_server.*.public_ip, floor(count.index / length(var.ebs_volume_count)))
       private_key = file(var.full_private_ssh_key_path)
     }
   }
diff --git a/terraform/aws/environments/ec2/outputs.tf b/terraform/aws/environments/ec2/outputs.tf
index 8397336c..e275665e 100755
--- a/terraform/aws/environments/ec2/outputs.tf
+++ b/terraform/aws/environments/ec2/outputs.tf
@@ -1,17 +1,33 @@
-resource "local_file" "AnsiblePEMYamlInventory" {
-  count    = var.instance_count
-  filename = var.ansible_pem_inventory_yaml_filename
+resource "local_file" "AnsibleYamlInventory" {
+  filename = var.ansible_inventory_yaml_filename
   content  = <<EOT
 ---
-servers:
-  %{for count in range(var.instance_count)~}
-%{if var.pem_instance_count == "1" && count == 0}pemserver:%{endif}%{if var.pem_instance_count == "0" || var.pem_instance_count == "1" && count == 1}primary${count}:%{endif}%{if count > 1}standby${count}:%{endif}
-    node_type: %{if var.pem_instance_count == "1" && count == 0}pemserver%{endif}%{if var.pem_instance_count == "0" || count == 1}primary%{endif}%{if count > 1}standby%{endif}
-    public_dns: ${aws_instance.EDB_DB_Cluster[count].public_dns}
-    public_ip: ${aws_instance.EDB_DB_Cluster[count].public_ip}
-    private_ip: ${aws_instance.EDB_DB_Cluster[count].private_ip}
-    %{if count > 1}replication_type: ${var.synchronicity}%{endif}
-    %{if count > 0}pem_agent: true%{endif}
+all:
+  children:
+%{if var.pem_instance_count == 1}
+    pemserver:
+      hosts:
+        pemserver1:
+          ansible_host: ${aws_instance.pem_server[0].public_ip}
+          private_ip: ${aws_instance.pem_server[0].private_ip}%{endif}
+  %{for count in range(var.pg_instance_count)~}
+%{if count == 0}
+    primary:
+      hosts:
+        primary${count + 1}:%{endif}
+%{if count == 1}
+    standby:
+      hosts:%{endif}
+%{if count > 0}
+        standby${count}:%{endif}
+          ansible_host: ${aws_instance.pg_server[count].public_ip}
+          private_ip: ${aws_instance.pg_server[count].private_ip}
+%{if count > 0}
+          replication_type: ${var.synchronicity}
+          upstream_node_private_ip: ${aws_instance.pg_server[0].private_ip}%{endif}
+%{if var.pem_instance_count == 1}
+          pem_agent: true
+          pem_server_private_ip: ${aws_instance.pem_server[0].private_ip}%{endif}
   %{endfor~}
 EOT
 }
@@ -31,9 +47,13 @@ echo "Setting SSH Keys"
 ssh-add ${var.ssh_key_path}
 echo "Adding IPs"
 
-%{for count in range(var.instance_count)~}
-ssh-keyscan -H ${aws_instance.EDB_DB_Cluster[count].public_ip} >> ~/.ssh/known_hosts
-ssh-keygen -f ~/.ssh/known_hosts -R ${aws_instance.EDB_DB_Cluster[count].public_dns}
-%{endfor~}    
+%{for count in range(var.pg_instance_count)~}
+ssh-keyscan -H ${aws_instance.pg_server[count].public_ip} >> ~/.ssh/known_hosts
+ssh-keygen -f ~/.ssh/known_hosts -R ${aws_instance.pg_server[count].public_dns}
+%{endfor~}
+%{if var.pem_instance_count == 1}
+ssh-keyscan -H ${aws_instance.pem_server[0].public_ip} >> ~/.ssh/known_hosts
+ssh-keygen -f ~/.ssh/known_hosts -R ${aws_instance.pem_server[0].public_dns}
+%{endif}
     EOT
 }
diff --git a/terraform/aws/environments/network/network.tf b/terraform/aws/environments/network/network.tf
index e58dbc9a..db4c8916 100755
--- a/terraform/aws/environments/network/network.tf
+++ b/terraform/aws/environments/network/network.tf
@@ -1,7 +1,12 @@
-variable instance_count {}
-variable vpc_id {}
-variable public_subnet_tag {}
-variable aws_region {}
+variable "pg_instance_count" {
+  type = number
+}
+variable "pem_instance_count" {
+  type = number
+}
+variable "vpc_id" {}
+variable "public_subnet_tag" {}
+variable "aws_region" {}
 
 
 data "aws_availability_zones" "available" {
@@ -14,13 +19,13 @@ locals {
 }
 
 resource "aws_subnet" "public_subnets" {
-  count                   = var.instance_count
+  count                   = var.pg_instance_count + var.pem_instance_count
   vpc_id                  = var.vpc_id
   cidr_block              = "10.0.${count.index}.0/24"
   map_public_ip_on_launch = "true" //Makes the subnet public
   availability_zone       = data.aws_availability_zones.available.names[count.index < local.az_count ? count.index : (local.az_count - 1)]
 
   tags = {
-    Name = format("%s_%s", var.public_subnet_tag, "${count.index}")
+    Name = format("%s_%s", var.public_subnet_tag, count.index)
   }
 }
diff --git a/terraform/aws/environments/policies/policy.tf b/terraform/aws/environments/policies/policy.tf
index 50e67e99..508a00b1 100755
--- a/terraform/aws/environments/policies/policy.tf
+++ b/terraform/aws/environments/policies/policy.tf
@@ -1,5 +1,5 @@
-variable aws_iam_user_name {}
-variable project_tag {}
+variable "aws_iam_user_name" {}
+variable "project_tag" {}
 
 
 resource "aws_iam_group" "group" {
diff --git a/terraform/aws/environments/routes/routes.tf b/terraform/aws/environments/routes/routes.tf
index 99f55b18..ddf215bd 100755
--- a/terraform/aws/environments/routes/routes.tf
+++ b/terraform/aws/environments/routes/routes.tf
@@ -1,7 +1,12 @@
-variable instance_count {}
-variable vpc_id {}
-variable project_tag {}
-variable public_cidrblock {}
+variable "pg_instance_count" {
+  type = number
+}
+variable "pem_instance_count" {
+  type = number
+}
+variable "vpc_id" {}
+variable "project_tag" {}
+variable "public_cidrblock" {}
 
 
 data "aws_subnet_ids" "ids" {
@@ -32,7 +37,7 @@ resource "aws_route_table" "edb-prereqs-postgres-customroutetable" {
 }
 
 resource "aws_route_table_association" "edb-prereqs-postgres-rtassociations" {
-  count          = var.instance_count
+  count          = var.pg_instance_count + var.pem_instance_count
   subnet_id      = element(tolist(data.aws_subnet_ids.ids.ids), count.index)
   route_table_id = aws_route_table.edb-prereqs-postgres-customroutetable.id
 }
diff --git a/terraform/aws/environments/security/security.tf b/terraform/aws/environments/security/security.tf
index 48137868..df8d248a 100755
--- a/terraform/aws/environments/security/security.tf
+++ b/terraform/aws/environments/security/security.tf
@@ -1,6 +1,6 @@
-variable vpc_id {}
-variable public_cidrblock {}
-variable project_tag {}
+variable "vpc_id" {}
+variable "public_cidrblock" {}
+variable "project_tag" {}
 
 resource "aws_security_group" "edb-prereqs-rules" {
   vpc_id = var.vpc_id
diff --git a/terraform/aws/environments/vpc/vpc.tf b/terraform/aws/environments/vpc/vpc.tf
index 6901f5e8..591691a6 100755
--- a/terraform/aws/environments/vpc/vpc.tf
+++ b/terraform/aws/environments/vpc/vpc.tf
@@ -1,5 +1,5 @@
-variable vpc_cidr_block {}
-variable vpc_tag {}
+variable "vpc_cidr_block" {}
+variable "vpc_tag" {}
 
 
 resource "aws_vpc" "main" {
diff --git a/terraform/aws/global/iam/iam.tf b/terraform/aws/global/iam/iam.tf
index 36c5e4e2..67178bfe 100755
--- a/terraform/aws/global/iam/iam.tf
+++ b/terraform/aws/global/iam/iam.tf
@@ -1,7 +1,7 @@
-variable user_name {}
-variable user_path {}
-variable user_force_destroy {}
-variable project_tags {}
+variable "user_name" {}
+variable "user_path" {}
+variable "user_force_destroy" {}
+variable "project_tags" {}
 
 resource "aws_iam_user" "this" {
   name          = var.user_name
diff --git a/terraform/aws/main.tf b/terraform/aws/main.tf
index 7f13b48a..77d7953a 100755
--- a/terraform/aws/main.tf
+++ b/terraform/aws/main.tf
@@ -19,10 +19,11 @@ module "vpc" {
 module "network" {
   source = "./environments/network"
 
-  instance_count    = var.instance_count
-  vpc_id            = module.vpc.vpc_id
-  public_subnet_tag = var.public_subnet_tag
-  aws_region        = var.aws_region
+  pg_instance_count  = var.pg_instance_count
+  pem_instance_count = var.pem_instance_count
+  vpc_id             = module.vpc.vpc_id
+  public_subnet_tag  = var.public_subnet_tag
+  aws_region         = var.aws_region
 
   depends_on = [module.vpc]
 }
@@ -39,10 +40,11 @@ module "network" {
 module "routes" {
   source = "./environments/routes"
 
-  instance_count   = var.instance_count
-  vpc_id           = module.vpc.vpc_id
-  project_tag      = var.project_tag
-  public_cidrblock = var.public_cidrblock
+  pg_instance_count  = var.pg_instance_count
+  pem_instance_count = var.pem_instance_count
+  vpc_id             = module.vpc.vpc_id
+  project_tag        = var.project_tag
+  public_cidrblock   = var.public_cidrblock
 
   #  depends_on = [module.policies]
   depends_on = [module.network]
@@ -65,7 +67,7 @@ module "edb-db-cluster" {
   os                                  = var.os
   ami_id                              = var.ami_id
   vpc_id                              = module.vpc.vpc_id
-  instance_count                      = var.instance_count
+  pg_instance_count                   = var.pg_instance_count
   pem_instance_count                  = var.pem_instance_count
   synchronicity                       = var.synchronicity
   cluster_name                        = var.cluster_name
@@ -78,7 +80,7 @@ module "edb-db-cluster" {
   ebs_volume_size                     = var.ebs_volume_size
   ebs_volume_iops                     = var.ebs_volume_iops
   ebs_volume_encryption               = var.ebs_volume_encryption
-  ansible_pem_inventory_yaml_filename = var.ansible_pem_inventory_yaml_filename
+  ansible_inventory_yaml_filename     = var.ansible_inventory_yaml_filename
   os_csv_filename                     = var.os_csv_filename
   add_hosts_filename                  = var.add_hosts_filename
   custom_security_group_id            = module.security.aws_security_group_id
diff --git a/terraform/aws/playbook/hosts.yml b/terraform/aws/playbook/hosts.yml
deleted file mode 100755
index a6223aee..00000000
--- a/terraform/aws/playbook/hosts.yml
+++ /dev/null
@@ -1,28 +0,0 @@
----
-servers:
-  pemserver:
-    node_type: pemserver
-    public_dns: ec2-34-222-170-188.us-west-2.compute.amazonaws.com
-    public_ip: 34.222.170.188
-    private_ip: 10.0.2.19
-  primary1:
-    node_type: primary
-    public_dns: ec2-54-186-149-203.us-west-2.compute.amazonaws.com
-    public_ip: 54.186.149.203
-    private_ip: 10.0.0.154
-    replication_type: asynchronous
-    pem_agent: true
-  standby2:
-    node_type: standby
-    public_dns: ec2-34-220-80-230.us-west-2.compute.amazonaws.com
-    public_ip: 34.220.80.230
-    private_ip: 10.0.1.218
-    replication_type: asynchronous
-    pem_agent: true
-  standby3:
-    node_type: standby
-    public_dns: ec2-44-235-74-131.us-west-2.compute.amazonaws.com
-    public_ip: 44.235.74.131
-    private_ip: 10.0.3.43
-    replication_type: asynchronous
-    pem_agent: true
diff --git a/terraform/aws/playbook/playbook.yml b/terraform/aws/playbook/playbook.yml
deleted file mode 100644
index fb884b05..00000000
--- a/terraform/aws/playbook/playbook.yml
+++ /dev/null
@@ -1,78 +0,0 @@
----
-- hosts: localhost
-  name: Configure Postgres SQL Replication on Instances
-  become: true
-  gather_facts: no
-
-  # When using collections
-  collections:
-      - edb_devops.edb_postgres
-
-  vars_files:
-    - hosts.yml
-
-  #initializing internal variables
-  vars:
-      PEM_SERVER_PRIVATE_IP: ""
-      PRIMARY_PRIVATE_IP: ""
-      PRIMARY_PUBLIC_IP: ""
-      STANDBY_NAMES: []
-      ALL_NODE_IPS: []
-      EFM_NODES_PRIVATE_IP: []
-      EFM_NODES_PUBLIC_IP: []
-
-  pre_tasks:
-      - name: Initialize the user defined variables
-        set_fact:
-            OS: "CentOS7"
-            PG_VERSION: "12"
-            PG_TYPE: "PG"
-            PG_DATA: "/data/pgdata"
-            PG_WAL: "/data/pg_wal"
-            STANDBY_QUORUM_TYPE: "ANY" # Quorum type can be ANY or FIRST
-
-            # This is internal variables processing please do not modify
-            ALL_NODE_IPS: "{{ ALL_NODE_IPS + [item.value.private_ip] }}"
-            PRIMARY_PRIVATE_IP: "{{ PRIMARY_PRIVATE_IP + item.value.private_ip if(item.value.node_type == 'primary') else PRIMARY_PRIVATE_IP }}"
-            PRIMARY_PUBLIC_IP: "{{ PRIMARY_PUBLIC_IP  + item.value.public_ip if(item.value.node_type == 'primary') else PRIMARY_PUBLIC_IP }}"
-            PEM_SERVER_PRIVATE_IP: "{{ PEM_SERVER_PRIVATE_IP + item.value.private_ip if(item.value.node_type == 'pemserver') else PEM_SERVER_PRIVATE_IP }}"
-        with_dict: "{{ servers }}"
-
-      - name: Gather primary and standby nodes for EFM
-        set_fact:
-            EFM_NODES_PRIVATE_IP: "{{ EFM_NODES_PRIVATE_IP + [item.value.private_ip] }}"
-            EFM_NODES_PUBLIC_IP: "{{ EFM_NODES_PUBLIC_IP + [item.value.public_ip] }}"
-        when: item.value.node_type in ['primary', 'standby']
-        with_dict: "{{ servers }}"
-
-      - name: Gather the standby names
-        set_fact:
-            STANDBY_NAMES: "{{ STANDBY_NAMES + [item.key] }}"
-        when: item.value.node_type == 'standby'
-        with_dict: "{{ servers }}"
-
-  tasks:
-    - name: Iterate through repo role with items from hosts file
-      include_role:
-        name: setup_repo
-      with_dict: "{{ servers }}"
-    - name: Iterate through install role with items from hosts file
-      include_role:
-        name: install_dbserver
-      with_dict: "{{ servers }}"
-    - name: Iterate through initialize role with items from hosts file
-      include_role:
-        name: init_dbserver
-      with_dict: "{{ servers }}"
-    - name: Iterate through replication role with items from hosts file
-      include_role:
-        name: setup_replication
-      with_dict: "{{ servers }}"
-    - name: Iterate through efm install role with items from hosts file
-      include_role:
-        name: setup_efm
-      with_dict: "{{ servers }}"
-    - name: Iterate through pem install role with items from hosts file
-      include_role:
-        name: setup_pem
-      with_dict: "{{ servers }}"
diff --git a/terraform/aws/sqlexec/hosts.yml b/terraform/aws/sqlexec/hosts.yml
deleted file mode 100755
index 42249943..00000000
--- a/terraform/aws/sqlexec/hosts.yml
+++ /dev/null
@@ -1,9 +0,0 @@
----
-hosts:
-  master:
-    node_type: master
-    private_ip: xxx.xxx.xxx
-    public_ip: xxx.xxx.xxx
-    database: postgres
-    pgdbuser: postgres
-    dbpassword: postgres
diff --git a/terraform/aws/sqlexec/playbook.yml b/terraform/aws/sqlexec/playbook.yml
deleted file mode 100755
index b7724fae..00000000
--- a/terraform/aws/sqlexec/playbook.yml
+++ /dev/null
@@ -1,22 +0,0 @@
----
-- hosts: localhost 
-  name: Execute SQL Statements on Postgres SQL Cluster
-  connection: local
-  become: true
-  gather_facts: yes
-  #ignore_errors: yes
-  
-  vars_files:
-    - /home/dortiz/hosts-sql.yml
-
-  pre_tasks:
-    - set_fact:
-        OS: OS
-        PG_VERSION: PG_VERSION
-      with_dict: "{{ hosts }}"
-
-  tasks:
-    - name: Iterate through role with items from hosts file
-      include_role:
-        name: edb.postgres.sqlexec
-      with_dict: "{{ hosts }}"
diff --git a/terraform/aws/sqlexec/roles/edb.postgres.sqlexec/.travis.yml b/terraform/aws/sqlexec/roles/edb.postgres.sqlexec/.travis.yml
deleted file mode 100755
index 36bbf620..00000000
--- a/terraform/aws/sqlexec/roles/edb.postgres.sqlexec/.travis.yml
+++ /dev/null
@@ -1,29 +0,0 @@
----
-language: python
-python: "2.7"
-
-# Use the new container infrastructure
-sudo: false
-
-# Install ansible
-addons:
-  apt:
-    packages:
-    - python-pip
-
-install:
-  # Install ansible
-  - pip install ansible
-
-  # Check ansible version
-  - ansible --version
-
-  # Create ansible.cfg with correct roles_path
-  - printf '[defaults]\nroles_path=../' >ansible.cfg
-
-script:
-  # Basic role syntax check
-  - ansible-playbook tests/test.yml -i tests/inventory --syntax-check
-
-notifications:
-  webhooks: https://galaxy.ansible.com/api/v1/notifications/
\ No newline at end of file
diff --git a/terraform/aws/sqlexec/roles/edb.postgres.sqlexec/README.md b/terraform/aws/sqlexec/roles/edb.postgres.sqlexec/README.md
deleted file mode 100755
index 2e99fd3b..00000000
--- a/terraform/aws/sqlexec/roles/edb.postgres.sqlexec/README.md
+++ /dev/null
@@ -1,65 +0,0 @@
-edb.postgres.sqlexec
-=========
-
-This Ansible Galaxy Role Executes SQL Statements for Postgres versions: 10, 11 and 12 on EC2 Instances previously configured on AWS.
-
-Requirements
-------------
-
-The dependencies that are required prior to executing this role are:
-1. 01-prereqs
-2. 02-cluster
-3. 03-install
-4. 04-replication
-
-Role Variables
---------------
-
-When executing the role via ansible there are two required variables:
-* OS
-* PG_VERSION
-
-Dependencies
-------------
-
-The edb.postgres.sqlexec role does not have any dependencies on any other roles.
-
-Example Playbook
-----------------
-
-Below is an example of how to use the: edb.postgres.sqlexec role:
-
-    - hosts: localhost
-      name: Execute SQL Statements on Postgres SQL Cluster
-      connection: local
-      become: true
-      gather_facts: yes
-
-      vars_files:
-        - hosts.yml
-
-      pre_tasks:
-        - set_fact:
-            OS: OS
-            PG_VERSION: PG_VERSION
-          with_dict: "{{ hosts }}"
- 
-      tasks:
-        - name: Iterate through role with items from hosts file
-          include_role:
-            name: edb.postgres.sqlexec
-          with_dict: "{{ hosts }}"
-
-License
--------
-
-BSD
-
-Author Information
-------------------
-
-Author: 
-* Doug Ortiz
-* EDB Postgres DevOps
-* doug.ortiz@enterprisedb.com
-* www.enterprisedb.com
diff --git a/terraform/aws/sqlexec/roles/edb.postgres.sqlexec/defaults/main.yml b/terraform/aws/sqlexec/roles/edb.postgres.sqlexec/defaults/main.yml
deleted file mode 100755
index ed97d539..00000000
--- a/terraform/aws/sqlexec/roles/edb.postgres.sqlexec/defaults/main.yml
+++ /dev/null
@@ -1,1 +0,0 @@
----
diff --git a/terraform/aws/sqlexec/roles/edb.postgres.sqlexec/meta/main.yml b/terraform/aws/sqlexec/roles/edb.postgres.sqlexec/meta/main.yml
deleted file mode 100755
index b1fe1939..00000000
--- a/terraform/aws/sqlexec/roles/edb.postgres.sqlexec/meta/main.yml
+++ /dev/null
@@ -1,54 +0,0 @@
----
-galaxy_info:
-  author: Doug Ortiz
-  description: Execution of SQL Statements on Postgres SQL Cluster
-  company: "EnterpriseDB"
-
-  # If the issue tracker for your role is not on github, uncomment the
-  # next line and provide a value
-  # issue_tracker_url: http://example.com/issue/tracker
-
-  # Choose a valid license ID from https://spdx.org - some suggested licenses:
-  # - BSD-3-Clause (default)
-  # - MIT
-  # - GPL-2.0-or-later
-  # - GPL-3.0-only
-  # - Apache-2.0
-  # - CC-BY-4.0
-  license: license (GPL-2.0-or-later, MIT, etc)
-
-  min_ansible_version: 2.8
-
-  # If this a Container Enabled role, provide the minimum Ansible Container version.
-  # min_ansible_container_version:
-
-  #
-  # Provide a list of supported platforms, and for each platform a list of versions.
-  # If you don't wish to enumerate all versions for a particular platform, use 'all'.
-  # To view available platforms and versions (or releases), visit:
-  # https://galaxy.ansible.com/api/v1/platforms/
-  #
-  platforms:
-    - name: CentOS
-      versions:
-        - 7
-    - name: Ubuntu
-      versions:
-        - xenial
-        - bionic
-        - focal
-    - name: Debian
-      versions:
-        - wheezy
-        - jessie
-        - stretch
-        - buster
-
-  galaxy_tags:
-    - database
-    - postgresql
-    - postgres
-    - edb
-    - postgresql_query
-
-dependencies: []
diff --git a/terraform/aws/sqlexec/roles/edb.postgres.sqlexec/tasks/SQLExec.yml b/terraform/aws/sqlexec/roles/edb.postgres.sqlexec/tasks/SQLExec.yml
deleted file mode 100755
index d6962612..00000000
--- a/terraform/aws/sqlexec/roles/edb.postgres.sqlexec/tasks/SQLExec.yml
+++ /dev/null
@@ -1,63 +0,0 @@
----
-- name: Display Details of Node to Configure
-  block:
-    - debug:
-        msg: 
-            "Operating System = {{ OS }}:
-             Postgres Version = {{ PG_VERSION }},
-             NODE_TYPE = {{ item.value.node_type }},
-             PRIVATE_IP = {{ item.value.private_ip }},
-             PUBLIC_IP= {{ item.value.public_ip }},
-             DATABASE = {{ item.value.database }},
-             PGDBUSER = {{ item.value.pgdbuser }},
-             PGDBPASSWORD = {{ item.value.pgdbpassword }}"
-
-- name: Drop Table if exists in Postgres DB
-  postgresql_query:
-    db: "{{ DATABASE }}"
-    login_user: "{{ PGDBUSER }}"
-    login_password: "{{ PGDBPASSWORD }}"
-    query: DROP TABLE IF EXISTS students
-  become_user: "{{ PGDBUSER }}"
-  become: yes
-  delegate_to: "{{ PUBLIC_IP }}"
-
-- name: Create Table in Postgres DB
-  postgresql_query:
-    db: "{{ DATABASE }}"
-    login_user: "{{ PGDBUSER }}"
-    login_password: "{{ PGDBPASSWORD }}"
-    query: CREATE TABLE students (name VARCHAR(100))
-  become_user: "{{ PGDBUSER }}"
-  become: yes
-  delegate_to: "{{ PUBLIC_IP }}"
-
-- name: Insert Record into students table in Postgres DB
-  postgresql_query:
-    db: "{{ DATABASE }}"
-    login_user: "{{ PGDBUSER }}"
-    login_password: "{{ PGDBPASSWORD }}"
-    query: INSERT INTO students VALUES ('test')
-  become_user: "{{ PGDBUSER }}"
-  become: yes
-  delegate_to: "{{ PUBLIC_IP }}"
-
-- name: Select query to Postgres DB
-  postgresql_query:
-    db: "{{ DATABASE }}"
-    login_user: "{{ PGDBUSER }}"
-    login_password: "{{ PGDBPASSWORD }}"
-    query: SELECT * FROM students
-  become_user: "{{ PGDBUSER }}"
-  become: yes
-  delegate_to: "{{ PUBLIC_IP }}"
-
-- name: Drop Table students in Postgres DB
-  postgresql_query:
-    db: "{{ DATABASE }}"
-    login_user: "{{ PGDBUSER }}"
-    login_password: "{{ PGDBPASSWORD }}"
-    query: DROP TABLE students
-  become_user: "{{ PGDBUSER }}"
-  become: yes
-  delegate_to: "{{ PUBLIC_IP }}"
diff --git a/terraform/aws/sqlexec/roles/edb.postgres.sqlexec/tasks/main.yml b/terraform/aws/sqlexec/roles/edb.postgres.sqlexec/tasks/main.yml
deleted file mode 100755
index b5cefa2e..00000000
--- a/terraform/aws/sqlexec/roles/edb.postgres.sqlexec/tasks/main.yml
+++ /dev/null
@@ -1,64 +0,0 @@
----
-# Tasks file for edb.postgres.sqlexec Role
-
-- name: Display details of Node to Configure
-  block:
-    - debug:
-        msg: 
-             "NODE_TYPE = {{ item.value.node_type }}:
-             PRIVATE_IP = {{ item.value.private_ip }},
-             PUBLIC_IP = {{ item.value.public_ip }},
-             DATABASE = {{ item.value.database }},
-             PGDBUSER = {{ item.value.pgdbuser }},
-             PGDBPASSWORD = {{ item.value.pgdbpassword }}"
-
-# Setting variables available in all nodes
-- name: Set Node Type
-  set_fact:
-    NODE_TYPE: "{{ item.value.node_type }}"
-  register: output
-
-- name: Set Private IP
-  set_fact:
-    PRIVATE_IP: "{{ item.value.private_ip }}"
-  register: output
-
-- name: Set Public IP Address
-  set_fact:
-    PUBLIC_IP: "{{ item.value.public_ip }}"
-  register: output
-
-- name: Set Database
-  set_fact:
-    DATABASE: "{{ item.value.database }}"
-  register: output
-  when: item.value.node_type == 'master'
-
-- name: Set PGDBUSER
-  set_fact:
-    PGDBUSER: "{{ item.value.pgdbuser }}"
-  register: output
-  when: item.value.node_type == 'master'
-
-- name: Set PGDBPASSWORD
-  set_fact:
-    PGDBPASSWORD: "{{ item.value.pgdbpassword }}"
-  register: output
-  when: item.value.node_type == 'master'
-
-# Install Packages before any tasks are executed
-- name: Install psycopg2 Package PreRequisite
-  yum:
-    name: "{{ packages }}"
-  vars:
-    packages:
-      - python-psycopg2
-    state:
-      present
-  become: yes
-  delegate_to: "{{ PUBLIC_IP }}"
-
-# Postgres12 Master
-- include_tasks: SQLExec.yml
-  #when: ansible_os_family == 'Debian'
-  when: item.value.node_type == 'master'
diff --git a/terraform/aws/sqlexec/roles/edb.postgres.sqlexec/tasks/variables.yml b/terraform/aws/sqlexec/roles/edb.postgres.sqlexec/tasks/variables.yml
deleted file mode 100755
index ab3e7860..00000000
--- a/terraform/aws/sqlexec/roles/edb.postgres.sqlexec/tasks/variables.yml
+++ /dev/null
@@ -1,55 +0,0 @@
----
-# Configuration
-- name: Include OS-specific variables (Debian).
-  include_vars: "{{ ansible_distribution }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
-  when: ansible_distribution == 'Debian'
-
-- name: Include OS-specific variables (RedHat).
-  include_vars: "{{ ansible_os_family }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
-  when:
-  - ansible_os_family == 'RedHat'
-  - ansible_distribution != 'Fedora'
-
-- name: Include OS-specific variables (Fedora).
-  include_vars: "{{ ansible_distribution }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
-  when: ansible_distribution == 'Fedora'
-
-- name: Include OS-specific variables (Ubuntu).
-  include_vars: "{{ ansible_distribution }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
-  when: ansible_distribution == 'Ubuntu'
-
-- name: Define postgresql_packages.
-  set_fact:
-    postgresql_packages: "{{ __postgresql_packages | list }}"
-  when: postgresql_packages is not defined
-
-- name: Define postgresql_version.
-  set_fact:
-    postgresql_version: "{{ __postgresql_version }}"
-  when: postgresql_version is not defined
-
-- name: Define postgresql_daemon.
-  set_fact:
-    postgresql_daemon: "{{ __postgresql_daemon }}"
-  when: postgresql_daemon is not defined
-
-- name: Define postgresql_data_dir.
-  set_fact:
-    postgresql_data_dir: "{{ __postgresql_data_dir }}"
-  when: postgresql_data_dir is not defined
-
-- name: Define postgresql_bin_path.
-  set_fact:
-    postgresql_bin_path: "{{ __postgresql_bin_path }}"
-  when: postgresql_bin_path is not defined
-
-- name: Define postgresql_config_path.
-  set_fact:
-    postgresql_config_path: "{{ __postgresql_config_path }}"
-  when: postgresql_config_path is not defined
-
-- name: Define postgresql_unix_socket_directories_mode.
-  set_fact:
-    postgresql_unix_socket_directories_mode: >-
-      {{ __postgresql_unix_socket_directories_mode | default('02775') }}
-  when: postgresql_unix_socket_directories_mode is not defined
diff --git a/terraform/aws/sqlexec/roles/edb.postgres.sqlexec/vars/CentOS7.yml b/terraform/aws/sqlexec/roles/edb.postgres.sqlexec/vars/CentOS7.yml
deleted file mode 100755
index 5248b1b3..00000000
--- a/terraform/aws/sqlexec/roles/edb.postgres.sqlexec/vars/CentOS7.yml
+++ /dev/null
@@ -1,12 +0,0 @@
----
-__postgresql_version: "11"
-__postgresql_data_dir: "/var/lib/postgresql/{{ __postgresql_version }}/main"
-__postgresql_bin_path: "/usr/lib/postgresql/{{ __postgresql_version }}/bin"
-__postgresql_config_path: "/usr/lib/postgresql/{{ __postgresql_version }}/main"
-__postgresql_daemon: "postgresql@{{ postgresql_version }}-main"
-__postgresql_packages:
-  - postgresql
-  - postgresql-contrib
-  - libpq-dev
-# Python 3
-postgresql_python_library: python3-psycopg2
diff --git a/terraform/aws/sqlexec/roles/edb.postgres.sqlexec/vars/Debian-10.yml b/terraform/aws/sqlexec/roles/edb.postgres.sqlexec/vars/Debian-10.yml
deleted file mode 100755
index 5248b1b3..00000000
--- a/terraform/aws/sqlexec/roles/edb.postgres.sqlexec/vars/Debian-10.yml
+++ /dev/null
@@ -1,12 +0,0 @@
----
-__postgresql_version: "11"
-__postgresql_data_dir: "/var/lib/postgresql/{{ __postgresql_version }}/main"
-__postgresql_bin_path: "/usr/lib/postgresql/{{ __postgresql_version }}/bin"
-__postgresql_config_path: "/usr/lib/postgresql/{{ __postgresql_version }}/main"
-__postgresql_daemon: "postgresql@{{ postgresql_version }}-main"
-__postgresql_packages:
-  - postgresql
-  - postgresql-contrib
-  - libpq-dev
-# Python 3
-postgresql_python_library: python3-psycopg2
diff --git a/terraform/aws/sqlexec/roles/edb.postgres.sqlexec/vars/Ubuntu-18.yml b/terraform/aws/sqlexec/roles/edb.postgres.sqlexec/vars/Ubuntu-18.yml
deleted file mode 100755
index 9a9a065a..00000000
--- a/terraform/aws/sqlexec/roles/edb.postgres.sqlexec/vars/Ubuntu-18.yml
+++ /dev/null
@@ -1,11 +0,0 @@
----
-__postgresql_version: "12"
-__postgresql_data_dir: "/var/lib/postgresql/{{ __postgresql_version }}/main"
-__postgresql_bin_path: "/usr/lib/postgresql/{{ __postgresql_version }}/bin"
-__postgresql_config_path: "/etc/postgresql/{{ __postgresql_version }}/main"
-__postgresql_daemon: postgresql
-__postgresql_packages:
-  - postgresql
-  - postgresql-contrib
-  - libpq-dev
-postgresql_python_library: python3-psycopg2
diff --git a/terraform/aws/variables.tf.template b/terraform/aws/variables.tf.template
index 824c7d0e..54e72eff 100755
--- a/terraform/aws/variables.tf.template
+++ b/terraform/aws/variables.tf.template
@@ -16,7 +16,7 @@ variable "aws_region" {
 }
 
 # Instance Count
-variable "instance_count" {
+variable "pg_instance_count" {
   default = 3
 }
 
@@ -30,9 +30,9 @@ variable "synchronicity" {
   default = "asynchronous"
 }
 
-# Ansible Yaml PEM Inventory Filename
-variable "ansible_pem_inventory_yaml_filename" {
-  default = "pem-inventory.yml"
+# Ansible Yaml Inventory Filename
+variable "ansible_inventory_yaml_filename" {
+  default = "inventory.yml"
 }
 
 # OS CSV Filename
diff --git a/terraform/azure/README.md b/terraform/azure/README.md
deleted file mode 100755
index 2e64c5c9..00000000
--- a/terraform/azure/README.md
+++ /dev/null
@@ -1,138 +0,0 @@
-# Getting Started
-Postgres Deployment scripts are an easy way to deploy Postgres and EDB Tools at no charge. It is a contribution by the EDB team members which can help people explore both Postgres and EDB tools. Users can interact via the git repository comments section. Feel free to leave comments there. However, these scripts are not officially supported by the EnterpriseDb Team.
-
-EnterpriseDb has the largest base of PostgreSQL experts available.
-
-Learn more about [Professional Support] (https://www.enterprisedb.com/services/ongoing-postgresql-help/postgresql-technical-support)
-
-The intention of this repository is as an introductory self starting guide.
-
-Before starting to delve into this repository, it is best to get familiar with the steps in the deployment process towards Amazon Web Services.
-
-## The overall process consists of the following steps:
-
-1. Set up Software Prerequisites
-   * Linux based Operating System
-   * Package dependencies installation are accomplished via bash script
-   * Azure CLI installed via bash script
-   * Requires configuration of AWS Command Line Interface v2 for authentication
-2. Configure Azure CLI with credentials
-3. Create Cloud Infrastructure Prerequisites Resources
-   * Performed by Terraform scripts in ```terraform/azure``` folder
-4. Setup Postgres or EnterpriseDB Postgres Advanced Server
-   * Performed by Ansible scripts in Ansible Galaxy downloaded collection: ```edb_devops.edb_postgres```
-5. Execute SQL Scripts
-   * Performed by Ansible scripts in ```02-sqlexec``` folder
-
-----
-### Software Prerequisites
-1. Terraform installed and configured
-2. Ansible installed and configured
-
-**Require Installation**
-
-* [Terraform Installation]  (https://learn.hashicorp.com/terraform/getting-started/install.html)
-  ![Terraform 0.13 Installation](../../demos/Terraform_0.13_Installation.gif)
-
-* [Ansible Installation] (https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html)
-
-### Prerequisites Setup
-##### Dependencies
-1. Vendor Cloud SDK ( AWS, GCP or Azure )
-2. Packages: curl and wget
-1. Terraform >= 0.13
-2. Ansible >= 2.9
-
-### Steps
-
-* Items to consider:
-  * The Operating Systems Images ( CentOS7 and RHEL7 ) are supported across the following Azure Locations: 'centralus', 'eastus', 'eastus2', 'westus', 'westcentralus', 'westus2', 'northcentralus' or 'southcentralus'
-  * A minimum of 3 instances is recommended
-
-* The bash scripts utilized in the scripts have been tested on:
-  * Red Hat 7
-  * CentOS 7
-  * Debian 9
-  * Ubuntu 20.04
-
-* Create your SSH Key or make it available for its reference
-  ![Create SSH Key](../../demos/KeyGen.gif)
-
-* The dependent packages are:
-  * curl, wget, curl, terraform and ansible
-  * An example script is provided that is located at: ```./lib/prereqs.sh```
-
-* A CLI or SDK depending on the Cloud vendor to utilize is required: 
-  * AWS - An example script is provided that is located at: ```./lib/aws-cli.sh```
-  * Azure - An example script is provided that is located at: ```./lib/azure-cli.sh```
-  * Google Cloud - An example script is provided that is located at: ```./lib/gcp-sdk.sh```
-
-* Configure the CLI or SDK
-  * AWS - ```aws configure``` and pressing **Enter** button
-  * Azure - ```az login``` and pressing **Enter** button
-  * Google Cloud - ```gcloud init``` and pressing **Enter** button
-    
-* Download ```postgres-deployment``` github repo by clicking on the green **Code** button followed by clicking the **Download Zip** link
-
-* Extract the zip file to a desired destination
-
-* Copy the ```postgres-deployment.zip``` file to the desired target directory
-  
-* Extract the zip file to a desired destination by utilizing Archive Manager or by: typing ```unzip postgres-deployment.zip``` and pressing the **Enter** button
- 
-* Open the ```Terminal``` command line
-
-* Navigate to the extracted folder location and type: ```cd postgres-deployment``` finishing with pressing the **Enter** button
-
-* Type: ```./lib/keygen.sh``` and execute the bash script by pressing the **Enter** button.
-  ![SSH Key Generation](../../demos/KeyGen.gif)
-
-* Type: ```./edb-deployment``` and execute the command by pressing the **Enter** button. The subcommands below will be listed as options:
-
-```
-edb-deployment [<cloud>-server|<cloud>-postgres] [OPTION]...
-
-EDB deployment script for aws, azure and gcp
-
-Subcommands:
-    aws-server      [create|destroy]  PROJECT_NAME
-    azure-server    [create|destroy]  PROJECT_NAME
-    gcloud-server   [create|destroy]  PROJECT_NAME
-    aws-postgres    install           PROJECT_NAME
-    azure-postgres  install           PROJECT_NAME
-    gcloud-postgres install           PROJECT_NAME
-
-Other Options:
-    -h, --help Display help and exit
-```
-
-* Type: ```./edb-deployment azure-server create PROJECT_NAME``` and execute the command by pressing the **Enter** button.
-  #![Create PEM Azure Resources](../../demos/AZURE_Create_test.gif)
-
-* Type: ```./edb-deployment azure-postgres install PROJECT_NAME``` and execute the command by pressing the **Enter** button.
-  #![Install PEM on Azure Resources](../../demos/AZURE_PEM_Install.gif)
-
-* Type: ```./edb-deployment azure-server destroy PROJECT_NAME``` and execute the command by pressing the **Enter** button.
-  #![Removed Created Azure Resources](../../demos/AZURE_Destroy_test.gif)
-
-### Manual Configurations
-* The steps below are for reference in case there is a desire to perform configurations manually. The steps are in listed and described in their execution order and are located in the ```lib_sh``` directory:
-  * keygen.sh - Removes and creates the SSH Keys
-  ![Generate SSH Keys](../../demos/KeyGen.gif)
-  * azure-cli.sh - Installs Azure CLI and initiates the Azure Credentials Configuration
-   The results should be similar as the video below:
-  ![Azure CLI Installation](../../demos/Azure_CLI_Installation.gif)
-  * Configure the Azure CLI by typing: ```az login``` and pressing **Enter** button
-  
-### Execute SQL Statements on Postgres Cluster
-##### Dependencies
-1. Ansible
-2. Cloud Infrastructure Prerequisites
-3. Previously setup and configured Postgres or EnterpriseDB Postgres Advanced Server Instances
-
-**Steps**
-
-* Navigate to the **sqlexec** folder
-
-* Refer to the example files: ```hosts.yml``` and ```playbook.yml``` located in the ```sqlexec``` directory
-  ![SQLExec](../../demos/SQLExec.gif)
diff --git a/terraform/azure/environments/network/network.tf b/terraform/azure/environments/network/network.tf
index d052d89f..845c086f 100755
--- a/terraform/azure/environments/network/network.tf
+++ b/terraform/azure/environments/network/network.tf
@@ -1,8 +1,8 @@
-variable securitygroup_name {}
-variable resourcegroup_name {}
-variable azure_location {}
-variable vnet_name {}
-variable vnet_cidr_block {}
+variable "securitygroup_name" {}
+variable "resourcegroup_name" {}
+variable "azure_location" {}
+variable "vnet_name" {}
+variable "vnet_cidr_block" {}
 
 
 resource "azurerm_virtual_network" "main" {
diff --git a/terraform/azure/environments/resourcegroup/rg.tf b/terraform/azure/environments/resourcegroup/rg.tf
index fa8df5f3..96e1f465 100755
--- a/terraform/azure/environments/resourcegroup/rg.tf
+++ b/terraform/azure/environments/resourcegroup/rg.tf
@@ -1,6 +1,6 @@
-variable azure_location {}
-variable resourcegroup_tag {}
-variable resourcegroup_name {}
+variable "azure_location" {}
+variable "resourcegroup_tag" {}
+variable "resourcegroup_name" {}
 
 
 resource "azurerm_resource_group" "resource_group" {
diff --git a/terraform/azure/environments/security/security.tf b/terraform/azure/environments/security/security.tf
index 11e4aaae..d21502a3 100755
--- a/terraform/azure/environments/security/security.tf
+++ b/terraform/azure/environments/security/security.tf
@@ -1,7 +1,7 @@
-variable securitygroup_name {}
-variable resourcegroup_name {}
-variable azure_location {}
-variable project_tag {}
+variable "securitygroup_name" {}
+variable "resourcegroup_name" {}
+variable "azure_location" {}
+variable "project_tag" {}
 
 resource "azurerm_network_security_group" "main" {
   name                = var.securitygroup_name
diff --git a/terraform/azure/environments/storageaccount/storageaccount.tf b/terraform/azure/environments/storageaccount/storageaccount.tf
index 704d52a4..f980f0a6 100755
--- a/terraform/azure/environments/storageaccount/storageaccount.tf
+++ b/terraform/azure/environments/storageaccount/storageaccount.tf
@@ -1,8 +1,8 @@
-variable storageaccount_name {}
-variable storagecontainer_name {}
-variable resourcegroup_name {}
-variable azure_location {}
-variable project_tags {}
+variable "storageaccount_name" {}
+variable "storagecontainer_name" {}
+variable "resourcegroup_name" {}
+variable "azure_location" {}
+variable "project_tags" {}
 
 
 resource "azurerm_storage_account" "storage" {
diff --git a/terraform/azure/environments/storagecontainer/storagecontainer.tf b/terraform/azure/environments/storagecontainer/storagecontainer.tf
index 5b8b51cd..c44cc59c 100755
--- a/terraform/azure/environments/storagecontainer/storagecontainer.tf
+++ b/terraform/azure/environments/storagecontainer/storagecontainer.tf
@@ -1,5 +1,5 @@
-variable storageaccount_name {}
-variable storagecontainer_name {}
+variable "storageaccount_name" {}
+variable "storagecontainer_name" {}
 
 
 resource "azurerm_storage_container" "container" {
diff --git a/terraform/azure/environments/vm/outputs.tf b/terraform/azure/environments/vm/outputs.tf
index f21fe9f8..bd35e384 100755
--- a/terraform/azure/environments/vm/outputs.tf
+++ b/terraform/azure/environments/vm/outputs.tf
@@ -1,16 +1,33 @@
-resource "local_file" "AnsiblePEMYamlInventory" {
-  count    = var.instance_count
-  filename = var.ansible_pem_inventory_yaml_filename
+resource "local_file" "AnsibleYamlInventory" {
+  filename = var.ansible_inventory_yaml_filename
   content  = <<EOT
 ---
-servers:
-  %{for count in range(var.instance_count)~}
-%{if var.pem_instance_count == "1" && count == 0}pemserver:%{endif}%{if var.pem_instance_count == "0" || var.pem_instance_count == "1" && count == 1}primary${count}:%{endif}%{if count > 1}standby${count}:%{endif}
-    node_type: %{if var.pem_instance_count == "1" && count == 0}pemserver%{endif}%{if var.pem_instance_count == "0" || count == 1}primary%{endif}%{if count > 1}standby%{endif}    
-    public_ip: ${azurerm_public_ip.publicip[count].ip_address}
-    private_ip: ${azurerm_network_interface.Public_Nic[count].private_ip_address}
-    %{if count > 1}replication_type: ${var.synchronicity}%{endif}
-    %{if count > 0}pem_agent: true%{endif}
+all:
+  children:
+%{if var.pem_instance_count == 1}
+    pemserver:
+      hosts:
+        pemserver1:
+          ansible_host: ${azurerm_public_ip.all_public_ip[var.pg_instance_count].ip_address}
+          private_ip: ${azurerm_network_interface.all_public_nic[var.pg_instance_count].private_ip_address}%{endif}
+  %{for count in range(var.pg_instance_count)~}
+%{if count == 0}
+    primary:
+      hosts:
+        primary${count + 1}:%{endif}
+%{if count == 1}
+    standby:
+      hosts:%{endif}
+%{if count > 0}
+        standby${count}:%{endif}
+          ansible_host: ${azurerm_public_ip.all_public_ip[count].ip_address}
+          private_ip: ${azurerm_network_interface.all_public_nic[count].private_ip_address}
+%{if count > 0}
+          replication_type: ${var.synchronicity}
+          upstream_node_private_ip: ${azurerm_network_interface.all_public_nic[0].private_ip_address}%{endif}
+%{if var.pem_instance_count == 1}
+          pem_agent: true
+          pem_server_private_ip: ${azurerm_network_interface.all_public_nic[var.pg_instance_count].private_ip_address}%{endif}
   %{endfor~}
 EOT
 }
@@ -29,9 +46,13 @@ resource "local_file" "host_script" {
 echo "Setting SSH Keys"
 ssh-add ${var.ssh_key_path}
 echo "Adding IPs"
-%{for count in range(var.instance_count)~}
-ssh-keyscan -H ${azurerm_public_ip.publicip[count].ip_address} >> ~/.ssh/known_hosts
-ssh-keygen -f ~/.ssh/known_hosts -R ${azurerm_public_ip.publicip[count].ip_address}
-%{endfor~}    
+%{for count in range(var.pg_instance_count)~}
+ssh-keyscan -H ${azurerm_public_ip.all_public_ip[count].ip_address} >> ~/.ssh/known_hosts
+ssh-keygen -f ~/.ssh/known_hosts -R ${azurerm_public_ip.all_public_ip[count].ip_address}
+%{endfor~}
+%{if var.pem_instance_count == 1}
+ssh-keyscan -H ${azurerm_public_ip.all_public_ip[var.pg_instance_count].ip_address} >> ~/.ssh/known_hosts
+ssh-keygen -f ~/.ssh/known_hosts -R ${azurerm_public_ip.all_public_ip[var.pg_instance_count].ip_address}
+%{endif}
     EOT
 }
diff --git a/terraform/azure/environments/vm/setup_volumes.sh b/terraform/azure/environments/vm/setup_volumes.sh
new file mode 100644
index 00000000..4391a59d
--- /dev/null
+++ b/terraform/azure/environments/vm/setup_volumes.sh
@@ -0,0 +1,39 @@
+#!/bin/bash
+for i in {c..g}
+do
+    DEVNAME="sd${i}"
+    case "${i}" in
+      c)
+        VOLNAME="pgdata"
+        ;;
+      d)
+        VOLNAME="pgwal"
+        ;;
+      e)
+        CURRVOL="1"
+        VOLNAME="pgtblspc${CURRVOL}"
+        ;;
+      f)
+        CURRVOL="2"
+        VOLNAME="pgtblspc${CURRVOL}"
+        ;;
+      g)
+        CURRVOL="3"
+        VOLNAME="pgtblspc${CURRVOL}"
+        ;;
+    esac
+    CMD=$(sudo lsblk | sudo grep "${DEVNAME}" | wc -l)
+    if [[ "${CMD}" > 0 ]]
+    then
+        sudo mkfs -F -t ext4 "/dev/${DEVNAME}"
+        sudo mkdir "/${VOLNAME}"
+        sudo mount -t ext4 "/dev/${DEVNAME}" "/${VOLNAME}"
+        CMD=$(sudo grep "${DEVNAME}" /etc/fstab | wc -l)
+        if [[ "${CMD}" < 1 ]]
+        then
+            echo "/dev/${DEVNAME} /${VOLNAME} auto noatime 0 0" | sudo tee -a /etc/fstab
+        fi
+        sleep 5
+    fi
+done
+sudo mount -a
\ No newline at end of file
diff --git a/terraform/azure/environments/vm/vm.tf b/terraform/azure/environments/vm/vm.tf
index f476d0f7..bbef795b 100755
--- a/terraform/azure/environments/vm/vm.tf
+++ b/terraform/azure/environments/vm/vm.tf
@@ -1,33 +1,42 @@
-variable instance_size {}
-variable instance_count {}
-variable pem_instance_count {}
-variable synchronicity {}
-variable cluster_name {}
-variable vnet_name {}
-variable resourcegroup_name {}
-variable securitygroup_name {}
-variable azure_location {}
-variable ssh_key_path {}
-variable project_tags {}
-variable publisher {}
-variable offer {}
-variable sku {}
-variable admin_username {}
-variable ansible_pem_inventory_yaml_filename {}
-variable os_csv_filename {}
-variable add_hosts_filename {}
-
-
-resource "azurerm_subnet" "subnet" {
-  count                = var.instance_count
+variable "instance_size" {}
+variable "pg_instance_count" {
+  type = number
+}
+variable "pem_instance_count" {
+  type = number
+}
+variable "instance_disktype" {}
+variable "vm_manageddisk_count" {}
+variable "vm_manageddisk_volume_size" {}
+variable "vm_manageddisk_disktype" {}
+variable "synchronicity" {}
+variable "cluster_name" {}
+variable "vnet_name" {}
+variable "resourcegroup_name" {}
+variable "securitygroup_name" {}
+variable "azure_location" {}
+variable "ssh_key_path" {}
+variable "full_private_ssh_key_path" {}
+variable "project_tags" {}
+variable "publisher" {}
+variable "offer" {}
+variable "sku" {}
+variable "admin_username" {}
+variable "ansible_inventory_yaml_filename" {}
+variable "os_csv_filename" {}
+variable "add_hosts_filename" {}
+
+
+resource "azurerm_subnet" "all_subnet" {
+  count                = var.pg_instance_count + var.pem_instance_count
   name                 = format("%s-%s-%s", var.cluster_name, "EDB-PREREQS-SUBNET", count.index)
   resource_group_name  = var.resourcegroup_name
   virtual_network_name = var.vnet_name
   address_prefix       = "10.0.${count.index}.0/24"
 }
 
-resource "azurerm_public_ip" "publicip" {
-  count               = var.instance_count
+resource "azurerm_public_ip" "all_public_ip" {
+  count               = var.pg_instance_count + var.pem_instance_count
   name                = format("%s-%s-%s", var.cluster_name, "EDB-PREREQS-PUBLIC-IP", count.index)
   location            = var.azure_location
   resource_group_name = var.resourcegroup_name
@@ -38,30 +47,32 @@ resource "azurerm_public_ip" "publicip" {
   #}
 }
 
-resource "azurerm_network_interface" "Public_Nic" {
-  count               = var.instance_count
+resource "azurerm_network_interface" "all_public_nic" {
+  count               = var.pg_instance_count + var.pem_instance_count
   name                = format("%s-%s-%s", var.cluster_name, "EDB-PREREQS-PUBLIC-NIC", count.index)
   resource_group_name = var.resourcegroup_name
   location            = var.azure_location
 
   ip_configuration {
     name      = "Private_Nic_${count.index}"
-    subnet_id = element(azurerm_subnet.subnet.*.id, count.index)
+    subnet_id = element(azurerm_subnet.all_subnet.*.id, count.index)
 
     private_ip_address_allocation = "Dynamic"
-    public_ip_address_id          = element(azurerm_public_ip.publicip.*.id, count.index)
+    public_ip_address_id          = element(azurerm_public_ip.all_public_ip.*.id, count.index)
 
   }
 }
 
-resource "azurerm_linux_virtual_machine" "vm" {
-  count                 = var.instance_count
-  name                  = (var.pem_instance_count == "1" && count.index == 0 ? format("%s-%s", var.cluster_name, "pemserver") : (var.pem_instance_count == "0" && count.index == 1 ? format("%s-%s", var.cluster_name, "primary") : (count.index > 1 ? format("%s-%s%s", var.cluster_name, "standby", count.index) : format("%s-%s%s", var.cluster_name, "primary", count.index))))
-  resource_group_name   = var.resourcegroup_name
-  location              = var.azure_location
-  size                  = var.instance_size
-  admin_username        = var.admin_username
-  network_interface_ids = [element(azurerm_network_interface.Public_Nic.*.id, count.index)]
+resource "azurerm_linux_virtual_machine" "pg_server" {
+  count               = var.pg_instance_count
+  name                = (count.index == 0 ? format("%s-%s", var.cluster_name, "primary") : format("%s-%s%s", var.cluster_name, "standby", count.index))
+  resource_group_name = var.resourcegroup_name
+  location            = var.azure_location
+
+  size           = var.instance_size
+  admin_username = var.admin_username
+
+  network_interface_ids = [element(azurerm_network_interface.all_public_nic.*.id, count.index)]
 
   admin_ssh_key {
     username   = var.admin_username
@@ -81,10 +92,110 @@ resource "azurerm_linux_virtual_machine" "vm" {
   }
 
   os_disk {
-    name                 = format("%s-%s-%s", var.cluster_name, "EDB-VM-OS-Disk", count.index)
-    storage_account_type = "Standard_LRS"
+    name                 = format("pg-%s-%s-%s", var.cluster_name, "EDB-VM-OS-Disk", count.index)
+    storage_account_type = var.instance_disktype
     caching              = "ReadWrite"
   }
 
   tags = var.project_tags
 }
+
+resource "azurerm_managed_disk" "pg_managed_disk" {
+  count                = var.pg_instance_count * var.vm_manageddisk_count
+  name                 = format("pg-%s-%s-%s", var.cluster_name, "VM", count.index)
+  resource_group_name  = var.resourcegroup_name
+  location             = var.azure_location
+  storage_account_type = var.vm_manageddisk_disktype
+  create_option        = "Empty"
+  disk_size_gb         = var.vm_manageddisk_volume_size
+  tags                 = var.project_tags
+}
+
+resource "azurerm_virtual_machine_data_disk_attachment" "pg_managed_disk_attachment" {
+  count              = var.pg_instance_count * var.vm_manageddisk_count
+  managed_disk_id    = azurerm_managed_disk.pg_managed_disk.*.id[count.index]
+  virtual_machine_id = azurerm_linux_virtual_machine.pg_server.*.id[ceil((count.index + 1) * 1.0 / var.vm_manageddisk_count) - 1]
+  lun                = count.index + 10
+  caching            = "ReadWrite"
+
+  provisioner "remote-exec" {
+    inline = ["touch ~/test.txt"]
+
+    connection {
+      type = "ssh"
+      user = var.admin_username
+      host = element(azurerm_public_ip.all_public_ip.*.ip_address, floor(count.index / var.vm_manageddisk_count))
+
+      private_key = file(var.full_private_ssh_key_path)
+    }
+  }
+}
+
+// PEM Server
+resource "azurerm_linux_virtual_machine" "pem_server" {
+  count               = var.pem_instance_count
+  name                = format("%s-%s", var.cluster_name, "pemserver")
+  resource_group_name = var.resourcegroup_name
+  location            = var.azure_location
+
+  size           = var.instance_size
+  admin_username = var.admin_username
+
+  network_interface_ids = [element(azurerm_network_interface.all_public_nic.*.id, var.pg_instance_count + count.index)]
+
+  admin_ssh_key {
+    username   = var.admin_username
+    public_key = file(var.ssh_key_path)
+  }
+
+  identity {
+    type = "SystemAssigned"
+  }
+
+  source_image_reference {
+    publisher = var.publisher
+    offer     = var.offer
+    sku       = var.sku
+
+    version = "latest"
+  }
+
+  os_disk {
+    name                 = format("pem-%s-%s-%s", var.cluster_name, "EDB-VM-OS-Disk", var.pg_instance_count + count.index)
+    storage_account_type = var.instance_disktype
+    caching              = "ReadWrite"
+  }
+
+  tags = var.project_tags
+}
+
+resource "azurerm_managed_disk" "pem_managed_disk" {
+  count                = var.pem_instance_count * var.vm_manageddisk_count
+  name                 = format("pem-%s-%s-%s", var.cluster_name, "VM", count.index)
+  resource_group_name  = var.resourcegroup_name
+  location             = var.azure_location
+  storage_account_type = var.vm_manageddisk_disktype
+  create_option        = "Empty"
+  disk_size_gb         = var.vm_manageddisk_volume_size
+  tags                 = var.project_tags
+}
+
+resource "azurerm_virtual_machine_data_disk_attachment" "pem_managed_disk_attachment" {
+  count              = var.pem_instance_count * var.vm_manageddisk_count
+  managed_disk_id    = azurerm_managed_disk.pem_managed_disk.*.id[count.index]
+  virtual_machine_id = azurerm_linux_virtual_machine.pem_server.*.id[ceil((count.index + 1) * 1.0 / var.vm_manageddisk_count) - 1]
+  lun                = count.index + 10
+  caching            = "ReadWrite"
+
+  provisioner "remote-exec" {
+    inline = ["touch ~/test.txt"]
+
+    connection {
+      type = "ssh"
+      user = var.admin_username
+      host = element(azurerm_public_ip.all_public_ip.*.ip_address, var.pg_instance_count + floor(count.index / var.vm_manageddisk_count))
+
+      private_key = file(var.full_private_ssh_key_path)
+    }
+  }
+}
diff --git a/terraform/azure/main.tf b/terraform/azure/main.tf
index 05afc3dc..22fa3172 100755
--- a/terraform/azure/main.tf
+++ b/terraform/azure/main.tf
@@ -54,8 +54,12 @@ module "vm" {
   source = "./environments/vm"
 
   instance_size                       = var.instance_size
-  instance_count                      = var.instance_count
+  pg_instance_count                   = var.pg_instance_count
+  instance_disktype                   = var.instance_disktype
   pem_instance_count                  = var.pem_instance_count
+  vm_manageddisk_count                = var.vm_manageddisk_count
+  vm_manageddisk_volume_size          = var.vm_manageddisk_volume_size
+  vm_manageddisk_disktype             = var.vm_manageddisk_disktype
   synchronicity                       = var.synchronicity
   cluster_name                        = var.cluster_name
   vnet_name                           = var.vnet_name
@@ -63,12 +67,13 @@ module "vm" {
   securitygroup_name                  = var.securitygroup_name
   azure_location                      = var.azure_location
   ssh_key_path                        = var.ssh_key_path
+  full_private_ssh_key_path           = var.full_private_ssh_key_path
   project_tags                        = var.project_tags
   publisher                           = var.publisher
   offer                               = var.offer
   sku                                 = var.sku
   admin_username                      = var.admin_username
-  ansible_pem_inventory_yaml_filename = var.ansible_pem_inventory_yaml_filename
+  ansible_inventory_yaml_filename     = var.ansible_inventory_yaml_filename
   os_csv_filename                     = var.os_csv_filename
   add_hosts_filename                  = var.add_hosts_filename
 
diff --git a/terraform/azure/playbook/hosts.yml b/terraform/azure/playbook/hosts.yml
deleted file mode 100755
index a6223aee..00000000
--- a/terraform/azure/playbook/hosts.yml
+++ /dev/null
@@ -1,28 +0,0 @@
----
-servers:
-  pemserver:
-    node_type: pemserver
-    public_dns: ec2-34-222-170-188.us-west-2.compute.amazonaws.com
-    public_ip: 34.222.170.188
-    private_ip: 10.0.2.19
-  primary1:
-    node_type: primary
-    public_dns: ec2-54-186-149-203.us-west-2.compute.amazonaws.com
-    public_ip: 54.186.149.203
-    private_ip: 10.0.0.154
-    replication_type: asynchronous
-    pem_agent: true
-  standby2:
-    node_type: standby
-    public_dns: ec2-34-220-80-230.us-west-2.compute.amazonaws.com
-    public_ip: 34.220.80.230
-    private_ip: 10.0.1.218
-    replication_type: asynchronous
-    pem_agent: true
-  standby3:
-    node_type: standby
-    public_dns: ec2-44-235-74-131.us-west-2.compute.amazonaws.com
-    public_ip: 44.235.74.131
-    private_ip: 10.0.3.43
-    replication_type: asynchronous
-    pem_agent: true
diff --git a/terraform/azure/playbook/playbook.yml b/terraform/azure/playbook/playbook.yml
deleted file mode 100644
index fb884b05..00000000
--- a/terraform/azure/playbook/playbook.yml
+++ /dev/null
@@ -1,78 +0,0 @@
----
-- hosts: localhost
-  name: Configure Postgres SQL Replication on Instances
-  become: true
-  gather_facts: no
-
-  # When using collections
-  collections:
-      - edb_devops.edb_postgres
-
-  vars_files:
-    - hosts.yml
-
-  #initializing internal variables
-  vars:
-      PEM_SERVER_PRIVATE_IP: ""
-      PRIMARY_PRIVATE_IP: ""
-      PRIMARY_PUBLIC_IP: ""
-      STANDBY_NAMES: []
-      ALL_NODE_IPS: []
-      EFM_NODES_PRIVATE_IP: []
-      EFM_NODES_PUBLIC_IP: []
-
-  pre_tasks:
-      - name: Initialize the user defined variables
-        set_fact:
-            OS: "CentOS7"
-            PG_VERSION: "12"
-            PG_TYPE: "PG"
-            PG_DATA: "/data/pgdata"
-            PG_WAL: "/data/pg_wal"
-            STANDBY_QUORUM_TYPE: "ANY" # Quorum type can be ANY or FIRST
-
-            # This is internal variables processing please do not modify
-            ALL_NODE_IPS: "{{ ALL_NODE_IPS + [item.value.private_ip] }}"
-            PRIMARY_PRIVATE_IP: "{{ PRIMARY_PRIVATE_IP + item.value.private_ip if(item.value.node_type == 'primary') else PRIMARY_PRIVATE_IP }}"
-            PRIMARY_PUBLIC_IP: "{{ PRIMARY_PUBLIC_IP  + item.value.public_ip if(item.value.node_type == 'primary') else PRIMARY_PUBLIC_IP }}"
-            PEM_SERVER_PRIVATE_IP: "{{ PEM_SERVER_PRIVATE_IP + item.value.private_ip if(item.value.node_type == 'pemserver') else PEM_SERVER_PRIVATE_IP }}"
-        with_dict: "{{ servers }}"
-
-      - name: Gather primary and standby nodes for EFM
-        set_fact:
-            EFM_NODES_PRIVATE_IP: "{{ EFM_NODES_PRIVATE_IP + [item.value.private_ip] }}"
-            EFM_NODES_PUBLIC_IP: "{{ EFM_NODES_PUBLIC_IP + [item.value.public_ip] }}"
-        when: item.value.node_type in ['primary', 'standby']
-        with_dict: "{{ servers }}"
-
-      - name: Gather the standby names
-        set_fact:
-            STANDBY_NAMES: "{{ STANDBY_NAMES + [item.key] }}"
-        when: item.value.node_type == 'standby'
-        with_dict: "{{ servers }}"
-
-  tasks:
-    - name: Iterate through repo role with items from hosts file
-      include_role:
-        name: setup_repo
-      with_dict: "{{ servers }}"
-    - name: Iterate through install role with items from hosts file
-      include_role:
-        name: install_dbserver
-      with_dict: "{{ servers }}"
-    - name: Iterate through initialize role with items from hosts file
-      include_role:
-        name: init_dbserver
-      with_dict: "{{ servers }}"
-    - name: Iterate through replication role with items from hosts file
-      include_role:
-        name: setup_replication
-      with_dict: "{{ servers }}"
-    - name: Iterate through efm install role with items from hosts file
-      include_role:
-        name: setup_efm
-      with_dict: "{{ servers }}"
-    - name: Iterate through pem install role with items from hosts file
-      include_role:
-        name: setup_pem
-      with_dict: "{{ servers }}"
diff --git a/terraform/azure/sqlexec/hosts.yml b/terraform/azure/sqlexec/hosts.yml
deleted file mode 100755
index 42249943..00000000
--- a/terraform/azure/sqlexec/hosts.yml
+++ /dev/null
@@ -1,9 +0,0 @@
----
-hosts:
-  master:
-    node_type: master
-    private_ip: xxx.xxx.xxx
-    public_ip: xxx.xxx.xxx
-    database: postgres
-    pgdbuser: postgres
-    dbpassword: postgres
diff --git a/terraform/azure/sqlexec/playbook.yml b/terraform/azure/sqlexec/playbook.yml
deleted file mode 100755
index b7724fae..00000000
--- a/terraform/azure/sqlexec/playbook.yml
+++ /dev/null
@@ -1,22 +0,0 @@
----
-- hosts: localhost 
-  name: Execute SQL Statements on Postgres SQL Cluster
-  connection: local
-  become: true
-  gather_facts: yes
-  #ignore_errors: yes
-  
-  vars_files:
-    - /home/dortiz/hosts-sql.yml
-
-  pre_tasks:
-    - set_fact:
-        OS: OS
-        PG_VERSION: PG_VERSION
-      with_dict: "{{ hosts }}"
-
-  tasks:
-    - name: Iterate through role with items from hosts file
-      include_role:
-        name: edb.postgres.sqlexec
-      with_dict: "{{ hosts }}"
diff --git a/terraform/azure/sqlexec/roles/edb.postgres.sqlexec/.travis.yml b/terraform/azure/sqlexec/roles/edb.postgres.sqlexec/.travis.yml
deleted file mode 100755
index 36bbf620..00000000
--- a/terraform/azure/sqlexec/roles/edb.postgres.sqlexec/.travis.yml
+++ /dev/null
@@ -1,29 +0,0 @@
----
-language: python
-python: "2.7"
-
-# Use the new container infrastructure
-sudo: false
-
-# Install ansible
-addons:
-  apt:
-    packages:
-    - python-pip
-
-install:
-  # Install ansible
-  - pip install ansible
-
-  # Check ansible version
-  - ansible --version
-
-  # Create ansible.cfg with correct roles_path
-  - printf '[defaults]\nroles_path=../' >ansible.cfg
-
-script:
-  # Basic role syntax check
-  - ansible-playbook tests/test.yml -i tests/inventory --syntax-check
-
-notifications:
-  webhooks: https://galaxy.ansible.com/api/v1/notifications/
\ No newline at end of file
diff --git a/terraform/azure/sqlexec/roles/edb.postgres.sqlexec/README.md b/terraform/azure/sqlexec/roles/edb.postgres.sqlexec/README.md
deleted file mode 100755
index 2e99fd3b..00000000
--- a/terraform/azure/sqlexec/roles/edb.postgres.sqlexec/README.md
+++ /dev/null
@@ -1,65 +0,0 @@
-edb.postgres.sqlexec
-=========
-
-This Ansible Galaxy Role Executes SQL Statements for Postgres versions: 10, 11 and 12 on EC2 Instances previously configured on AWS.
-
-Requirements
-------------
-
-The dependencies that are required prior to executing this role are:
-1. 01-prereqs
-2. 02-cluster
-3. 03-install
-4. 04-replication
-
-Role Variables
---------------
-
-When executing the role via ansible there are two required variables:
-* OS
-* PG_VERSION
-
-Dependencies
-------------
-
-The edb.postgres.sqlexec role does not have any dependencies on any other roles.
-
-Example Playbook
-----------------
-
-Below is an example of how to use the: edb.postgres.sqlexec role:
-
-    - hosts: localhost
-      name: Execute SQL Statements on Postgres SQL Cluster
-      connection: local
-      become: true
-      gather_facts: yes
-
-      vars_files:
-        - hosts.yml
-
-      pre_tasks:
-        - set_fact:
-            OS: OS
-            PG_VERSION: PG_VERSION
-          with_dict: "{{ hosts }}"
- 
-      tasks:
-        - name: Iterate through role with items from hosts file
-          include_role:
-            name: edb.postgres.sqlexec
-          with_dict: "{{ hosts }}"
-
-License
--------
-
-BSD
-
-Author Information
-------------------
-
-Author: 
-* Doug Ortiz
-* EDB Postgres DevOps
-* doug.ortiz@enterprisedb.com
-* www.enterprisedb.com
diff --git a/terraform/azure/sqlexec/roles/edb.postgres.sqlexec/defaults/main.yml b/terraform/azure/sqlexec/roles/edb.postgres.sqlexec/defaults/main.yml
deleted file mode 100755
index ed97d539..00000000
--- a/terraform/azure/sqlexec/roles/edb.postgres.sqlexec/defaults/main.yml
+++ /dev/null
@@ -1,1 +0,0 @@
----
diff --git a/terraform/azure/sqlexec/roles/edb.postgres.sqlexec/meta/main.yml b/terraform/azure/sqlexec/roles/edb.postgres.sqlexec/meta/main.yml
deleted file mode 100755
index b1fe1939..00000000
--- a/terraform/azure/sqlexec/roles/edb.postgres.sqlexec/meta/main.yml
+++ /dev/null
@@ -1,54 +0,0 @@
----
-galaxy_info:
-  author: Doug Ortiz
-  description: Execution of SQL Statements on Postgres SQL Cluster
-  company: "EnterpriseDB"
-
-  # If the issue tracker for your role is not on github, uncomment the
-  # next line and provide a value
-  # issue_tracker_url: http://example.com/issue/tracker
-
-  # Choose a valid license ID from https://spdx.org - some suggested licenses:
-  # - BSD-3-Clause (default)
-  # - MIT
-  # - GPL-2.0-or-later
-  # - GPL-3.0-only
-  # - Apache-2.0
-  # - CC-BY-4.0
-  license: license (GPL-2.0-or-later, MIT, etc)
-
-  min_ansible_version: 2.8
-
-  # If this a Container Enabled role, provide the minimum Ansible Container version.
-  # min_ansible_container_version:
-
-  #
-  # Provide a list of supported platforms, and for each platform a list of versions.
-  # If you don't wish to enumerate all versions for a particular platform, use 'all'.
-  # To view available platforms and versions (or releases), visit:
-  # https://galaxy.ansible.com/api/v1/platforms/
-  #
-  platforms:
-    - name: CentOS
-      versions:
-        - 7
-    - name: Ubuntu
-      versions:
-        - xenial
-        - bionic
-        - focal
-    - name: Debian
-      versions:
-        - wheezy
-        - jessie
-        - stretch
-        - buster
-
-  galaxy_tags:
-    - database
-    - postgresql
-    - postgres
-    - edb
-    - postgresql_query
-
-dependencies: []
diff --git a/terraform/azure/sqlexec/roles/edb.postgres.sqlexec/tasks/SQLExec.yml b/terraform/azure/sqlexec/roles/edb.postgres.sqlexec/tasks/SQLExec.yml
deleted file mode 100755
index d6962612..00000000
--- a/terraform/azure/sqlexec/roles/edb.postgres.sqlexec/tasks/SQLExec.yml
+++ /dev/null
@@ -1,63 +0,0 @@
----
-- name: Display Details of Node to Configure
-  block:
-    - debug:
-        msg: 
-            "Operating System = {{ OS }}:
-             Postgres Version = {{ PG_VERSION }},
-             NODE_TYPE = {{ item.value.node_type }},
-             PRIVATE_IP = {{ item.value.private_ip }},
-             PUBLIC_IP= {{ item.value.public_ip }},
-             DATABASE = {{ item.value.database }},
-             PGDBUSER = {{ item.value.pgdbuser }},
-             PGDBPASSWORD = {{ item.value.pgdbpassword }}"
-
-- name: Drop Table if exists in Postgres DB
-  postgresql_query:
-    db: "{{ DATABASE }}"
-    login_user: "{{ PGDBUSER }}"
-    login_password: "{{ PGDBPASSWORD }}"
-    query: DROP TABLE IF EXISTS students
-  become_user: "{{ PGDBUSER }}"
-  become: yes
-  delegate_to: "{{ PUBLIC_IP }}"
-
-- name: Create Table in Postgres DB
-  postgresql_query:
-    db: "{{ DATABASE }}"
-    login_user: "{{ PGDBUSER }}"
-    login_password: "{{ PGDBPASSWORD }}"
-    query: CREATE TABLE students (name VARCHAR(100))
-  become_user: "{{ PGDBUSER }}"
-  become: yes
-  delegate_to: "{{ PUBLIC_IP }}"
-
-- name: Insert Record into students table in Postgres DB
-  postgresql_query:
-    db: "{{ DATABASE }}"
-    login_user: "{{ PGDBUSER }}"
-    login_password: "{{ PGDBPASSWORD }}"
-    query: INSERT INTO students VALUES ('test')
-  become_user: "{{ PGDBUSER }}"
-  become: yes
-  delegate_to: "{{ PUBLIC_IP }}"
-
-- name: Select query to Postgres DB
-  postgresql_query:
-    db: "{{ DATABASE }}"
-    login_user: "{{ PGDBUSER }}"
-    login_password: "{{ PGDBPASSWORD }}"
-    query: SELECT * FROM students
-  become_user: "{{ PGDBUSER }}"
-  become: yes
-  delegate_to: "{{ PUBLIC_IP }}"
-
-- name: Drop Table students in Postgres DB
-  postgresql_query:
-    db: "{{ DATABASE }}"
-    login_user: "{{ PGDBUSER }}"
-    login_password: "{{ PGDBPASSWORD }}"
-    query: DROP TABLE students
-  become_user: "{{ PGDBUSER }}"
-  become: yes
-  delegate_to: "{{ PUBLIC_IP }}"
diff --git a/terraform/azure/sqlexec/roles/edb.postgres.sqlexec/tasks/main.yml b/terraform/azure/sqlexec/roles/edb.postgres.sqlexec/tasks/main.yml
deleted file mode 100755
index b5cefa2e..00000000
--- a/terraform/azure/sqlexec/roles/edb.postgres.sqlexec/tasks/main.yml
+++ /dev/null
@@ -1,64 +0,0 @@
----
-# Tasks file for edb.postgres.sqlexec Role
-
-- name: Display details of Node to Configure
-  block:
-    - debug:
-        msg: 
-             "NODE_TYPE = {{ item.value.node_type }}:
-             PRIVATE_IP = {{ item.value.private_ip }},
-             PUBLIC_IP = {{ item.value.public_ip }},
-             DATABASE = {{ item.value.database }},
-             PGDBUSER = {{ item.value.pgdbuser }},
-             PGDBPASSWORD = {{ item.value.pgdbpassword }}"
-
-# Setting variables available in all nodes
-- name: Set Node Type
-  set_fact:
-    NODE_TYPE: "{{ item.value.node_type }}"
-  register: output
-
-- name: Set Private IP
-  set_fact:
-    PRIVATE_IP: "{{ item.value.private_ip }}"
-  register: output
-
-- name: Set Public IP Address
-  set_fact:
-    PUBLIC_IP: "{{ item.value.public_ip }}"
-  register: output
-
-- name: Set Database
-  set_fact:
-    DATABASE: "{{ item.value.database }}"
-  register: output
-  when: item.value.node_type == 'master'
-
-- name: Set PGDBUSER
-  set_fact:
-    PGDBUSER: "{{ item.value.pgdbuser }}"
-  register: output
-  when: item.value.node_type == 'master'
-
-- name: Set PGDBPASSWORD
-  set_fact:
-    PGDBPASSWORD: "{{ item.value.pgdbpassword }}"
-  register: output
-  when: item.value.node_type == 'master'
-
-# Install Packages before any tasks are executed
-- name: Install psycopg2 Package PreRequisite
-  yum:
-    name: "{{ packages }}"
-  vars:
-    packages:
-      - python-psycopg2
-    state:
-      present
-  become: yes
-  delegate_to: "{{ PUBLIC_IP }}"
-
-# Postgres12 Master
-- include_tasks: SQLExec.yml
-  #when: ansible_os_family == 'Debian'
-  when: item.value.node_type == 'master'
diff --git a/terraform/azure/sqlexec/roles/edb.postgres.sqlexec/tasks/variables.yml b/terraform/azure/sqlexec/roles/edb.postgres.sqlexec/tasks/variables.yml
deleted file mode 100755
index ab3e7860..00000000
--- a/terraform/azure/sqlexec/roles/edb.postgres.sqlexec/tasks/variables.yml
+++ /dev/null
@@ -1,55 +0,0 @@
----
-# Configuration
-- name: Include OS-specific variables (Debian).
-  include_vars: "{{ ansible_distribution }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
-  when: ansible_distribution == 'Debian'
-
-- name: Include OS-specific variables (RedHat).
-  include_vars: "{{ ansible_os_family }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
-  when:
-  - ansible_os_family == 'RedHat'
-  - ansible_distribution != 'Fedora'
-
-- name: Include OS-specific variables (Fedora).
-  include_vars: "{{ ansible_distribution }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
-  when: ansible_distribution == 'Fedora'
-
-- name: Include OS-specific variables (Ubuntu).
-  include_vars: "{{ ansible_distribution }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
-  when: ansible_distribution == 'Ubuntu'
-
-- name: Define postgresql_packages.
-  set_fact:
-    postgresql_packages: "{{ __postgresql_packages | list }}"
-  when: postgresql_packages is not defined
-
-- name: Define postgresql_version.
-  set_fact:
-    postgresql_version: "{{ __postgresql_version }}"
-  when: postgresql_version is not defined
-
-- name: Define postgresql_daemon.
-  set_fact:
-    postgresql_daemon: "{{ __postgresql_daemon }}"
-  when: postgresql_daemon is not defined
-
-- name: Define postgresql_data_dir.
-  set_fact:
-    postgresql_data_dir: "{{ __postgresql_data_dir }}"
-  when: postgresql_data_dir is not defined
-
-- name: Define postgresql_bin_path.
-  set_fact:
-    postgresql_bin_path: "{{ __postgresql_bin_path }}"
-  when: postgresql_bin_path is not defined
-
-- name: Define postgresql_config_path.
-  set_fact:
-    postgresql_config_path: "{{ __postgresql_config_path }}"
-  when: postgresql_config_path is not defined
-
-- name: Define postgresql_unix_socket_directories_mode.
-  set_fact:
-    postgresql_unix_socket_directories_mode: >-
-      {{ __postgresql_unix_socket_directories_mode | default('02775') }}
-  when: postgresql_unix_socket_directories_mode is not defined
diff --git a/terraform/azure/sqlexec/roles/edb.postgres.sqlexec/vars/CentOS7.yml b/terraform/azure/sqlexec/roles/edb.postgres.sqlexec/vars/CentOS7.yml
deleted file mode 100755
index 5248b1b3..00000000
--- a/terraform/azure/sqlexec/roles/edb.postgres.sqlexec/vars/CentOS7.yml
+++ /dev/null
@@ -1,12 +0,0 @@
----
-__postgresql_version: "11"
-__postgresql_data_dir: "/var/lib/postgresql/{{ __postgresql_version }}/main"
-__postgresql_bin_path: "/usr/lib/postgresql/{{ __postgresql_version }}/bin"
-__postgresql_config_path: "/usr/lib/postgresql/{{ __postgresql_version }}/main"
-__postgresql_daemon: "postgresql@{{ postgresql_version }}-main"
-__postgresql_packages:
-  - postgresql
-  - postgresql-contrib
-  - libpq-dev
-# Python 3
-postgresql_python_library: python3-psycopg2
diff --git a/terraform/azure/sqlexec/roles/edb.postgres.sqlexec/vars/Debian-10.yml b/terraform/azure/sqlexec/roles/edb.postgres.sqlexec/vars/Debian-10.yml
deleted file mode 100755
index 5248b1b3..00000000
--- a/terraform/azure/sqlexec/roles/edb.postgres.sqlexec/vars/Debian-10.yml
+++ /dev/null
@@ -1,12 +0,0 @@
----
-__postgresql_version: "11"
-__postgresql_data_dir: "/var/lib/postgresql/{{ __postgresql_version }}/main"
-__postgresql_bin_path: "/usr/lib/postgresql/{{ __postgresql_version }}/bin"
-__postgresql_config_path: "/usr/lib/postgresql/{{ __postgresql_version }}/main"
-__postgresql_daemon: "postgresql@{{ postgresql_version }}-main"
-__postgresql_packages:
-  - postgresql
-  - postgresql-contrib
-  - libpq-dev
-# Python 3
-postgresql_python_library: python3-psycopg2
diff --git a/terraform/azure/sqlexec/roles/edb.postgres.sqlexec/vars/Ubuntu-18.yml b/terraform/azure/sqlexec/roles/edb.postgres.sqlexec/vars/Ubuntu-18.yml
deleted file mode 100755
index 9a9a065a..00000000
--- a/terraform/azure/sqlexec/roles/edb.postgres.sqlexec/vars/Ubuntu-18.yml
+++ /dev/null
@@ -1,11 +0,0 @@
----
-__postgresql_version: "12"
-__postgresql_data_dir: "/var/lib/postgresql/{{ __postgresql_version }}/main"
-__postgresql_bin_path: "/usr/lib/postgresql/{{ __postgresql_version }}/bin"
-__postgresql_config_path: "/etc/postgresql/{{ __postgresql_version }}/main"
-__postgresql_daemon: postgresql
-__postgresql_packages:
-  - postgresql
-  - postgresql-contrib
-  - libpq-dev
-postgresql_python_library: python3-psycopg2
diff --git a/terraform/azure/tags.tf b/terraform/azure/tags.tf
deleted file mode 100644
index 4fc0952c..00000000
--- a/terraform/azure/tags.tf
+++ /dev/null
@@ -1,55 +0,0 @@
-# Tags
-variable "project_tags" {
-  description = "A map of tags to add to all resources."
-  type        = map(string)
-  default = {
-    key = "c8mn_EDB_PREREQS_AZURE"
-  }
-}
-
-variable "project_tag" {
-  type    = string
-  default = "c8mn_EDB_PREREQS_AZURE_DEPLOYMENT"
-}
-
-# Storage
-variable "storageaccount_name" {
-  description = "Name of the bucket for storing related data of deployment"
-  type        = string
-  default     = "c8mnedbpostgres"
-}
-
-variable "storagecontainer_name" {
-  description = "Name of the bucket for storing related data of deployment"
-  type        = string
-  default     = "c8mnedbprereqsstoragecontainer"
-}
-
-# VNet
-variable "vnet_name" {
-  type    = string
-  default = "c8mn_EDB-PREREQS-VNet"
-}
-
-# Resource Group
-variable "resourcegroup_tag" {
-  default = "c8mn_EDB-PREREQS-RESOURCEGROUP"
-}
-
-variable "resourcegroup_name" {
-  default = "c8mn_EDB-PREREQS-RESOURCEGROUP"
-}
-
-# Subnets
-variable "subnet_name" {
-  default = "c8mn_EDB-PREREQS-PUBLIC-SUBNET"
-}
-
-variable "subnet_tag" {
-  default = "c8mn_EDB-PREREQS-PUBLIC-SUBNET"
-}
-
-# Security Group
-variable "securitygroup_name" {
-  default = "c8mn_EDB-PREREQS-SECURITYGROUP"
-}
diff --git a/terraform/azure/variables.tf b/terraform/azure/variables.tf
deleted file mode 100644
index f7661af7..00000000
--- a/terraform/azure/variables.tf
+++ /dev/null
@@ -1,90 +0,0 @@
-# Location
-variable "azure_location" {
-  type = string
-  # Examples: centralus, eastus, eastus2, westus, westcentralus, westus2, northcentralus, southcentralus
-  default = "westus2"
-}
-
-variable "vnet_cidr_block" {
-  description = "CIDR Block for the VNet"
-  default     = "10.0.0.0/16"
-}
-
-# Name of the Cluster
-variable "cluster_name" {
-  description = "The name to the cluster"
-  default     = "c8mnEDB"
-  type        = string
-}
-
-variable "ssh_key_path" {
-  type = string
-  # Utilize the id_rsa.pub generated by keygen
-  # Example: "~/.ssh/id_rsa.pub"
-  default = ""
-}
-
-# Instance Size
-variable "instance_size" {
-  default = "Standard_A1" 
-}
-
-# Count
-variable "instance_count" {
-  default = 1
-}
-
-
-# PEM Instance Count
-variable "pem_instance_count" {
-  default = 0
-}
-
-# Synchronicity
-variable "synchronicity" {
-  default = "asynchronous"
-}
-
-# Operating Systems Supported
-# CentOS7
-# publisher = "OpenLogic"
-# offer     = "Centos"
-# sku       = "7.7"
-# RHEL7
-# publisher = "RedHat"
-# offer     = "RHEL"
-# sku       = "7.8"
-variable publisher {
-  default = "OpenLogic"
-  #default = "RedHat"
-}
-
-variable offer {
-  default = "Centos"
-  #default = "RHEL"
-}
-
-variable sku {
-  default = "7.7"
-  #default = "7.8"
-}
-
-variable admin_username {
-  default = "centos"
-}
-
-# Ansible Yaml PEM Inventory Filename
-variable "ansible_pem_inventory_yaml_filename" {
-  default = "pem-inventory.yml"
-}
-
-# OS CSV Filename
-variable "os_csv_filename" {
-  default = "os.csv"
-}
-
-# Ansible Add Hosts Filename
-variable "add_hosts_filename" {
-  type    = string
-  default = "add_host.sh"
-}
diff --git a/terraform/azure/variables.tf.template b/terraform/azure/variables.tf.template
index 5dbc949e..c76b0356 100755
--- a/terraform/azure/variables.tf.template
+++ b/terraform/azure/variables.tf.template
@@ -24,22 +24,52 @@ variable "ssh_key_path" {
   default = ""
 }
 
+variable "full_private_ssh_key_path" {
+  description = "SSH private key path from local machine"
+  type        = string
+  # Example: "~/mypemfile.pem"
+  default = ""
+}
+
 # Instance Size
 variable "instance_size" {
-  default = "Standard_A1" 
+  default = "Standard_A1"
 }
 
 # Count
-variable "instance_count" {
-  default = 1
+variable "pg_instance_count" {
+  default = 3
 }
 
-
 # PEM Instance Count
 variable "pem_instance_count" {
   default = 0
 }
 
+# Primary Disk
+variable instance_disktype {
+   #default = "Standard_LRS"
+   default = "StandardSSD_LRS"
+   # Only available on current VM Sizes
+   #default = "Premium_LRS"
+}
+
+# Managed Disks
+variable vm_manageddisk_count {
+  default = 5
+}
+
+variable vm_manageddisk_volume_size {
+  default = 10
+}
+
+variable vm_manageddisk_disktype {
+   #default = "Standard_LRS"
+   default = "StandardSSD_LRS"
+   # Only available on current VM Sizes
+   #default = "Premium_LRS"
+}
+
 # Synchronicity
 variable "synchronicity" {
   default = "asynchronous"
@@ -73,9 +103,9 @@ variable admin_username {
   default = "centos"
 }
 
-# Ansible Yaml PEM Inventory Filename
-variable "ansible_pem_inventory_yaml_filename" {
-  default = "pem-inventory.yml"
+# Ansible Yaml Inventory Filename
+variable "ansible_inventory_yaml_filename" {
+  default = "inventory.yml"
 }
 
 # OS CSV Filename
diff --git a/terraform/gcloud/README.md b/terraform/gcloud/README.md
deleted file mode 100644
index 6e07c1a9..00000000
--- a/terraform/gcloud/README.md
+++ /dev/null
@@ -1,139 +0,0 @@
-# Getting Started
-Postgres Deployment scripts are an easy way to deploy Postgres and EDB Tools at no charge. It is a contribution by the EDB team members which can help people explore both Postgres and EDB tools. Users can interact via the git repository comments section. Feel free to leave comments there. However, these scripts are not officially supported by the EnterpriseDb Team.
-
-EnterpriseDb has the largest base of PostgreSQL experts available.
-
-Learn more about [Professional Support] (https://www.enterprisedb.com/services/ongoing-postgresql-help/postgresql-technical-support)
-
-The intention of this repository is as an introductory self starting guide.
-
-Before starting to delve into this repository, it is best to get familiar with the steps in the deployment process towards Amazon Web Services.
-
-## The overall process consists of the following steps:
-
-1. Set up Software Prerequisites
-   * Linux based Operating System
-   * Package dependencies installation are accomplished via bash script
-   * Google Cloud SDK installed via bash script
-   * Requires configuration of Google Cloud SDK for authentication
-2. Configure Google Cloud SDK with credentials
-3. Create Cloud Infrastructure Prerequisites Resources
-   * Performed by Terraform scripts in ```terraform/gcloud``` folder
-4. Setup Postgres or EnterpriseDB Postgres Advanced Server
-   * Performed by Ansible scripts in Ansible Galaxy downloaded collection: ```edb_devops.edb_postgres```
-5. Execute SQL Scripts
-   * Performed by Ansible scripts in ```sqlexec``` folder
-
-----
-### Software Prerequisites
-1. Terraform installed and configured
-2. Ansible installed and configured
-
-**Require Installation**
-
-* [Terraform Installation]  (https://learn.hashicorp.com/terraform/getting-started/install.html)
-  ![Terraform 0.13 Installation](../../demos/Terraform_0.13_Installation.gif)
-
-* [Ansible Installation] (https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html)
-
-### Prerequisites Setup
-##### Dependencies
-1. Vendor Cloud SDK ( AWS, GCP or Azure )
-2. Packages: curl and wget
-1. Terraform >= 0.13
-2. Ansible >= 2.9
-
-### Steps
-
-* Items to consider:
-  * The Operating Systems Images ( CentOS7 and RHEL7 ) are supported across the following Google Cloud Regions: 'us-central1','us-east1', 'us-east4', 'us-west1', 'us-west2', 'us-west3' and 'us-west4'
-  * A minimum of 3 instances is recommended
-
-* The bash scripts utilized in the scripts have been tested on:
-  * Red Hat 7
-  * CentOS 7
-  * Debian 9
-  * Ubuntu 20.04
-
-* Create your SSH Key or make it available for its reference
-  ![Create SSH Key](../../demos/KeyGen.gif)
-
-* The dependent packages are:
-  * curl, wget, curl, terraform and ansible
-  * An example script is provided that is located at: ```./lib/prereqs.sh```
-
-* A CLI or SDK depending on the Cloud vendor to utilize is required: 
-  * AWS - An example script is provided that is located at: ```./lib/aws-cli.sh```
-  * Azure - An example script is provided that is located at: ```./lib/azure-cli.sh```
-  * Google Cloud - An example script is provided that is located at: ```./lib/gcp-sdk.sh```
-
-* Configure the CLI or SDK
-  * AWS - ```aws configure``` and pressing **Enter** button
-  * Azure - ```az login``` and pressing **Enter** button
-  * Google Cloud - ```gcloud init``` and pressing **Enter** button 
-    
-* Download ```postgres-deployment``` github repo by clicking on the green **Code** button followed by clicking the **Download Zip** link
-
-* Extract the zip file to a desired destination
-
-* Copy the ```postgres-deployment.zip``` file to the desired target directory
-  
-* Extract the zip file to a desired destination by utilizing Archive Manager or by: typing ```unzip postgres-deployment.zip``` and pressing the **Enter** button
- 
-* Open the ```Terminal``` command line
-
-* Navigate to the extracted folder location and type: ```cd postgres-deployment``` finishing with pressing the **Enter** button
-
-* Type: ```./lib/keygen.sh``` and execute the bash script by pressing the **Enter** button.
-  ![SSH Key Generation](../../demos/KeyGen.gif)
-
-* Type: ```./edb-deployment``` and execute the command by pressing the **Enter** button. The subcommands below will be listed as options:
-
-```
-edb-deployment [<cloud>-server|<cloud>-postgres] [OPTION]...
-
-EDB deployment script for aws, azure and gcp
-
-Subcommands:
-    aws-server      [create|destroy]  PROJECT_NAME
-    azure-server    [create|destroy]  PROJECT_NAME
-    gcloud-server   [create|destroy]  PROJECT_NAME
-    aws-postgres    install           PROJECT_NAME
-    azure-postgres  install           PROJECT_NAME
-    gcloud-postgres install           PROJECT_NAME
-
-Other Options:
-    -h, --help Display help and exit
-```
-
-* Type: ```./edb-deployment gcloud-server create PROJECT_NAME``` and execute the command by pressing the **Enter** button.
-  #![Create PEM GCLOUD Resources](../../demos/GCLOUD_Create_test.gif)
-
-* Type: ```./edb-deployment gcloud-postgres install PROJECT_NAME``` and execute the command by pressing the **Enter** button.
-  #![Install PEM in GCLOUD Resources](../../demos/GCLOUD_PEM_Install.gif)
-
-* Type: ```./edb-deployment gcloud-server destroy PROJECT_NAME``` and execute the command by pressing the **Enter** button.
-  #![Removed Created GCLOUD Resources](../../demos/GCLOUD_Destroy_test.gif)
-
-### Manual Configurations
-* The steps below are for reference in case there is a desire to perform configurations manually. The steps are in listed and described in their execution order and are located in the ```lib_sh``` directory:
-  * keygen.sh - Removes and creates the SSH Keys
-  ![Generate SSH Keys](../../demos/KeyGen.gif)
-  * gcp-sdk.sh - Installs Google Cloud SDK and initiates the Google Credentials Configuration
-   The results should be similar as the video below:
-  ![Google Cloud SDK Installation](../../demos/Google_Cloud_SDK_Installation.gif)
-  * Configure the Google Cloud SDK by typing: ```gcloud init``` and pressing **Enter** button
-  ![Google Cloud SDK Login](../../demos/Google_Cloud_SDK_Login.gif)
-  
-### Execute SQL Statements on Postgres Cluster
-##### Dependencies
-1. Ansible
-2. Cloud Infrastructure Prerequisites
-3. Previously setup and configured Postgres or EnterpriseDB Postgres Advanced Server Instances
-
-**Steps**
-
-* Navigate to the **sqlexec** folder
-
-* Refer to the example files: ```hosts.yml``` and ```playbook.yml``` located in the ```sqlexec``` directory
-  ![SQLExec](../../demos/SQLExec.gif)
diff --git a/terraform/gcloud/environments/compute/alternate_volumes.sh b/terraform/gcloud/environments/compute/alternate_volumes.sh
new file mode 100644
index 00000000..552d6f61
--- /dev/null
+++ b/terraform/gcloud/environments/compute/alternate_volumes.sh
@@ -0,0 +1,72 @@
+#!/bin/bash
+set -euxo pipefail
+
+# /sdb
+MNT_DIR=/pgdata
+
+if [[ -d "$MNT_DIR" ]]; then
+   exit
+else
+   sudo mkfs.ext4 -m 0 -F -E lazy_itable_init=0,lazy_journal_init=0,discard /dev/sdb; \
+   sudo mkdir -p $MNT_DIR
+   sudo mount -o discard,defaults /dev/sdb $MNT_DIR
+
+   # Add fstab entry
+   echo UUID=`sudo blkid -s UUID -o value /dev/sdb` $MNT_DIR ext4 discard,defaults,nofail 0 2 | sudo tee -a /etc/fstab
+fi
+
+# /sdc
+MNT_DIR=/pgwal
+
+if [[ -d "$MNT_DIR" ]]; then
+   exit
+else
+   sudo mkfs.ext4 -m 0 -F -E lazy_itable_init=0,lazy_journal_init=0,discard /dev/sdc; \
+   sudo mkdir -p $MNT_DIR
+   sudo mount -o discard,defaults /dev/sdc $MNT_DIR
+
+   # Add fstab entry
+   echo UUID=`sudo blkid -s UUID -o value /dev/sdc` $MNT_DIR ext4 discard,defaults,nofail 0 2 | sudo tee -a /etc/fstab
+fi
+
+# /sdd
+MNT_DIR=/pgtblspc1
+
+if [[ -d "$MNT_DIR" ]]; then
+   exit
+else
+   sudo mkfs.ext4 -m 0 -F -E lazy_itable_init=0,lazy_journal_init=0,discard /dev/sdd; \
+   sudo mkdir -p $MNT_DIR
+   sudo mount -o discard,defaults /dev/sdd $MNT_DIR
+
+   # Add fstab entry
+   echo UUID=`sudo blkid -s UUID -o value /dev/sdd` $MNT_DIR ext4 discard,defaults,nofail 0 2 | sudo tee -a /etc/fstab
+fi
+
+# /sde
+MNT_DIR=/pgtblspc2
+
+if [[ -d "$MNT_DIR" ]]; then
+   exit
+else
+   sudo mkfs.ext4 -m 0 -F -E lazy_itable_init=0,lazy_journal_init=0,discard /dev/sde; \
+   sudo mkdir -p $MNT_DIR
+   sudo mount -o discard,defaults /dev/sde $MNT_DIR
+
+   # Add fstab entry
+   echo UUID=`sudo blkid -s UUID -o value /dev/sde` $MNT_DIR ext4 discard,defaults,nofail 0 2 | sudo tee -a /etc/fstab
+fi
+
+# /sdf
+MNT_DIR=/pgtblspc3
+
+if [[ -d "$MNT_DIR" ]]; then
+   exit
+else
+   sudo mkfs.ext4 -m 0 -F -E lazy_itable_init=0,lazy_journal_init=0,discard /dev/sdf; \
+   sudo mkdir -p $MNT_DIR
+   sudo mount -o discard,defaults /dev/sdf $MNT_DIR
+
+   # Add fstab entry
+   echo UUID=`sudo blkid -s UUID -o value /dev/sdf` $MNT_DIR ext4 discard,defaults,nofail 0 2 | sudo tee -a /etc/fstab
+fi
diff --git a/terraform/gcloud/environments/compute/compute.tf b/terraform/gcloud/environments/compute/compute.tf
index a66187b0..41f8c130 100644
--- a/terraform/gcloud/environments/compute/compute.tf
+++ b/terraform/gcloud/environments/compute/compute.tf
@@ -1,40 +1,42 @@
-variable instance_count {}
-variable pem_instance_count {}
-variable synchronicity {}
-variable instance_name {}
-variable vm_type {}
-variable network_name {}
-variable subnetwork_name {}
-variable subnetwork_region {}
-variable os {}
-variable ssh_user {}
-variable ssh_key_location {}
-variable ansible_pem_inventory_yaml_filename {}
-variable os_csv_filename {}
-variable add_hosts_filename {}
+variable "pg_instance_count" {
+	type = number
+}
+variable "pem_instance_count" {
+	type = number
+}
+variable "synchronicity" {}
+variable "instance_name" {}
+variable "vm_type" {}
+variable "vm_disk_type" {}
+variable "vm_disk_size" {}
+variable "volume_count" {}
+variable "volume_disk_type" {}
+variable "volume_disk_size" {}
+variable "network_name" {}
+variable "subnetwork_name" {}
+variable "subnetwork_region" {}
+variable "os" {}
+variable "ssh_user" {}
+variable "ssh_key_location" {}
+variable "ansible_inventory_yaml_filename" {}
+variable "os_csv_filename" {}
+variable "add_hosts_filename" {}
+variable "hosts_filename" {}
+variable "full_private_ssh_key_path" {}
+variable "disk_encryption_key" {}
+
 
 data "google_compute_zones" "available" {
   region = var.subnetwork_region
 }
 
-resource "google_compute_instance" "edb-prereq-engine-instance" {
-  count        = var.instance_count
-  name         = (var.pem_instance_count == "1" && count.index == 0 ? format("%s-%s", var.instance_name, "pemserver") : (var.pem_instance_count == "0" && count.index == 1 ? format("%s-%s", var.instance_name, "primary") : (count.index > 1 ? format("%s-%s%s", var.instance_name, "standby", count.index) : format("%s-%s%s", var.instance_name, "primary", count.index))))
+resource "google_compute_instance" "pg_server" {
+  count        = var.pg_instance_count
+  name         = (count.index == 0 ? format("%s-%s", var.instance_name, "primary") : format("%s-%s%s", var.instance_name, "standby", count.index))
   machine_type = var.vm_type
 
-  zone = data.google_compute_zones.available.names[count.index < 3 ? count.index : 2]
-
-#  tags = [
-#    "${var.network_name}-firewall-ssh",
-#    "${var.network_name}-firewall-http",
-#    "${var.network_name}-firewall-https",
-#    "${var.network_name}-firewall-icmp",
-#    "${var.network_name}-firewall-postgresql",
-#    "${var.network_name}-firewall-epas",
-#    "${var.network_name}-firewall-efm",
-#    "${var.network_name}-firewall-openshift-console",
-#    "${var.network_name}-firewall-secure-forward",
-#  ]
+  #zone = data.google_compute_zones.available.names[count.index < 3 ? count.index : 2]
+  zone = data.google_compute_zones.available.names[0]
 
   tags = [
     format("%s-%s", var.network_name, "firewall-ssh"),
@@ -49,14 +51,92 @@ resource "google_compute_instance" "edb-prereq-engine-instance" {
   ]
 
   boot_disk {
+    # Un-comment to enable Disk Encryption
+    #disk_encryption_key_raw = base64encode(var.disk_encryption_key)
+    disk_encryption_key_raw = var.disk_encryption_key
+
     initialize_params {
       image = var.os
-      size  = 20
+      type  = var.vm_disk_type
+      size  = var.vm_disk_size
+
+    }
+  }
+
+  network_interface {
+    subnetwork = var.network_name
+
+    access_config {
+      // Ephemeral IP
     }
+
   }
 
   metadata = {
-    ssh-keys = "${var.ssh_user}:${file(var.ssh_key_location)}"
+    ssh-keys = format("%s:%s", var.ssh_user, file(var.ssh_key_location))
+  }
+
+  metadata_startup_script = file("../../terraform/gcloud/environments/compute/setup_volumes.sh")
+
+}
+
+resource "google_compute_disk" "pg_volumes" {
+  count = var.pg_instance_count * var.volume_count
+  name  = format("%s-%s", var.network_name, count.index)
+  type  = var.volume_disk_type
+  size  = var.volume_disk_size
+  zone  = data.google_compute_zones.available.names[0]
+
+  # Currently in beta and not supported
+  # If un-commented provisioning of resources will fail
+  # disk_encryption_key {
+  #   raw_key = var.disk_encryption_key
+  # }
+
+  depends_on = [google_compute_instance.pg_server]
+}
+
+resource "google_compute_attached_disk" "pg_server_attached_disk" {
+  count    = var.pg_instance_count * var.volume_count
+  disk     = element(google_compute_disk.pg_volumes.*.id, count.index)
+  instance = element(google_compute_instance.pg_server.*.id, count.index)
+
+  depends_on = [google_compute_disk.pg_volumes]
+
+}
+
+// PEM Server
+resource "google_compute_instance" "pem_server" {
+  count        = var.pem_instance_count
+  name         = format("%s-%s", var.instance_name, "pemserver")
+  machine_type = var.vm_type
+
+  #zone = data.google_compute_zones.available.names[count.index < 3 ? count.index : 2]
+  zone = data.google_compute_zones.available.names[0]
+
+  tags = [
+    format("%s-%s", var.network_name, "firewall-ssh"),
+    format("%s-%s", var.network_name, "firewall-http"),
+    format("%s-%s", var.network_name, "firewall-https"),
+    format("%s-%s", var.network_name, "firewall-icmp"),
+    format("%s-%s", var.network_name, "firewall-postgresql"),
+    format("%s-%s", var.network_name, "firewall-epas"),
+    format("%s-%s", var.network_name, "firewall-efm"),
+    format("%s-%s", var.network_name, "firewall-openshift-console"),
+    format("%s-%s", var.network_name, "firewall-secure-forward"),
+  ]
+
+  boot_disk {
+    # Un-comment to enable Disk Encryption
+    #disk_encryption_key_raw = base64encode(var.disk_encryption_key)
+    disk_encryption_key_raw = var.disk_encryption_key
+
+    initialize_params {
+      image = var.os
+      type  = var.vm_disk_type
+      size  = var.vm_disk_size
+
+    }
   }
 
   network_interface {
@@ -67,4 +147,36 @@ resource "google_compute_instance" "edb-prereq-engine-instance" {
     }
 
   }
+
+  metadata = {
+    ssh-keys = format("%s:%s", var.ssh_user, file(var.ssh_key_location))
+  }
+
+  metadata_startup_script = file("../../terraform/gcloud/environments/compute/setup_volumes.sh")
+
+}
+
+resource "google_compute_disk" "pem_volumes" {
+  count = var.pem_instance_count * var.volume_count
+  name  = format("%s-%s", var.network_name, count.index)
+  type  = var.volume_disk_type
+  size  = var.volume_disk_size
+  zone  = data.google_compute_zones.available.names[0]
+
+  # Currently in beta and not supported
+  # If un-commented provisioning of resources will fail
+  # disk_encryption_key {
+  #   raw_key = var.disk_encryption_key
+  # }
+
+  depends_on = [google_compute_instance.pem_server]
+}
+
+resource "google_compute_attached_disk" "pem_server_attached_disk" {
+  count    = var.pem_instance_count * var.volume_count
+  disk     = element(google_compute_disk.pem_volumes.*.id, count.index)
+  instance = element(google_compute_instance.pem_server.*.id, count.index)
+
+  depends_on = [google_compute_disk.pem_volumes]
+
 }
diff --git a/terraform/gcloud/environments/compute/outputs.tf b/terraform/gcloud/environments/compute/outputs.tf
index ac5d8859..b60a712b 100644
--- a/terraform/gcloud/environments/compute/outputs.tf
+++ b/terraform/gcloud/environments/compute/outputs.tf
@@ -1,16 +1,33 @@
-resource "local_file" "AnsiblePEMYamlInventory" {
-  count    = var.instance_count
-  filename = var.ansible_pem_inventory_yaml_filename
+resource "local_file" "AnsibleYamlInventory" {
+  filename = var.ansible_inventory_yaml_filename
   content  = <<EOT
 ---
-servers:
-  %{for count in range(var.instance_count)~}
-%{if var.pem_instance_count == "1" && count == 0}pemserver:%{endif}%{if var.pem_instance_count == "0" || var.pem_instance_count == "1" && count == 1}primary${count}:%{endif}%{if count > 1}standby${count}:%{endif}
-    node_type: %{if var.pem_instance_count == "1" && count == 0}pemserver%{endif}%{if var.pem_instance_count == "0" || count == 1}primary%{endif}%{if count > 1}standby%{endif}  
-    public_ip: ${google_compute_instance.edb-prereq-engine-instance[count].network_interface.0.access_config.0.nat_ip}
-    private_ip: ${google_compute_instance.edb-prereq-engine-instance[count].network_interface.0.network_ip}
-    %{if count > 1}replication_type: ${var.synchronicity}%{endif}
-    %{if count > 0}pem_agent: true%{endif}
+all:
+  children:
+%{if var.pem_instance_count == 1}
+    pemserver:
+      hosts:
+        pemserver1:
+          ansible_host: ${google_compute_instance.pem_server[0].network_interface.0.access_config.0.nat_ip}
+          private_ip: ${google_compute_instance.pem_server[0].network_interface.0.network_ip}%{endif}
+  %{for count in range(var.pg_instance_count)~}
+%{if count == 0}
+    primary:
+      hosts:
+        primary${count + 1}:%{endif}
+%{if count == 1}
+    standby:
+      hosts:%{endif}
+%{if count > 0}
+        standby${count}:%{endif}
+          ansible_host: ${google_compute_instance.pg_server[count].network_interface.0.access_config.0.nat_ip}
+          private_ip: ${google_compute_instance.pg_server[count].network_interface.0.network_ip}
+%{if count > 0}
+          replication_type: ${var.synchronicity}
+          upstream_node_private_ip: ${google_compute_instance.pg_server[0].network_interface.0.network_ip}%{endif}
+%{if var.pem_instance_count == 1}
+          pem_agent: true
+          pem_server_private_ip: ${google_compute_instance.pem_server[0].network_interface.0.network_ip}%{endif}
   %{endfor~}
 EOT
 }
@@ -27,11 +44,27 @@ resource "local_file" "host_script" {
   filename = var.add_hosts_filename
   content  = <<-EOT
 echo "Setting SSH Keys"
-ssh-add -l ${var.ssh_key_location}
+ssh-add ${var.ssh_key_location}
 echo "Adding IPs"
-%{for count in range(var.instance_count)~}
-ssh-keyscan -H ${google_compute_instance.edb-prereq-engine-instance[count].network_interface.0.access_config.0.nat_ip} >> ~/.ssh/known_hosts
-ssh-keygen -f ~/.ssh/known_hosts -R ${google_compute_instance.edb-prereq-engine-instance[count].network_interface.0.access_config.0.nat_ip}
-%{endfor~}    
+%{for count in range(var.pg_instance_count)~}
+ssh-keyscan -H ${google_compute_instance.pg_server[count].network_interface.0.access_config.0.nat_ip} >> ~/.ssh/known_hosts
+ssh-keygen -f ~/.ssh/known_hosts -R ${google_compute_instance.pg_server[count].network_interface.0.access_config.0.nat_ip}
+%{endfor~}
+%{if var.pem_instance_count == 1}
+ssh-keyscan -H ${google_compute_instance.pem_server[0].network_interface.0.access_config.0.nat_ip} >> ~/.ssh/known_hosts
+ssh-keygen -f ~/.ssh/known_hosts -R ${google_compute_instance.pem_server[0].network_interface.0.access_config.0.nat_ip}
+%{endif}
     EOT
 }
+
+resource "local_file" "hosts" {
+  filename = var.hosts_filename
+  content  = <<EOT
+  %{for count in range(var.pg_instance_count)~}
+${google_compute_instance.pg_server[count].network_interface.0.access_config.0.nat_ip}
+  %{endfor~}
+  %{if var.pem_instance_count == 1}
+${google_compute_instance.pem_server[0].network_interface.0.access_config.0.nat_ip}
+  %{endif}
+EOT
+}
diff --git a/terraform/gcloud/environments/compute/setup_volumes.sh b/terraform/gcloud/environments/compute/setup_volumes.sh
new file mode 100644
index 00000000..8828a3b0
--- /dev/null
+++ b/terraform/gcloud/environments/compute/setup_volumes.sh
@@ -0,0 +1,39 @@
+#!/bin/bash
+for i in {b..f}
+do
+    DEVNAME="sd${i}"
+    case "${i}" in
+      b)
+        VOLNAME="pgdata"
+        ;;
+      c)
+        VOLNAME="pgwal"
+        ;;
+      d)
+        CURRVOL="1"
+        VOLNAME="pgtblspc${CURRVOL}"
+        ;;
+      e)
+        CURRVOL="2"
+        VOLNAME="pgtblspc${CURRVOL}"
+        ;;
+      f)
+        CURRVOL="3"
+        VOLNAME="pgtblspc${CURRVOL}"
+        ;;
+    esac
+    CMD=$(sudo lsblk | sudo grep "${DEVNAME}" | wc -l)
+    if [[ "${CMD}" > 0 ]]
+    then
+        sudo mkfs -F -t ext4 "/dev/${DEVNAME}"
+        sudo mkdir "/${VOLNAME}"
+        sudo mount -t ext4 "/dev/${DEVNAME}" "/${VOLNAME}"
+        CMD=$(sudo grep "${DEVNAME}" /etc/fstab | wc -l)
+        if [[ "${CMD}" < 1 ]]
+        then
+            echo "/dev/${DEVNAME} /${VOLNAME} auto noatime 0 0" | sudo tee -a /etc/fstab
+        fi
+        sleep 5
+    fi
+done
+sudo mount -a
diff --git a/terraform/gcloud/environments/network/network.tf b/terraform/gcloud/environments/network/network.tf
index 224f93b8..996d9345 100644
--- a/terraform/gcloud/environments/network/network.tf
+++ b/terraform/gcloud/environments/network/network.tf
@@ -1,16 +1,13 @@
-variable instance_name {}
-variable network_name {}
-variable subnetwork_region {}
-variable ip_cidr_range {}
+variable "instance_name" {}
+variable "network_name" {}
+variable "subnetwork_region" {}
+variable "ip_cidr_range" {}
 
 resource "google_compute_network" "edb_prereq_network" {
-  #name = var.network_name
   name = var.instance_name
 }
 
 resource "google_compute_subnetwork" "edb_prereq_network_subnetwork" {
-  #name          = "${var.network_name}-${var.instance_name}-subnetwork-${var.subnetwork_region}"
-  #name          = "${var.instance_name}-subnetwork-${var.subnetwork_region}"
   name          = format("%s-%s-%s", var.instance_name, "subnetwork", var.subnetwork_region)
   region        = var.subnetwork_region
   network       = google_compute_network.edb_prereq_network.self_link
diff --git a/terraform/gcloud/environments/security/firewall.tf b/terraform/gcloud/environments/security/firewall.tf
index 6495dae1..e2ef5b03 100644
--- a/terraform/gcloud/environments/security/firewall.tf
+++ b/terraform/gcloud/environments/security/firewall.tf
@@ -1,8 +1,7 @@
-variable network_name {}
-variable source_ranges {}
+variable "network_name" {}
+variable "source_ranges" {}
 
 resource "google_compute_firewall" "ssh" {
-  #name    = "${var.network_name}-firewall-ssh"
   name    = format("%s-%s", var.network_name, "firewall-ssh")
   network = var.network_name
 
@@ -11,15 +10,12 @@ resource "google_compute_firewall" "ssh" {
     ports    = ["22"]
   }
 
-  #target_tags   = ["${var.network_name}-firewall-ssh"]
-  target_tags   = [format("%s-%s", var.network_name, "firewall-ssh")]
-  #source_ranges = ["${var.source_ranges}"]
-  source_ranges = [var.source_ranges]  
+  target_tags = [format("%s-%s", var.network_name, "firewall-ssh")]
+  source_ranges = [var.source_ranges]
 }
 
 resource "google_compute_firewall" "http" {
-  #name    = "${var.network_name}-firewall-http"
-  name    = format("%s-%s", var.network_name, "firewall-http")  
+  name    = format("%s-%s", var.network_name, "firewall-http")
   network = var.network_name
 
   allow {
@@ -27,14 +23,11 @@ resource "google_compute_firewall" "http" {
     ports    = ["80"]
   }
 
-  #target_tags   = ["${var.network_name}-firewall-http"]
-  target_tags   = [format("%s-%s", var.network_name, "firewall-http")]
-  #source_ranges = ["${var.source_ranges}"]
+  target_tags = [format("%s-%s", var.network_name, "firewall-http")]
   source_ranges = [var.source_ranges]
 }
 
 resource "google_compute_firewall" "https" {
-  #name    = "${var.network_name}-firewall-https"
   name    = format("%s-%s", var.network_name, "firewall-https")
   network = var.network_name
 
@@ -43,14 +36,11 @@ resource "google_compute_firewall" "https" {
     ports    = ["443"]
   }
 
-  #target_tags   = ["${var.network_name}-firewall-https"]
-  target_tags   = [format("%s-%s", var.network_name, "firewall-https")]
-  #source_ranges = ["${var.source_ranges}"]
+  target_tags = [format("%s-%s", var.network_name, "firewall-https")]
   source_ranges = [var.source_ranges]
 }
 
 resource "google_compute_firewall" "icmp" {
-  #name    = "${var.network_name}-firewall-icmp"
   name    = format("%s-%s", var.network_name, "firewall-icmp")
   network = var.network_name
 
@@ -58,14 +48,11 @@ resource "google_compute_firewall" "icmp" {
     protocol = "icmp"
   }
 
-  #target_tags   = ["${var.network_name}-firewall-icmp"]
-  target_tags   = [format("%s-%s", var.network_name, "firewall-icmp")]
-  #source_ranges = ["${var.source_ranges}"]
-  source_ranges = [var.source_ranges]  
+  target_tags = [format("%s-%s", var.network_name, "firewall-icmp")]
+  source_ranges = [var.source_ranges]
 }
 
 resource "google_compute_firewall" "postgresql" {
-  #name    = "${var.network_name}-firewall-postgresql"
   name    = format("%s-%s", var.network_name, "firewall-postgresql")
   network = var.network_name
 
@@ -74,14 +61,11 @@ resource "google_compute_firewall" "postgresql" {
     ports    = ["5432"]
   }
 
-  #target_tags   = ["${var.network_name}-firewall-postgresql"]
-  target_tags   = [format("%s-%s", var.network_name, "firewall-postgresql")]
-  #source_ranges = ["${var.source_ranges}"]
+  target_tags = [format("%s-%s", var.network_name, "firewall-postgresql")]
   source_ranges = [var.source_ranges]
 }
 
 resource "google_compute_firewall" "epas" {
-  #name    = "${var.network_name}-firewall-epas"
   name    = format("%s-%s", var.network_name, "firewall-epas")
   network = var.network_name
 
@@ -90,14 +74,11 @@ resource "google_compute_firewall" "epas" {
     ports    = ["5444"]
   }
 
-  #target_tags   = ["${var.network_name}-firewall-epas"]
-  target_tags   = [format("%s-%s", var.network_name, "firewall-epas")]
-  #source_ranges = ["${var.source_ranges}"]
-  source_ranges = [var.source_ranges]  
+  target_tags = [format("%s-%s", var.network_name, "firewall-epas")]
+  source_ranges = [var.source_ranges]
 }
 
 resource "google_compute_firewall" "efm" {
-  #name    = "${var.network_name}-firewall-efm"
   name    = format("%s-%s", var.network_name, "firewall-efm")
   network = var.network_name
 
@@ -106,14 +87,11 @@ resource "google_compute_firewall" "efm" {
     ports    = ["7800-7810"]
   }
 
-  #target_tags   = ["${var.network_name}-firewall-epas"]
-  target_tags   = [format("%s-%s", var.network_name, "firewall-efm")]
-  #source_ranges = ["${var.source_ranges}"]
+  target_tags = [format("%s-%s", var.network_name, "firewall-efm")]
   source_ranges = [var.source_ranges]
 }
 
 resource "google_compute_firewall" "firewall-openshift-console" {
-  #name    = "${var.network_name}-firewall-openshift-console"
   name    = format("%s-%s", var.network_name, "firewall-openshift-console")
   network = var.network_name
 
@@ -122,16 +100,12 @@ resource "google_compute_firewall" "firewall-openshift-console" {
     ports    = ["8443"]
   }
 
-  #target_tags   = ["${var.network_name}-firewall-openshift-console"]
-  target_tags   = [format("%s-%s", var.network_name, "firewall-openshift-console")]
-  #source_ranges = ["${var.source_ranges}"]
-  source_ranges = [var.source_ranges]  
+  target_tags = [format("%s-%s", var.network_name, "firewall-openshift-console")]
+  source_ranges = [var.source_ranges]
 }
 
 resource "google_compute_firewall" "firewall-secure-forward" {
-  #name = "${var.network_name}-firewall-secure-forward"
-  name    = format("%s-%s", var.network_name, "firewall-secure-forward")
-  #network = google_compute_network.edb_prereq_network.name
+  name = format("%s-%s", var.network_name, "firewall-secure-forward")
   network = var.network_name
 
   allow {
@@ -139,8 +113,6 @@ resource "google_compute_firewall" "firewall-secure-forward" {
     ports    = ["24284"]
   }
 
-  #target_tags   = ["${var.network_name}-firewall-secure-forward"]
-  target_tags   = [format("%s-%s", var.network_name, "firewall-secure-forward")]
-  #source_ranges = ["${var.source_ranges}"]
-  source_ranges = [var.source_ranges]  
+  target_tags = [format("%s-%s", var.network_name, "firewall-secure-forward")]
+  source_ranges = [var.source_ranges]
 }
diff --git a/terraform/gcloud/main.tf b/terraform/gcloud/main.tf
index 6bb66c55..ed630641 100644
--- a/terraform/gcloud/main.tf
+++ b/terraform/gcloud/main.tf
@@ -21,20 +21,28 @@ module "security" {
 module "compute" {
   source = "./environments/compute"
 
-  instance_count                      = var.instance_count
+  pg_instance_count                   = var.pg_instance_count
   pem_instance_count                  = var.pem_instance_count
   synchronicity                       = var.synchronicity
   instance_name                       = var.instance_name
   vm_type                             = var.vm_type
+  vm_disk_type                        = var.vm_disk_type
+  vm_disk_size                        = var.vm_disk_size
+  volume_count                        = var.volume_count
+  volume_disk_type                    = var.volume_disk_type
+  volume_disk_size                    = var.volume_disk_size
   network_name                        = var.instance_name
   subnetwork_name                     = "${var.instance_name}-subnetwork-${var.subnetwork_region}"
   subnetwork_region                   = var.subnetwork_region
   os                                  = var.os
   ssh_user                            = var.ssh_user
   ssh_key_location                    = var.ssh_key_location
-  ansible_pem_inventory_yaml_filename = var.ansible_pem_inventory_yaml_filename
+  ansible_inventory_yaml_filename     = var.ansible_inventory_yaml_filename
   os_csv_filename                     = var.os_csv_filename
   add_hosts_filename                  = var.add_hosts_filename
+  hosts_filename                      = var.hosts_filename
+  full_private_ssh_key_path           = var.full_private_ssh_key_path
+  disk_encryption_key                 = var.disk_encryption_key
 
   depends_on = [module.security]
 }
diff --git a/terraform/gcloud/sqlexec/hosts.yml b/terraform/gcloud/sqlexec/hosts.yml
deleted file mode 100755
index 42249943..00000000
--- a/terraform/gcloud/sqlexec/hosts.yml
+++ /dev/null
@@ -1,9 +0,0 @@
----
-hosts:
-  master:
-    node_type: master
-    private_ip: xxx.xxx.xxx
-    public_ip: xxx.xxx.xxx
-    database: postgres
-    pgdbuser: postgres
-    dbpassword: postgres
diff --git a/terraform/gcloud/sqlexec/playbook.yml b/terraform/gcloud/sqlexec/playbook.yml
deleted file mode 100755
index b7724fae..00000000
--- a/terraform/gcloud/sqlexec/playbook.yml
+++ /dev/null
@@ -1,22 +0,0 @@
----
-- hosts: localhost 
-  name: Execute SQL Statements on Postgres SQL Cluster
-  connection: local
-  become: true
-  gather_facts: yes
-  #ignore_errors: yes
-  
-  vars_files:
-    - /home/dortiz/hosts-sql.yml
-
-  pre_tasks:
-    - set_fact:
-        OS: OS
-        PG_VERSION: PG_VERSION
-      with_dict: "{{ hosts }}"
-
-  tasks:
-    - name: Iterate through role with items from hosts file
-      include_role:
-        name: edb.postgres.sqlexec
-      with_dict: "{{ hosts }}"
diff --git a/terraform/gcloud/sqlexec/roles/edb.postgres.sqlexec/.travis.yml b/terraform/gcloud/sqlexec/roles/edb.postgres.sqlexec/.travis.yml
deleted file mode 100755
index 36bbf620..00000000
--- a/terraform/gcloud/sqlexec/roles/edb.postgres.sqlexec/.travis.yml
+++ /dev/null
@@ -1,29 +0,0 @@
----
-language: python
-python: "2.7"
-
-# Use the new container infrastructure
-sudo: false
-
-# Install ansible
-addons:
-  apt:
-    packages:
-    - python-pip
-
-install:
-  # Install ansible
-  - pip install ansible
-
-  # Check ansible version
-  - ansible --version
-
-  # Create ansible.cfg with correct roles_path
-  - printf '[defaults]\nroles_path=../' >ansible.cfg
-
-script:
-  # Basic role syntax check
-  - ansible-playbook tests/test.yml -i tests/inventory --syntax-check
-
-notifications:
-  webhooks: https://galaxy.ansible.com/api/v1/notifications/
\ No newline at end of file
diff --git a/terraform/gcloud/sqlexec/roles/edb.postgres.sqlexec/README.md b/terraform/gcloud/sqlexec/roles/edb.postgres.sqlexec/README.md
deleted file mode 100755
index 2e99fd3b..00000000
--- a/terraform/gcloud/sqlexec/roles/edb.postgres.sqlexec/README.md
+++ /dev/null
@@ -1,65 +0,0 @@
-edb.postgres.sqlexec
-=========
-
-This Ansible Galaxy Role Executes SQL Statements for Postgres versions: 10, 11 and 12 on EC2 Instances previously configured on AWS.
-
-Requirements
-------------
-
-The dependencies that are required prior to executing this role are:
-1. 01-prereqs
-2. 02-cluster
-3. 03-install
-4. 04-replication
-
-Role Variables
---------------
-
-When executing the role via ansible there are two required variables:
-* OS
-* PG_VERSION
-
-Dependencies
-------------
-
-The edb.postgres.sqlexec role does not have any dependencies on any other roles.
-
-Example Playbook
-----------------
-
-Below is an example of how to use the: edb.postgres.sqlexec role:
-
-    - hosts: localhost
-      name: Execute SQL Statements on Postgres SQL Cluster
-      connection: local
-      become: true
-      gather_facts: yes
-
-      vars_files:
-        - hosts.yml
-
-      pre_tasks:
-        - set_fact:
-            OS: OS
-            PG_VERSION: PG_VERSION
-          with_dict: "{{ hosts }}"
- 
-      tasks:
-        - name: Iterate through role with items from hosts file
-          include_role:
-            name: edb.postgres.sqlexec
-          with_dict: "{{ hosts }}"
-
-License
--------
-
-BSD
-
-Author Information
-------------------
-
-Author: 
-* Doug Ortiz
-* EDB Postgres DevOps
-* doug.ortiz@enterprisedb.com
-* www.enterprisedb.com
diff --git a/terraform/gcloud/sqlexec/roles/edb.postgres.sqlexec/defaults/main.yml b/terraform/gcloud/sqlexec/roles/edb.postgres.sqlexec/defaults/main.yml
deleted file mode 100755
index ed97d539..00000000
--- a/terraform/gcloud/sqlexec/roles/edb.postgres.sqlexec/defaults/main.yml
+++ /dev/null
@@ -1,1 +0,0 @@
----
diff --git a/terraform/gcloud/sqlexec/roles/edb.postgres.sqlexec/meta/main.yml b/terraform/gcloud/sqlexec/roles/edb.postgres.sqlexec/meta/main.yml
deleted file mode 100755
index b1fe1939..00000000
--- a/terraform/gcloud/sqlexec/roles/edb.postgres.sqlexec/meta/main.yml
+++ /dev/null
@@ -1,54 +0,0 @@
----
-galaxy_info:
-  author: Doug Ortiz
-  description: Execution of SQL Statements on Postgres SQL Cluster
-  company: "EnterpriseDB"
-
-  # If the issue tracker for your role is not on github, uncomment the
-  # next line and provide a value
-  # issue_tracker_url: http://example.com/issue/tracker
-
-  # Choose a valid license ID from https://spdx.org - some suggested licenses:
-  # - BSD-3-Clause (default)
-  # - MIT
-  # - GPL-2.0-or-later
-  # - GPL-3.0-only
-  # - Apache-2.0
-  # - CC-BY-4.0
-  license: license (GPL-2.0-or-later, MIT, etc)
-
-  min_ansible_version: 2.8
-
-  # If this a Container Enabled role, provide the minimum Ansible Container version.
-  # min_ansible_container_version:
-
-  #
-  # Provide a list of supported platforms, and for each platform a list of versions.
-  # If you don't wish to enumerate all versions for a particular platform, use 'all'.
-  # To view available platforms and versions (or releases), visit:
-  # https://galaxy.ansible.com/api/v1/platforms/
-  #
-  platforms:
-    - name: CentOS
-      versions:
-        - 7
-    - name: Ubuntu
-      versions:
-        - xenial
-        - bionic
-        - focal
-    - name: Debian
-      versions:
-        - wheezy
-        - jessie
-        - stretch
-        - buster
-
-  galaxy_tags:
-    - database
-    - postgresql
-    - postgres
-    - edb
-    - postgresql_query
-
-dependencies: []
diff --git a/terraform/gcloud/sqlexec/roles/edb.postgres.sqlexec/tasks/SQLExec.yml b/terraform/gcloud/sqlexec/roles/edb.postgres.sqlexec/tasks/SQLExec.yml
deleted file mode 100755
index d6962612..00000000
--- a/terraform/gcloud/sqlexec/roles/edb.postgres.sqlexec/tasks/SQLExec.yml
+++ /dev/null
@@ -1,63 +0,0 @@
----
-- name: Display Details of Node to Configure
-  block:
-    - debug:
-        msg: 
-            "Operating System = {{ OS }}:
-             Postgres Version = {{ PG_VERSION }},
-             NODE_TYPE = {{ item.value.node_type }},
-             PRIVATE_IP = {{ item.value.private_ip }},
-             PUBLIC_IP= {{ item.value.public_ip }},
-             DATABASE = {{ item.value.database }},
-             PGDBUSER = {{ item.value.pgdbuser }},
-             PGDBPASSWORD = {{ item.value.pgdbpassword }}"
-
-- name: Drop Table if exists in Postgres DB
-  postgresql_query:
-    db: "{{ DATABASE }}"
-    login_user: "{{ PGDBUSER }}"
-    login_password: "{{ PGDBPASSWORD }}"
-    query: DROP TABLE IF EXISTS students
-  become_user: "{{ PGDBUSER }}"
-  become: yes
-  delegate_to: "{{ PUBLIC_IP }}"
-
-- name: Create Table in Postgres DB
-  postgresql_query:
-    db: "{{ DATABASE }}"
-    login_user: "{{ PGDBUSER }}"
-    login_password: "{{ PGDBPASSWORD }}"
-    query: CREATE TABLE students (name VARCHAR(100))
-  become_user: "{{ PGDBUSER }}"
-  become: yes
-  delegate_to: "{{ PUBLIC_IP }}"
-
-- name: Insert Record into students table in Postgres DB
-  postgresql_query:
-    db: "{{ DATABASE }}"
-    login_user: "{{ PGDBUSER }}"
-    login_password: "{{ PGDBPASSWORD }}"
-    query: INSERT INTO students VALUES ('test')
-  become_user: "{{ PGDBUSER }}"
-  become: yes
-  delegate_to: "{{ PUBLIC_IP }}"
-
-- name: Select query to Postgres DB
-  postgresql_query:
-    db: "{{ DATABASE }}"
-    login_user: "{{ PGDBUSER }}"
-    login_password: "{{ PGDBPASSWORD }}"
-    query: SELECT * FROM students
-  become_user: "{{ PGDBUSER }}"
-  become: yes
-  delegate_to: "{{ PUBLIC_IP }}"
-
-- name: Drop Table students in Postgres DB
-  postgresql_query:
-    db: "{{ DATABASE }}"
-    login_user: "{{ PGDBUSER }}"
-    login_password: "{{ PGDBPASSWORD }}"
-    query: DROP TABLE students
-  become_user: "{{ PGDBUSER }}"
-  become: yes
-  delegate_to: "{{ PUBLIC_IP }}"
diff --git a/terraform/gcloud/sqlexec/roles/edb.postgres.sqlexec/tasks/main.yml b/terraform/gcloud/sqlexec/roles/edb.postgres.sqlexec/tasks/main.yml
deleted file mode 100755
index b5cefa2e..00000000
--- a/terraform/gcloud/sqlexec/roles/edb.postgres.sqlexec/tasks/main.yml
+++ /dev/null
@@ -1,64 +0,0 @@
----
-# Tasks file for edb.postgres.sqlexec Role
-
-- name: Display details of Node to Configure
-  block:
-    - debug:
-        msg: 
-             "NODE_TYPE = {{ item.value.node_type }}:
-             PRIVATE_IP = {{ item.value.private_ip }},
-             PUBLIC_IP = {{ item.value.public_ip }},
-             DATABASE = {{ item.value.database }},
-             PGDBUSER = {{ item.value.pgdbuser }},
-             PGDBPASSWORD = {{ item.value.pgdbpassword }}"
-
-# Setting variables available in all nodes
-- name: Set Node Type
-  set_fact:
-    NODE_TYPE: "{{ item.value.node_type }}"
-  register: output
-
-- name: Set Private IP
-  set_fact:
-    PRIVATE_IP: "{{ item.value.private_ip }}"
-  register: output
-
-- name: Set Public IP Address
-  set_fact:
-    PUBLIC_IP: "{{ item.value.public_ip }}"
-  register: output
-
-- name: Set Database
-  set_fact:
-    DATABASE: "{{ item.value.database }}"
-  register: output
-  when: item.value.node_type == 'master'
-
-- name: Set PGDBUSER
-  set_fact:
-    PGDBUSER: "{{ item.value.pgdbuser }}"
-  register: output
-  when: item.value.node_type == 'master'
-
-- name: Set PGDBPASSWORD
-  set_fact:
-    PGDBPASSWORD: "{{ item.value.pgdbpassword }}"
-  register: output
-  when: item.value.node_type == 'master'
-
-# Install Packages before any tasks are executed
-- name: Install psycopg2 Package PreRequisite
-  yum:
-    name: "{{ packages }}"
-  vars:
-    packages:
-      - python-psycopg2
-    state:
-      present
-  become: yes
-  delegate_to: "{{ PUBLIC_IP }}"
-
-# Postgres12 Master
-- include_tasks: SQLExec.yml
-  #when: ansible_os_family == 'Debian'
-  when: item.value.node_type == 'master'
diff --git a/terraform/gcloud/sqlexec/roles/edb.postgres.sqlexec/tasks/variables.yml b/terraform/gcloud/sqlexec/roles/edb.postgres.sqlexec/tasks/variables.yml
deleted file mode 100755
index ab3e7860..00000000
--- a/terraform/gcloud/sqlexec/roles/edb.postgres.sqlexec/tasks/variables.yml
+++ /dev/null
@@ -1,55 +0,0 @@
----
-# Configuration
-- name: Include OS-specific variables (Debian).
-  include_vars: "{{ ansible_distribution }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
-  when: ansible_distribution == 'Debian'
-
-- name: Include OS-specific variables (RedHat).
-  include_vars: "{{ ansible_os_family }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
-  when:
-  - ansible_os_family == 'RedHat'
-  - ansible_distribution != 'Fedora'
-
-- name: Include OS-specific variables (Fedora).
-  include_vars: "{{ ansible_distribution }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
-  when: ansible_distribution == 'Fedora'
-
-- name: Include OS-specific variables (Ubuntu).
-  include_vars: "{{ ansible_distribution }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
-  when: ansible_distribution == 'Ubuntu'
-
-- name: Define postgresql_packages.
-  set_fact:
-    postgresql_packages: "{{ __postgresql_packages | list }}"
-  when: postgresql_packages is not defined
-
-- name: Define postgresql_version.
-  set_fact:
-    postgresql_version: "{{ __postgresql_version }}"
-  when: postgresql_version is not defined
-
-- name: Define postgresql_daemon.
-  set_fact:
-    postgresql_daemon: "{{ __postgresql_daemon }}"
-  when: postgresql_daemon is not defined
-
-- name: Define postgresql_data_dir.
-  set_fact:
-    postgresql_data_dir: "{{ __postgresql_data_dir }}"
-  when: postgresql_data_dir is not defined
-
-- name: Define postgresql_bin_path.
-  set_fact:
-    postgresql_bin_path: "{{ __postgresql_bin_path }}"
-  when: postgresql_bin_path is not defined
-
-- name: Define postgresql_config_path.
-  set_fact:
-    postgresql_config_path: "{{ __postgresql_config_path }}"
-  when: postgresql_config_path is not defined
-
-- name: Define postgresql_unix_socket_directories_mode.
-  set_fact:
-    postgresql_unix_socket_directories_mode: >-
-      {{ __postgresql_unix_socket_directories_mode | default('02775') }}
-  when: postgresql_unix_socket_directories_mode is not defined
diff --git a/terraform/gcloud/sqlexec/roles/edb.postgres.sqlexec/vars/CentOS7.yml b/terraform/gcloud/sqlexec/roles/edb.postgres.sqlexec/vars/CentOS7.yml
deleted file mode 100755
index 5248b1b3..00000000
--- a/terraform/gcloud/sqlexec/roles/edb.postgres.sqlexec/vars/CentOS7.yml
+++ /dev/null
@@ -1,12 +0,0 @@
----
-__postgresql_version: "11"
-__postgresql_data_dir: "/var/lib/postgresql/{{ __postgresql_version }}/main"
-__postgresql_bin_path: "/usr/lib/postgresql/{{ __postgresql_version }}/bin"
-__postgresql_config_path: "/usr/lib/postgresql/{{ __postgresql_version }}/main"
-__postgresql_daemon: "postgresql@{{ postgresql_version }}-main"
-__postgresql_packages:
-  - postgresql
-  - postgresql-contrib
-  - libpq-dev
-# Python 3
-postgresql_python_library: python3-psycopg2
diff --git a/terraform/gcloud/sqlexec/roles/edb.postgres.sqlexec/vars/Debian-10.yml b/terraform/gcloud/sqlexec/roles/edb.postgres.sqlexec/vars/Debian-10.yml
deleted file mode 100755
index 5248b1b3..00000000
--- a/terraform/gcloud/sqlexec/roles/edb.postgres.sqlexec/vars/Debian-10.yml
+++ /dev/null
@@ -1,12 +0,0 @@
----
-__postgresql_version: "11"
-__postgresql_data_dir: "/var/lib/postgresql/{{ __postgresql_version }}/main"
-__postgresql_bin_path: "/usr/lib/postgresql/{{ __postgresql_version }}/bin"
-__postgresql_config_path: "/usr/lib/postgresql/{{ __postgresql_version }}/main"
-__postgresql_daemon: "postgresql@{{ postgresql_version }}-main"
-__postgresql_packages:
-  - postgresql
-  - postgresql-contrib
-  - libpq-dev
-# Python 3
-postgresql_python_library: python3-psycopg2
diff --git a/terraform/gcloud/sqlexec/roles/edb.postgres.sqlexec/vars/Ubuntu-18.yml b/terraform/gcloud/sqlexec/roles/edb.postgres.sqlexec/vars/Ubuntu-18.yml
deleted file mode 100755
index 9a9a065a..00000000
--- a/terraform/gcloud/sqlexec/roles/edb.postgres.sqlexec/vars/Ubuntu-18.yml
+++ /dev/null
@@ -1,11 +0,0 @@
----
-__postgresql_version: "12"
-__postgresql_data_dir: "/var/lib/postgresql/{{ __postgresql_version }}/main"
-__postgresql_bin_path: "/usr/lib/postgresql/{{ __postgresql_version }}/bin"
-__postgresql_config_path: "/etc/postgresql/{{ __postgresql_version }}/main"
-__postgresql_daemon: postgresql
-__postgresql_packages:
-  - postgresql
-  - postgresql-contrib
-  - libpq-dev
-postgresql_python_library: python3-psycopg2
diff --git a/terraform/gcloud/variables.tf b/terraform/gcloud/variables.tf
deleted file mode 100644
index 84e171b1..00000000
--- a/terraform/gcloud/variables.tf
+++ /dev/null
@@ -1,93 +0,0 @@
-variable "credentials" {
-  # Example: "~/accounts.json"
-  default = ""
-}
-
-variable "project_name" {
-  default = ""
-}
-
-
-variable "instance_count" {
-  default = 3
-}
-
-# PEM Instance Count
-variable "pem_instance_count" {
-  default = 0
-}
-
-# Synchronicity
-variable "synchronicity" {
-  default = "asynchronous"
-}
-
-variable "subnetwork_region" {
-  # Options: 'us-central1','us-east1', 'us-east4', 'us-west1', 'us-west2', 'us-west3' and 'us-west4'
-  default = ""
-}
-
-variable "subnetwork_name" {
-  # Must have network_name tag as a prefix
-  default = "edb-network-subnetwork"  
-}
-
-variable "ip_cidr_range" {
-  default = "10.0.0.0/16"
-}
-
-variable "source_ranges" {
-  default = "0.0.0.0/0"
-}
-
-variable "vm_type" {
-  # Better suite for Replication and EFM
-  #default = "f1-micro"
-  # Better suited for PEM
-  default = "e2-standard-2"
-}
-
-variable "os" {
-  default = "centos-7-v20170816"
-  #default = "centos-7-v20200403
-  #default = "rhel-7-v20200403"
-}
-
-variable "ssh_user" {
-  default = "centos"
-}
-
-variable "ssh_key_location" {
-  # Example: "~/.ssh/id_rsa.pub"
-  default = ""
-}
-
-# Ansible Inventory Filenames
-# Ansible Yaml PEM Inventory Filename
-variable "ansible_pem_inventory_yaml_filename" {
-  default = "pem-inventory.yml"
-}
-
-# OS CSV Filename
-variable "os_csv_filename" {
-  default = "os.csv"
-}
-
-# Ansible Add Hosts Filename
-variable "add_hosts_filename" {
-  type    = string
-  default = "add_host.sh"
-}
-
-# Tags
-variable "prefix" {
-  default = "edb"
-}
-
-variable "instance_name" {
-  default = "edb-vm"
-}
-
-variable "network_name" {
-  default = "edb-network"
-}
diff --git a/terraform/gcloud/variables.tf.template b/terraform/gcloud/variables.tf.template
index 84e171b1..afb50c78 100644
--- a/terraform/gcloud/variables.tf.template
+++ b/terraform/gcloud/variables.tf.template
@@ -7,8 +7,7 @@ variable "project_name" {
   default = ""
 }
 
-
-variable "instance_count" {
+variable "pg_instance_count" {
   default = 3
 }
 
@@ -29,7 +28,7 @@ variable "subnetwork_region" {
 
 variable "subnetwork_name" {
   # Must have network_name tag as a prefix
-  default = "edb-network-subnetwork"  
+  default = "edb-network-subnetwork"
 }
 
 variable "ip_cidr_range" {
@@ -63,9 +62,9 @@ variable "ssh_key_location" {
 }
 
 # Ansible Inventory Filenames
-# Ansible Yaml PEM Inventory Filename
-variable "ansible_pem_inventory_yaml_filename" {
-  default = "pem-inventory.yml"
+# Ansible Yaml Inventory Filename
+variable "ansible_inventory_yaml_filename" {
+  default = "inventory.yml"
 }
 
 # OS CSV Filename
@@ -79,6 +78,12 @@ variable "add_hosts_filename" {
   default = "add_host.sh"
 }
 
+# Ansible Hosts Filename
+variable "hosts_filename" {
+  type    = string
+  default = "hosts"
+}
+
 # Tags
 variable "prefix" {
   default = "edb"
@@ -91,3 +96,64 @@ variable "instance_name" {
 variable "network_name" {
   default = "edb-network"
 }
+
+# VM Disks
+# VM disk size
+variable "vm_disk_size" {
+  description = "The size of the VM Disk Size in GB."
+  default = 50
+}
+
+variable "vm_disk_type" {
+  # Enter VM Disk type like pd_standard or pd_ssd
+  # volume_type = "pd-standard"
+  # volume_type = "pd-balanced"
+  # volume_type = "pd-ssd"
+  default = "pd-ssd"
+  type    = string
+}
+
+# Attached Disks
+# Volume Count
+variable "volume_count" {
+  default = 5
+}
+
+# Volume disk types
+variable "volume_disk_type" {
+  # Enter VM volume type like pd_standard or pd_ssd
+  # volume_type = "pd-standard"
+  # volume_type = "pd-balanced"
+  # volume_type = "pd-ssd"
+  default = "pd-ssd"
+  type    = string
+}
+
+# Volume disk size
+variable "volume_disk_size" {
+  description = "The size of the Volume Disk Size in GB."
+  default = 10
+}
+
+# Volume disk iops
+variable "volume_iops" {
+  description = "The iops for volume."
+  default = 250
+}
+
+# Volume disk encryption
+variable "volume_encryption" {
+  description = "The encryption type for volume."
+  default = "false"
+}
+
+variable "full_private_ssh_key_path" {
+  description = "SSH private key path from local machine"
+  type        = string
+  # Example: "~/mypemfile.pem"
+  default = ""
+}
+
+variable "disk_encryption_key" {
+  default = "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0="
+}


Test patch:
diff --git a/terraform/aws/sqlexec/roles/edb.postgres.sqlexec/tests/inventory b/terraform/aws/sqlexec/roles/edb.postgres.sqlexec/tests/inventory
deleted file mode 100755
index 878877b0..00000000
--- a/terraform/aws/sqlexec/roles/edb.postgres.sqlexec/tests/inventory
+++ /dev/null
@@ -1,2 +0,0 @@
-localhost
-
diff --git a/terraform/aws/sqlexec/roles/edb.postgres.sqlexec/tests/test.yml b/terraform/aws/sqlexec/roles/edb.postgres.sqlexec/tests/test.yml
deleted file mode 100755
index 76d2d0b7..00000000
--- a/terraform/aws/sqlexec/roles/edb.postgres.sqlexec/tests/test.yml
+++ /dev/null
@@ -1,5 +0,0 @@
----
-- hosts: localhost
-  remote_user: root
-  roles:
-    - edb.postgres.sqlexec
diff --git a/terraform/azure/sqlexec/roles/edb.postgres.sqlexec/tests/inventory b/terraform/azure/sqlexec/roles/edb.postgres.sqlexec/tests/inventory
deleted file mode 100755
index 878877b0..00000000
--- a/terraform/azure/sqlexec/roles/edb.postgres.sqlexec/tests/inventory
+++ /dev/null
@@ -1,2 +0,0 @@
-localhost
-
diff --git a/terraform/azure/sqlexec/roles/edb.postgres.sqlexec/tests/test.yml b/terraform/azure/sqlexec/roles/edb.postgres.sqlexec/tests/test.yml
deleted file mode 100755
index 76d2d0b7..00000000
--- a/terraform/azure/sqlexec/roles/edb.postgres.sqlexec/tests/test.yml
+++ /dev/null
@@ -1,5 +0,0 @@
----
-- hosts: localhost
-  remote_user: root
-  roles:
-    - edb.postgres.sqlexec
diff --git a/terraform/gcloud/sqlexec/roles/edb.postgres.sqlexec/tests/inventory b/terraform/gcloud/sqlexec/roles/edb.postgres.sqlexec/tests/inventory
deleted file mode 100755
index 878877b0..00000000
--- a/terraform/gcloud/sqlexec/roles/edb.postgres.sqlexec/tests/inventory
+++ /dev/null
@@ -1,2 +0,0 @@
-localhost
-
diff --git a/terraform/gcloud/sqlexec/roles/edb.postgres.sqlexec/tests/test.yml b/terraform/gcloud/sqlexec/roles/edb.postgres.sqlexec/tests/test.yml
deleted file mode 100755
index 76d2d0b7..00000000
--- a/terraform/gcloud/sqlexec/roles/edb.postgres.sqlexec/tests/test.yml
+++ /dev/null
@@ -1,5 +0,0 @@
----
-- hosts: localhost
-  remote_user: root
-  roles:
-    - edb.postgres.sqlexec