image: name: hashicorp/terraform:light entrypoint: [""] stages: - tf-validate - tf-plan - tf-apply - tf-destroy tf-validate: stage: tf-validate script: - terraform init - terraform validate tf-plan-private: stage: tf-plan script: - terraform init - terraform plan -out plan.tfplan environment: name: Just Jammin url: https://ejam.vereto.net artifacts: paths: - plan.tfplan tf-plan-public: stage: tf-plan script: - terraform init - terraform plan -out plan.tfplan -var="broadcast_enabled=true" environment: name: Public Jammin url: https://ejam.vereto.net artifacts: paths: - plan.tfplan tf-apply-private: stage: tf-apply image: name: hashicorp/terraform entrypoint: [""] before_script: - apk add ansible - ansible-galaxy collection install community.docker - chmod 600 jamulus.pem script: - terraform init - terraform apply plan.tfplan environment: name: Just Jammin url: https://ejam.vereto.net dependencies: - tf-plan-private when: manual only: - master tf-apply-public: stage: tf-apply image: name: hashicorp/terraform entrypoint: [""] before_script: - apk add ansible - ansible-galaxy collection install community.docker - chmod 600 jamulus.pem script: - terraform init - terraform apply plan.tfplan environment: name: Public Jammin url: https://ejam.vereto.net dependencies: - tf-plan-public when: manual only: - master tf-destroy: stage: tf-destroy image: name: hashicorp/terraform entrypoint: [""] before_script: - apk add ansible - chmod 600 jamulus.pem script: - terraform init - terraform destroy -auto-approve dependencies: - tf-plan when: manual only: - master