Add terraform for infra
This commit is contained in:
@@ -33,7 +33,7 @@ format:
|
|||||||
- tofu fmt -diff -check -write=false
|
- tofu fmt -diff -check -write=false
|
||||||
rules:
|
rules:
|
||||||
- changes:
|
- changes:
|
||||||
- .tf
|
- "infra/terraform/*.tf"
|
||||||
|
|
||||||
validate:
|
validate:
|
||||||
stage: .pre
|
stage: .pre
|
||||||
@@ -43,7 +43,7 @@ validate:
|
|||||||
- tofu validate
|
- tofu validate
|
||||||
rules:
|
rules:
|
||||||
- changes:
|
- changes:
|
||||||
- .tf
|
- "infra/terraform/*.tf"
|
||||||
|
|
||||||
plan-infrastructure:
|
plan-infrastructure:
|
||||||
stage: plan
|
stage: plan
|
||||||
@@ -64,7 +64,7 @@ plan-infrastructure:
|
|||||||
needs: ["validate","format"]
|
needs: ["validate","format"]
|
||||||
rules:
|
rules:
|
||||||
- changes:
|
- changes:
|
||||||
- .tf
|
- "infra/terraform/*.tf"
|
||||||
|
|
||||||
apply-infrastructure:
|
apply-infrastructure:
|
||||||
stage: apply
|
stage: apply
|
||||||
@@ -76,7 +76,7 @@ apply-infrastructure:
|
|||||||
- tofu apply -auto-approve $ARGUMENTS
|
- tofu apply -auto-approve $ARGUMENTS
|
||||||
rules:
|
rules:
|
||||||
- changes:
|
- changes:
|
||||||
- .tf
|
- "infra/terraform/*.tf"
|
||||||
when: manual
|
when: manual
|
||||||
needs: ["plan-infrastructure"]
|
needs: ["plan-infrastructure"]
|
||||||
|
|
||||||
@@ -90,6 +90,6 @@ destroy-infrastructure:
|
|||||||
- tofu destory -auto-approve $ARGUMENTS
|
- tofu destory -auto-approve $ARGUMENTS
|
||||||
rules:
|
rules:
|
||||||
- changes:
|
- changes:
|
||||||
- .tf
|
- "infra/terraform/*.tf"
|
||||||
when: manual
|
when: manual
|
||||||
needs: ["plan-infrastructure"]
|
needs: ["plan-infrastructure"]
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ terraform {
|
|||||||
}
|
}
|
||||||
|
|
||||||
provider "proxmox" {
|
provider "proxmox" {
|
||||||
pm_parallel = 1
|
pm_parallel = 3
|
||||||
pm_tls_insecure = true
|
pm_tls_insecure = true
|
||||||
pm_api_url = var.pm_api_url
|
pm_api_url = var.pm_api_url
|
||||||
pm_user = var.pm_user
|
pm_user = var.pm_user
|
||||||
|
|||||||
Reference in New Issue
Block a user