Skip to content

Commit 90b6711

Browse files
committed
SA name in source code
1 parent 1e10374 commit 90b6711

File tree

7 files changed

+8
-72
lines changed

7 files changed

+8
-72
lines changed

.github/workflows/deployment.yaml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ on:
88

99
env:
1010
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 }}
1311

1412
jobs:
1513
test:
@@ -54,8 +52,7 @@ jobs:
5452
- name: Terraform Plan
5553
id: plan
5654
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
5956
continue-on-error: true
6057

6158
- name: Terraform Plan status
@@ -65,9 +62,7 @@ jobs:
6562
- name: Terraform Apply
6663
id: apply
6764
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
7166
7267
deploy_production:
7368
if: github.ref == 'refs/heads/main'
@@ -102,8 +97,7 @@ jobs:
10297
- name: Terraform Plan
10398
id: plan
10499
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
107101
continue-on-error: true
108102

109103
- name: Terraform Plan status
@@ -113,6 +107,4 @@ jobs:
113107
- name: Terraform Apply
114108
id: apply
115109
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

terraform/dev/variables.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@ variable "project_database" {
1717
description = "The database name"
1818
default = "tech-report-api-prod" // TODO: Update this to the DEV database name
1919
}
20-
2120
variable "google_service_account_cloud_functions" {
2221
type = string
2322
description = "Service account for Cloud Functions"
23+
default = "[email protected]"
2424
}
2525
variable "google_service_account_api_gateway" {
2626
type = string
2727
description = "Service account for API Gateway"
28+
default = "[email protected]"
2829
}
29-
3030
variable "min_instances" {
3131
description = "(Optional) The limit on the minimum number of function instances that may coexist at a given time."
3232
type = number

terraform/modules/api-gateway/variables.tf

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,3 @@ variable "service_account_email" {
1414
description = "Email of the service account associated with and to run the API Gateway"
1515
type = string
1616
}
17-
18-
19-
20-
21-
22-
23-
24-
25-
26-
27-
28-
29-
30-
31-
32-
33-
34-

terraform/modules/service-account/main.tf

Lines changed: 0 additions & 14 deletions
This file was deleted.

terraform/modules/service-account/outputs.tf

Lines changed: 0 additions & 8 deletions
This file was deleted.

terraform/modules/service-account/variables.tf

Lines changed: 0 additions & 17 deletions
This file was deleted.

terraform/prod/variables.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,15 @@ variable "project_database" {
1717
description = "The database name"
1818
default = "tech-report-api-prod"
1919
}
20-
2120
variable "google_service_account_cloud_functions" {
2221
type = string
2322
description = "Service account for Cloud Functions"
23+
default = "[email protected]"
2424
}
2525
variable "google_service_account_api_gateway" {
2626
type = string
2727
description = "Service account for API Gateway"
28+
default = "[email protected]"
2829
}
2930
variable "min_instances" {
3031
description = "(Optional) The limit on the minimum number of function instances that may coexist at a given time."

0 commit comments

Comments
 (0)