diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 9c998cc2dc8e268037c899c108f76f5cb170fd8c..8e12985b65c1cf4728bb15e2425816fe74026c6e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -7,6 +7,8 @@ elastic:
   image:
     name: "hashicorp/terraform:1.0.11"
     entrypoint: [""]
+  variables:
+    TF_VAR_ec_apikey: $EC_API_KEY
   script:
     - cd ./manifests/elastic
     - terraform init 
diff --git a/manifests/elastic/main.tf b/manifests/elastic/main.tf
index 83795c30526400cc02e27535fd15becf20e3e8c3..5c0f658c7336b768e4065bce9b19402d73dd210b 100644
--- a/manifests/elastic/main.tf
+++ b/manifests/elastic/main.tf
@@ -7,4 +7,6 @@ terraform {
   }
 }
 
-provider "ec" {}
\ No newline at end of file
+provider "ec" {
+  apikey = var.ec_apikey
+}
\ No newline at end of file
diff --git a/manifests/elastic/variables.tf b/manifests/elastic/variables.tf
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..2b4efd359de71b54331b9d6a0c9434d6358fced9 100644
--- a/manifests/elastic/variables.tf
+++ b/manifests/elastic/variables.tf
@@ -0,0 +1,3 @@
+variable "ec_apikey" {
+  type = string
+}
\ No newline at end of file