Update .gitlab-ci.yml, terraform.tf
This commit is contained in:
@@ -11,7 +11,6 @@ before_script:
|
||||
- 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 --version
|
||||
- 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"
|
||||
- terraform output kubeconfig | base64 -d > kubeconfig
|
||||
|
||||
plan:
|
||||
stage: plan
|
||||
@@ -55,6 +54,8 @@ apply:
|
||||
- .terraform
|
||||
script:
|
||||
- terraform apply -auto-approve -var-file=terraform.tfvars
|
||||
after_script:
|
||||
- curl --request POST --header "PRIVATE-TOKEN:${CI_JOB_TOKEN}" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/variables" --form "key=kubeconfig" --form "value=$(cat config)"
|
||||
dependencies:
|
||||
- plan
|
||||
only:
|
||||
@@ -63,7 +64,6 @@ apply:
|
||||
- terraform.tfvars
|
||||
when: manual
|
||||
|
||||
|
||||
destroy:
|
||||
stage: destroy
|
||||
image:
|
||||
|
||||
15688
terraform.tf
15688
terraform.tf
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user