Skip to content

Commit efb2eaa

Browse files
committed
fmt
1 parent 87d6a65 commit efb2eaa

File tree

5 files changed

+33
-33
lines changed

5 files changed

+33
-33
lines changed

functions/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ module "cronjob-gen2" {
8282
target_function_name = module.cloud_function_gen2[each.value.name].function_name
8383
https_trigger_url = module.cloud_function_gen2[each.value.name].function_trigger_url
8484
# passing the static values
85-
target_project = var.project
86-
target_region = var.region
85+
target_project = var.project
86+
target_region = var.region
8787
deploy_sa_email = var.deploy_sa_email
8888

8989
depends_on = [

infrastructure/permissions.tf

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
# Project-wide roles
22
locals {
3-
roles = [
4-
"roles/viewer", # general read-only access to most Google Cloud resources
5-
"roles/storage.admin", # full access to manage GCS buckets and objects
6-
"roles/secretmanager.secretAccessor", # access to Secret Manager
7-
"roles/cloudfunctions.developer", # deploy and manage Cloud Functions
8-
"roles/logging.viewer", # view logs
9-
"roles/iam.serviceAccountUser", # necessary to invoke Cloud Functions
10-
"roles/iam.workloadIdentityPoolViewer" # view workload identity pool
11-
]
3+
roles = [
4+
"roles/viewer", # general read-only access to most Google Cloud resources
5+
"roles/storage.admin", # full access to manage GCS buckets and objects
6+
"roles/secretmanager.secretAccessor", # access to Secret Manager
7+
"roles/cloudfunctions.developer", # deploy and manage Cloud Functions
8+
"roles/logging.viewer", # view logs
9+
"roles/iam.serviceAccountUser", # necessary to invoke Cloud Functions
10+
"roles/iam.workloadIdentityPoolViewer" # view workload identity pool
11+
]
1212
}
1313

1414
resource "google_project_iam_member" "project_roles" {
1515
for_each = toset(local.roles)
16-
project = var.project
17-
role = each.value
18-
member = "serviceAccount:${google_service_account.gha_cloud_functions_deployment.email}"
16+
project = var.project
17+
role = each.value
18+
member = "serviceAccount:${google_service_account.gha_cloud_functions_deployment.email}"
1919

2020
}

main.tf

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ provider "google" {
2828
}
2929

3030
resource "google_storage_bucket" "staging_bucket" {
31-
name = "${local.project}-cloud-function-staging"
32-
location = "US"
33-
force_destroy = true
31+
name = "${local.project}-cloud-function-staging"
32+
location = "US"
33+
force_destroy = true
3434
public_access_prevention = "enforced"
3535
}
3636

@@ -40,8 +40,8 @@ resource "google_storage_bucket_iam_binding" "staging-bucket-iam" {
4040

4141
members = ["serviceAccount:${module.infrastructure.deploy_sa_email}"]
4242

43-
depends_on = [
44-
module.infrastructure,
43+
depends_on = [
44+
module.infrastructure,
4545
google_storage_bucket.staging_bucket
4646
]
4747
}
@@ -53,10 +53,10 @@ resource "google_storage_bucket_iam_member" "staging_bucket_get" {
5353
}
5454

5555
resource "google_storage_bucket" "tf-state" {
56-
name = "${local.project}-tfstate"
57-
force_destroy = false
58-
location = "US"
59-
storage_class = "STANDARD"
56+
name = "${local.project}-tfstate"
57+
force_destroy = false
58+
location = "US"
59+
storage_class = "STANDARD"
6060
public_access_prevention = "enforced"
6161
versioning {
6262
enabled = true
@@ -69,8 +69,8 @@ resource "google_storage_bucket_iam_binding" "tfstate-bucket-iam" {
6969

7070
members = ["serviceAccount:${module.infrastructure.deploy_sa_email}"]
7171

72-
depends_on = [
73-
module.infrastructure,
72+
depends_on = [
73+
module.infrastructure,
7474
google_storage_bucket.tf-state
7575
]
7676
}

modules/cloud-function-gen2/variables.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ variable "runtime" {
3131
type = string
3232
description = "Function runtime, default python 3.11"
3333
default = "python311"
34-
nullable=false
34+
nullable = false
3535
}
3636

3737
variable "source_object_prefix" {
@@ -56,21 +56,21 @@ variable "trigger_http" {
5656
type = bool
5757
description = "Whether or not the trigger for this cloud function should be an HTTP endpoint"
5858
default = true
59-
nullable=false
59+
nullable = false
6060
}
6161

6262
variable "execution_timeout" {
6363
type = number
6464
description = "Amount of time function can execute before timing out, in seconds"
6565
default = 60
66-
nullable=false
66+
nullable = false
6767
}
6868

6969
variable "available_memory_mb" {
7070
type = string
7171
description = "Amount of memory assigned to each execution"
7272
default = "128M"
73-
nullable=false
73+
nullable = false
7474
}
7575

7676
variable "temp_zip_output_dir" {

modules/cloud-function/variables.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ variable "runtime" {
2424
type = string
2525
description = "Function runtime, default python 3.11"
2626
default = "python311"
27-
nullable=false
27+
nullable = false
2828
}
2929

3030
variable "source_object_prefix" {
@@ -49,21 +49,21 @@ variable "trigger_http" {
4949
type = bool
5050
description = "Whether or not the trigger for this cloud function should be an HTTP endpoint"
5151
default = true
52-
nullable=false
52+
nullable = false
5353
}
5454

5555
variable "execution_timeout" {
5656
type = number
5757
description = "Amount of time function can execute before timing out, in seconds"
5858
default = 60
59-
nullable=false
59+
nullable = false
6060
}
6161

6262
variable "available_memory_mb" {
6363
type = number
6464
description = "Amount of memory assigned to each execution"
6565
default = 128
66-
nullable=false
66+
nullable = false
6767
}
6868

6969
variable "temp_zip_output_dir" {

0 commit comments

Comments
 (0)