diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 205508852f1ee420fe46a272b9dbebcc360fa062..cc73646ad782ae007bf7325b5a550fee9f2ee4d2 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -83,7 +83,6 @@ apply-gke:
       gitlab-terraform init
       gitlab-terraform apply -auto-approve
 
-
 gcloud-psc:
   stage: psc
   needs:
@@ -134,6 +133,7 @@ check-elastic:
   variables:
     TF_ADDRESS: ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/terraform/state/elastic
     TF_VAR_ec_apikey: $EC_API_KEY
+    TF_var_ec_version: $EC_VERSION
   before_script:
     - |
       export TF_VAR_psc_connection_id=$(cat ${CI_PROJECT_DIR}/pscConnectionId.env | grep GCP_PSC_CONNECTION_ID | cut -d = -f2)
diff --git a/manifests/elastic/main.tf b/manifests/elastic/main.tf
index 021607dddb41edcc454fa5839314c4389cd01041..b09c784a226b383b254d5f2a40ff8d2c82ade2cd 100644
--- a/manifests/elastic/main.tf
+++ b/manifests/elastic/main.tf
@@ -15,7 +15,7 @@ provider "ec" {
 }
 
 data "ec_stack" "stack" {
-  version_regex = "7.16.1"
+  version_regex = var.ec_version
   region        = var.region
 }
 
diff --git a/manifests/elastic/variables.tf b/manifests/elastic/variables.tf
index 02a5f46226f9610d8cf9d23dd116118ebc1a7126..79299aae32ec959e3aca859181560d93865bd572 100644
--- a/manifests/elastic/variables.tf
+++ b/manifests/elastic/variables.tf
@@ -16,3 +16,7 @@ variable "cluster_name" {
   type    = string
   default = "elastic-for-gke"
 }
+
+variable "ec_version" {
+  type = string
+}
\ No newline at end of file