Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 2276 deploy #2279

Merged
merged 2 commits into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading