From e537c581b5b7f884b7534775f3c3e048813c1711 Mon Sep 17 00:00:00 2001 From: Gabi Date: Thu, 3 Nov 2022 08:19:48 +0200 Subject: [PATCH] make installer machine use the same RHET version as CLI Mode + choose specific java version Former-commit-id: 2486a6ac35b18187320871b84ffd542d160c58a0 --- deploy/installer_machine/main.tf | 2 +- deploy/installer_machine/prepare_installer.tpl | 2 +- deploy/installer_machine/variables.tf | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/deploy/installer_machine/main.tf b/deploy/installer_machine/main.tf index 8c8cc617b..d91a659fa 100644 --- a/deploy/installer_machine/main.tf +++ b/deploy/installer_machine/main.tf @@ -66,7 +66,7 @@ data "aws_ami" "installer-ami" { filter { name = "name" - values = ["RHEL-7.9*"] + values = [var.installer_ami_name_tag] } filter { diff --git a/deploy/installer_machine/prepare_installer.tpl b/deploy/installer_machine/prepare_installer.tpl index 548c3519a..bd7a44adf 100644 --- a/deploy/installer_machine/prepare_installer.tpl +++ b/deploy/installer_machine/prepare_installer.tpl @@ -8,7 +8,7 @@ yum -y install git yum install -y yum-utils yum-config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo yum -y install terraform -yum -y install java-11-openjdk-devel +yum -y install java-11-openjdk-devel-11.0.17.0.8-2.el8_6 export JAVA_HOME="/usr/lib/jvm/java-11-openjdk-11.0.17.0.8-2.el7_9.x86_64/bin/java" git clone https://github.com/imperva/dsfkit.git diff --git a/deploy/installer_machine/variables.tf b/deploy/installer_machine/variables.tf index 486146af1..c59f0ea9e 100644 --- a/deploy/installer_machine/variables.tf +++ b/deploy/installer_machine/variables.tf @@ -27,3 +27,9 @@ variable "web_console_cidr" { default = null } + +variable "installer_ami_name_tag" { + type = string + default = "RHEL-8.6.0_HVM-20220503-x86_64-2-Hourly2-GP2" # Exists on all regions +} +