mirror of
https://gitlab.durp.info/durfy/ci-includes/yml.git
synced 2026-05-07 16:00:31 -05:00
update
This commit is contained in:
parent
806bfe7ae5
commit
cc54a82cee
6 changed files with 7 additions and 7 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
#%%MULTILINE_YAML_START
|
#%%MULTILINE_YAML_START
|
||||||
#Terraform validate
|
#Terraform validate
|
||||||
terraform apply -auto-approve $ARGUMENTS
|
tofu apply -auto-approve $ARGUMENTS
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
#%%MULTILINE_YAML_START
|
#%%MULTILINE_YAML_START
|
||||||
#Terraform validate
|
#Terraform validate
|
||||||
terraform destroy -auto-approve $ARGUMENTS
|
tofu destroy -auto-approve $ARGUMENTS
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
#%%MULTILINE_YAML_START
|
#%%MULTILINE_YAML_START
|
||||||
#Terraform fmt
|
#Terraform fmt
|
||||||
terraform fmt -diff -check -write=false
|
tofu fmt -diff -check -write=false
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
#%%MULTILINE_YAML_START
|
#%%MULTILINE_YAML_START
|
||||||
#Terraform init
|
#Terraform init
|
||||||
terraform init -reconfigure -backend-config="address=${GITLAB_TF_ADDRESS}" -backend-config="lock_address=${GITLAB_TF_ADDRESS}/lock" -backend-config="unlock_address=${GITLAB_TF_ADDRESS}/lock" -backend-config="username=gitlab-ci-token" -backend-config="password=${CI_JOB_TOKEN}" -backend-config="lock_method=POST" -backend-config="unlock_method=DELETE" -backend-config="retry_wait_min=5"
|
tofu init -reconfigure -backend-config="address=${GITLAB_TF_ADDRESS}" -backend-config="lock_address=${GITLAB_TF_ADDRESS}/lock" -backend-config="unlock_address=${GITLAB_TF_ADDRESS}/lock" -backend-config="username=gitlab-ci-token" -backend-config="password=${CI_JOB_TOKEN}" -backend-config="lock_method=POST" -backend-config="unlock_method=DELETE" -backend-config="retry_wait_min=5"
|
||||||
|
|
|
||||||
|
|
@ -3,5 +3,5 @@
|
||||||
#Terraform plan
|
#Terraform plan
|
||||||
apk add --update curl jq
|
apk add --update curl jq
|
||||||
alias convert_report="jq -r '([.resource_changes[].change.actions?]|flatten)|{\"create\":(map(select(.==\"create\"))|length),\"update\":(map(select(.==\"update\"))|length),\"delete\":(map(select(.==\"delete\"))|length)}'"
|
alias convert_report="jq -r '([.resource_changes[].change.actions?]|flatten)|{\"create\":(map(select(.==\"create\"))|length),\"update\":(map(select(.==\"update\"))|length),\"delete\":(map(select(.==\"delete\"))|length)}'"
|
||||||
terraform plan -out=$PLAN $ARGUMENTS
|
tofu plan -out=$PLAN $ARGUMENTS
|
||||||
terraform show --json $PLAN | convert_report > $JSON_PLAN_FILE
|
tofu show --json $PLAN | convert_report > $JSON_PLAN_FILE
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
#%%MULTILINE_YAML_START
|
#%%MULTILINE_YAML_START
|
||||||
#Terraform validate
|
#Terraform validate
|
||||||
terraform validate
|
tofu validate
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue