Commit 530c39a7 authored by nimrod's avatar nimrod
Browse files

Replace Terraform with OpenTofu.

parent 84ec8f06
Loading
Loading
Loading
Loading
Loading
+9 −9
Original line number Original line Diff line number Diff line
@@ -5,10 +5,10 @@ include:




.tf_template:
.tf_template:
  image: registry.gitlab.com/gitlab-org/terraform-images/stable:latest
  image: registry.gitlab.com/components/opentofu/gitlab-opentofu:latest-debian
  before_script:
  before_script:
    - cd ${TF_ROOT}
    - cd ${TF_ROOT}
    - terraform version
    - tofu version
  cache:
  cache:
    paths:
    paths:
      - ${TF_ROOT}/.terraform
      - ${TF_ROOT}/.terraform
@@ -25,26 +25,26 @@ include:
  extends: .tf_template
  extends: .tf_template
  stage: test
  stage: test
  script:
  script:
    - gitlab-terraform validate
    - gitlab-tofu validate


.tf_fmt:
.tf_fmt:
  extends: .tf_template
  extends: .tf_template
  stage: test
  stage: test
  script:
  script:
    - gitlab-terraform fmt
    - gitlab-tofu fmt


.tf_validate_fmt:
.tf_validate_fmt:
  extends: .tf_template
  extends: .tf_template
  stage: test
  stage: test
  script:
  script:
    - gitlab-terraform validate
    - gitlab-tofu validate
    - gitlab-terraform fmt
    - gitlab-tofu fmt


.tf_plan:
.tf_plan:
  extends: .tf_template
  extends: .tf_template
  script:
  script:
    - gitlab-terraform plan
    - gitlab-tofu plan
    - gitlab-terraform plan-json
    - gitlab-tofu plan-json
  artifacts:
  artifacts:
    name: plan
    name: plan
    paths:
    paths:
@@ -55,5 +55,5 @@ include:
.tf_apply:
.tf_apply:
  extends: .tf_template
  extends: .tf_template
  script:
  script:
    - gitlab-terraform apply
    - gitlab-tofu apply
  when: manual
  when: manual