Skip to content

Commit

Permalink
Merge pull request #2279 from bcgov/fix-2276-deploy
Browse files Browse the repository at this point in the history
Fix 2276 deploy
  • Loading branch information
joshgamache authored Feb 15, 2024
2 parents f08edb5 + 008b2cd commit ebf9bb2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,9 @@ app/tests/perf/**/*.json
k6files/

.terraform
.terraform/
*.tfstate
*.tfvars
.terraform.lock.hcl
credentials.json
terraform/*.sh
5 changes: 2 additions & 3 deletions helm/cas-ciip-portal/templates/jobs/terraform-apply.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,13 @@ spec:
name: gcp-credentials-secret
key: gcp_project_id
- name: TF_VAR_openshift_namespace
value: "{{ .Release.Namespace | quote }}"
value: {{ .Release.Namespace | quote }}
- name: TF_VAR_apps
value: '["ciip-backups", "ciip-documents", "ciip-2018"]'
- name: kubernetes_host
value: "https://api.silver.devops.gov.bc.ca:6443"
- name: GOOGLE_APPLICATION_CREDENTIALS
value: "/etc/gcp/credentials.json"
# Terraform was having an issue pulling kubernetes_host in as a TF_VAR, so we add it as a attribute to the command
command:
- /bin/sh
- -c
Expand All @@ -55,7 +54,7 @@ spec:
cd working;
export TF_VAR_kubernetes_token=$( cat /var/run/secrets/kubernetes.io/serviceaccount/token );
terraform init -backend-config=/etc/tf/gcs.tfbackend;
terraform apply -var=\"kubernetes_host=$kubernetes_host\" -auto-approve";
terraform apply -var="kubernetes_host=$kubernetes_host" -auto-approve;
restartPolicy: Never
volumes:
- name: service-account-credentials-volume
Expand Down

0 comments on commit ebf9bb2

Please sign in to comment.