Skip to content

Increase memory allocated to update_expired_airtable_issues #4199

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

Merged
merged 2 commits into from
Aug 18, 2025

Conversation

jparr
Copy link
Contributor

@jparr jparr commented Aug 15, 2025

Copy link

github-actions bot commented Aug 15, 2025

Terraform plan in iac/cal-itp-data-infra/cloud-functions/us

Plan: 3 to add, 0 to change, 1 to destroy. Changes to Outputs.
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
+   create
-   destroy

Terraform will perform the following actions:

  # google_cloud_scheduler_job.update_expired_airtable_issues will be created
+   resource "google_cloud_scheduler_job" "update_expired_airtable_issues" {
+       description = "Trigger Cloud Function weekly on Fridays at 5 AM PST"
+       id          = (known after apply)
+       name        = "update-expired-airtable-issues-tf-job"
+       paused      = (known after apply)
+       project     = "cal-itp-data-infra"
+       region      = "us-west2"
+       schedule    = "0 5 * * 5"
+       state       = (known after apply)
+       time_zone   = "America/Los_Angeles"

+       http_target {
+           http_method = "POST"
+           uri         = (known after apply)

+           oidc_token {
+               service_account_email = "[email protected]"
            }
        }
    }

  # google_cloudfunctions2_function.update_airtable will be destroyed
  # (because google_cloudfunctions2_function.update_airtable is not in configuration)
-   resource "google_cloudfunctions2_function" "update_airtable" {
-       effective_labels = {
-           "goog-terraform-provisioned" = "true"
        } -> null
-       environment      = "GEN_2" -> null
-       id               = "projects/cal-itp-data-infra/locations/us-west2/functions/update-expired-airtable-issues-tf" -> null
-       labels           = {} -> null
-       location         = "us-west2" -> null
-       name             = "update-expired-airtable-issues-tf" -> null
-       project          = "cal-itp-data-infra" -> null
-       state            = "FAILED" -> null
-       terraform_labels = {
-           "goog-terraform-provisioned" = "true"
        } -> null
-       update_time      = "2025-08-05T05:58:07.439012530Z" -> null
-       url              = "https://us-west2-cal-itp-data-infra.cloudfunctions.net/update-expired-airtable-issues-tf" -> null
#        (2 unchanged attributes hidden)

-       build_config {
-           build                 = "projects/1005246706141/locations/us-west2/builds/f9ce354f-1346-4360-9d5f-b06238ff2c55" -> null
-           docker_repository     = "projects/cal-itp-data-infra/locations/us-west2/repositories/gcf-artifacts" -> null
-           entry_point           = "update_expired_airtable_issues" -> null
-           environment_variables = {} -> null
-           runtime               = "python311" -> null
#            (2 unchanged attributes hidden)

-           automatic_update_policy {}

-           source {
-               storage_source {
-                   bucket     = "cal-itp-data-infra-cf-source" -> null
-                   generation = 1754373394907631 -> null
-                   object     = "update-expired-airtable-issues.zip" -> null
                }
            }
        }
    }

  # google_cloudfunctions2_function.update_expired_airtable_issues will be created
+   resource "google_cloudfunctions2_function" "update_expired_airtable_issues" {
+       effective_labels = {
+           "goog-terraform-provisioned" = "true"
        }
+       environment      = (known after apply)
+       id               = (known after apply)
+       location         = "us-west2"
+       name             = "update-expired-airtable-issues-tf2"
+       project          = "cal-itp-data-infra"
+       state            = (known after apply)
+       terraform_labels = {
+           "goog-terraform-provisioned" = "true"
        }
+       update_time      = (known after apply)
+       url              = (known after apply)

+       build_config {
+           build                 = (known after apply)
+           docker_repository     = (known after apply)
+           entry_point           = "update_expired_airtable_issues"
+           environment_variables = (known after apply)
+           runtime               = "python311"
+           service_account       = (known after apply)

+           automatic_update_policy (known after apply)

+           source {
+               storage_source {
+                   bucket     = "cal-itp-data-infra-cf-source-tf"
+                   generation = (known after apply)
+                   object     = "update-expired-airtable-issues.zip"
                }
            }
        }

+       service_config {
+           all_traffic_on_latest_revision   = true
+           available_cpu                    = (known after apply)
+           available_memory                 = "512M"
+           environment_variables            = (known after apply)
+           gcf_uri                          = (known after apply)
+           ingress_settings                 = "ALLOW_ALL"
+           max_instance_count               = (known after apply)
+           max_instance_request_concurrency = (known after apply)
+           service                          = "update-expired-airtable-issues-tf-service"
+           service_account_email            = "[email protected]"
+           timeout_seconds                  = 540
+           uri                              = (known after apply)

+           secret_environment_variables {
+               key        = "F_AIRTABLE_TOKEN"
+               project_id = "******************"
+               secret     = "F_AIRTABLE_TOKEN"
+               version    = "latest"
            }
+           secret_environment_variables {
+               key        = "F_EMAIL_WORD"
+               project_id = "******************"
+               secret     = "F_EMAIL_WORD"
+               version    = "latest"
            }
+           secret_environment_variables {
+               key        = "F_SENDER_EMAIL"
+               project_id = "******************"
+               secret     = "F_SENDER_EMAIL"
+               version    = "latest"
            }
        }
    }

  # google_storage_bucket_object.update-expired-airtable-issues will be created
+   resource "google_storage_bucket_object" "update-expired-airtable-issues" {
+       bucket              = "cal-itp-data-infra-cf-source-tf"
+       content             = (sensitive value)
+       content_disposition = "attachment"
+       content_type        = "application/zip"
+       crc32c              = (known after apply)
+       detect_md5hash      = "different hash"
+       generation          = (known after apply)
+       id                  = (known after apply)
+       kms_key_name        = (known after apply)
+       md5hash             = (known after apply)
+       md5hexhash          = (known after apply)
+       media_link          = (known after apply)
+       name                = "update-expired-airtable-issues.zip"
+       output_name         = (known after apply)
+       self_link           = (known after apply)
+       source              = "update-expired-airtable-issues.zip"
+       storage_class       = (known after apply)
    }

Plan: 3 to add, 0 to change, 1 to destroy.

Changes to Outputs:
-   function_name                       = "update-expired-airtable-issues-tf" -> null
+   update_expired_airtable_issues_name = "update-expired-airtable-issues-tf2"
+   update_expired_airtable_issues_uri  = (known after apply)

📝 Plan generated in Terraform Plan #447

Copy link
Contributor

@fsalemi fsalemi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks Good. Thanks Jeff.

@jparr jparr merged commit 78c3bd4 into main Aug 18, 2025
4 checks passed
@jparr jparr deleted the mov/4153-increase-cf-memory branch August 18, 2025 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants