File tree Expand file tree Collapse file tree 7 files changed +8
-72
lines changed Expand file tree Collapse file tree 7 files changed +8
-72
lines changed Original file line number Diff line number Diff line change 8
8
9
9
env :
10
10
PIPELINE_SA_KEY : ${{ secrets.GCP_SA_KEY }}
11
- PIPELINE_GOOGLE_SERVICE_ACCOUNT_CLOUD_FUNCTIONS : ${{ secrets.GCP_SERVICE_ACCOUNT_CLOUD_FUNCTIONS }}
12
- PIPELINE_GOOGLE_SERVICE_ACCOUNT_API_GATEWAY : ${{ secrets.GCP_SERVICE_ACCOUNT_API_GATEWAY }}
13
11
14
12
jobs :
15
13
test :
54
52
- name : Terraform Plan
55
53
id : plan
56
54
run : |
57
- terraform plan -no-color -var="google_service_account_cloud_functions=${{ env.PIPELINE_GOOGLE_SERVICE_ACCOUNT_CLOUD_FUNCTIONS }}" \
58
- -var="google_service_account_api_gateway=${{ env.PIPELINE_GOOGLE_SERVICE_ACCOUNT_API_GATEWAY }}"
55
+ terraform plan -no-color
59
56
continue-on-error : true
60
57
61
58
- name : Terraform Plan status
65
62
- name : Terraform Apply
66
63
id : apply
67
64
run : |
68
- terraform apply -var="google_service_account_cloud_functions=${{ env.PIPELINE_GOOGLE_SERVICE_ACCOUNT_CLOUD_FUNCTIONS }}" \
69
- -var="google_service_account_api_gateway=${{ env.PIPELINE_GOOGLE_SERVICE_ACCOUNT_API_GATEWAY }}" \
70
- -auto-approve
65
+ terraform apply -auto-approve
71
66
72
67
deploy_production :
73
68
if : github.ref == 'refs/heads/main'
102
97
- name : Terraform Plan
103
98
id : plan
104
99
run : |
105
- terraform plan -no-color -var="google_service_account_cloud_functions=${{ env.PIPELINE_GOOGLE_SERVICE_ACCOUNT_CLOUD_FUNCTIONS }}" \
106
- -var="google_service_account_api_gateway=${{ env.PIPELINE_GOOGLE_SERVICE_ACCOUNT_API_GATEWAY }}"
100
+ terraform plan -no-color
107
101
continue-on-error : true
108
102
109
103
- name : Terraform Plan status
@@ -113,6 +107,4 @@ jobs:
113
107
- name : Terraform Apply
114
108
id : apply
115
109
run : |
116
- terraform apply -var="google_service_account_cloud_functions=${{ env.PIPELINE_GOOGLE_SERVICE_ACCOUNT_CLOUD_FUNCTIONS }}" \
117
- -var="google_service_account_api_gateway=${{ env.PIPELINE_GOOGLE_SERVICE_ACCOUNT_API_GATEWAY }}" \
118
- -auto-approve
110
+ terraform apply -auto-approve
Original file line number Diff line number Diff line change @@ -17,16 +17,16 @@ variable "project_database" {
17
17
description = " The database name"
18
18
default = " tech-report-api-prod" // TODO: Update this to the DEV database name
19
19
}
20
-
21
20
variable "google_service_account_cloud_functions" {
22
21
type = string
23
22
description = " Service account for Cloud Functions"
23
+
24
24
}
25
25
variable "google_service_account_api_gateway" {
26
26
type = string
27
27
description = " Service account for API Gateway"
28
+
28
29
}
29
-
30
30
variable "min_instances" {
31
31
description = " (Optional) The limit on the minimum number of function instances that may coexist at a given time."
32
32
type = number
Original file line number Diff line number Diff line change @@ -14,21 +14,3 @@ variable "service_account_email" {
14
14
description = " Email of the service account associated with and to run the API Gateway"
15
15
type = string
16
16
}
17
-
18
-
19
-
20
-
21
-
22
-
23
-
24
-
25
-
26
-
27
-
28
-
29
-
30
-
31
-
32
-
33
-
34
-
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -17,14 +17,15 @@ variable "project_database" {
17
17
description = " The database name"
18
18
default = " tech-report-api-prod"
19
19
}
20
-
21
20
variable "google_service_account_cloud_functions" {
22
21
type = string
23
22
description = " Service account for Cloud Functions"
23
+
24
24
}
25
25
variable "google_service_account_api_gateway" {
26
26
type = string
27
27
description = " Service account for API Gateway"
28
+
28
29
}
29
30
variable "min_instances" {
30
31
description = " (Optional) The limit on the minimum number of function instances that may coexist at a given time."
You can’t perform that action at this time.
0 commit comments