diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1affdae94ef8f9ef5eeac0cddcdbde84fff5f66e..8d778c0d1777c5ae6a6f6ef10cba6070ab1f97cb 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,63 +1,23 @@
-variables:
-  CI_TEMPLATE_REGISTRY_HOST: registry.gitlab.inria.fr
-  TF_STATE_NAME: default
+workflow:
+  rules:
+    - if: $CLOUDSTACK_API_KEY
 
-include:
-  - template: Terraform/Base.gitlab-ci.yml  # https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/ci/templates/Terraform/Base.gitlab-ci.yml
-
-stages:
-  - validate
-  - deploy
-  - execute
-  - cleanup
-
-fmt:
+generate-child-pipeline:
   tags:
     - linux
     - small
-  extends: .terraform:fmt
-
-validate:
-  tags:
-    - linux
-    - small
-  extends: .terraform:validate
-  before_script:
-    - cp $SSH_PRIVATE_KEY id_rsa
-
-deploy:
-  stage: deploy
-  tags:
-    - linux
-    - small
-  script:
-    - cp $SSH_PRIVATE_KEY id_rsa
-    - gitlab-terraform plan -var runner_count=0
-    - gitlab-terraform apply
-    - gitlab-terraform plan -var runner_count=3
-    - gitlab-terraform apply
-
-execute:
-  stage: execute
   image: alpine
-  parallel:
-    matrix:
-      - index: [0, 1, 2]
-  tags:
-    - terraform
-    - docker
-    - runner-$index
   script:
-    - echo Greetings from runner $index!
+    - bash generate-child-pipeline.sh > generated-child-pipeline.yml
+  artifacts:
+    paths:
+      - generated-child-pipeline.yml
 
-cleanup:
-  stage: cleanup
-  tags:
-    - linux
-    - small
-  script:
-    - cd "${TF_ROOT}"
-    - cp $SSH_PRIVATE_KEY id_rsa
-    - gitlab-terraform plan -var runner_count=0
-    - gitlab-terraform apply
-  when: always
+execute-child-pipeline:
+  needs:
+    - generate-child-pipeline
+  trigger:
+    include:
+      - artifact: generated-child-pipeline.yml
+        job: generate-child-pipeline
+  
diff --git a/cloud-init.sh.tftpl b/cloud-init.sh.tftpl
index 2b4d6de68d30eee4e159f0a6d028bdf6fed2e973..ce723c24f3d21d6c52778fc78c7702486e12ab92 100644
--- a/cloud-init.sh.tftpl
+++ b/cloud-init.sh.tftpl
@@ -16,7 +16,7 @@
   # We install docker.io to be able to register a docker executor
   apt-get install --yes gitlab-runner docker.io
   gitlab-runner register --non-interactive \
-    --tag-list terraform,docker,runner-${index} \
+    --tag-list terraform,docker,pipeline-${PIPELINE_ID},runner-${index} \
     --executor docker --docker-image alpine --url https://gitlab.inria.fr \
     --registration-token ${REGISTRATION_TOKEN}
 ) >>/root/log.txt 2>&1
diff --git a/main.tf b/main.tf
index 7683dcfb4c5448845fb9659ca0863208fca2b191..55650b32105e52e8c2aac7b25002375dfb36dda2 100644
--- a/main.tf
+++ b/main.tf
@@ -24,13 +24,13 @@ variable "SSH_PUBLIC_KEY" {
   type = string
 }
 
-variable "runner_count" {
+variable "PIPELINE_ID" {
   type = number
 }
 
 resource "cloudstack_instance" "runner" {
-  count            = var.runner_count
-  name             = "gitlabcigallery-terraform-runner-${count.index}"
+  count            = 3
+  name             = "gitlabcigallery-terraform-pipeline-${var.PIPELINE_ID}-${count.index}"
   service_offering = "Custom"
   template         = "ubuntu-20.04-lts"
   zone             = "zone-ci"
@@ -43,6 +43,7 @@ resource "cloudstack_instance" "runner" {
     index              = count.index
     REGISTRATION_TOKEN = var.REGISTRATION_TOKEN
     SSH_PUBLIC_KEY     = var.SSH_PUBLIC_KEY
+    PIPELINE_ID        = var.PIPELINE_ID
   })
   connection {
     type                = "ssh"