include:
  - local: /backports/OpenTofu/Base.gitlab-ci.yml

stages: [validate, test, build, deploy, cleanup]

# Required to run everything immediately, instead of manually.

use-component-instead-of-template:
  extends: .opentofu:use-component-instead-of-template

fmt:
  extends: .opentofu:fmt
  rules: [{when: always}]

validate:
  extends: .opentofu:validate
  rules: [{when: always}]

plan:
  extends: .opentofu:plan
  rules: [{when: always}]

apply: 
  extends: .opentofu:apply
  rules: [{when: always}]

destroy:
  extends: .opentofu:destroy
  rules: [{when: always}]

delete-state:
  extends: .opentofu:delete-state
  needs: [destroy]
  rules: [{when: always}]

