1
0

Taskfile.Terraform.yml 941 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. version: '3'
  2. env:
  3. AWS_PROFILE: test
  4. VAULT_ADDR: "https://vault.prod.newmotion.com"
  5. VAULT_TOKEN: ""
  6. TF_VAR_region: eu-west-1
  7. TF_VAR_team: sre
  8. TF_VAR_repo: https://github.com/sede-enterprise/srseu-sre-
  9. TF_VAR_gh-runner-name: randomstring
  10. tasks:
  11. init:
  12. cmds:
  13. #- aws sso login --profile=shellsso-test
  14. - terraform init
  15. - terraform workspace select -or-create test
  16. validate:
  17. cmds:
  18. - terraform validate
  19. plan:
  20. cmds:
  21. - terraform plan -var-file="tfvars/test.tfvars"
  22. apply:
  23. cmds:
  24. - terraform apply -var-file="tfvars/test.tfvars"
  25. destroy:
  26. cmds:
  27. - terraform destroy -var-file="tfvars/test.tfvars"
  28. fmt:
  29. cmds:
  30. - terraform fmt -recursive
  31. lint:
  32. cmds:
  33. - tflint --var-file=tfvars/test.tfvars
  34. precommit:
  35. cmds:
  36. - pre-commit autoupdate
  37. - pre-commit run --all-files
  38. cleanup:
  39. cmds:
  40. - rm -rf .terraform* terraform.*