Skip to content

create production job in redirect mode - #53

Open
kyokukou wants to merge 1 commit into
developfrom
create-production-job
Open

create production job in redirect mode#53
kyokukou wants to merge 1 commit into
developfrom
create-production-job

Conversation

@kyokukou

@kyokukou kyokukou commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

Terraform plan · production

Plan: 2 to add, 0 to change, 0 to destroy.

Show full plan
google_service_account.job: Refreshing state... [id=projects/arxiv-production/serviceAccounts/mod-notification-handler@arxiv-production.iam.gserviceaccount.com]
google_pubsub_topic.mod_notify: Refreshing state... [id=projects/arxiv-production/topics/mod-notify]
google_project_iam_member.job["roles/secretmanager.secretAccessor"]: Refreshing state... [id=arxiv-production/roles/secretmanager.secretAccessor/serviceAccount:mod-notification-handler@arxiv-production.iam.gserviceaccount.com]
google_project_iam_member.job["roles/run.invoker"]: Refreshing state... [id=arxiv-production/roles/run.invoker/serviceAccount:mod-notification-handler@arxiv-production.iam.gserviceaccount.com]
google_project_iam_member.job["roles/cloudsql.client"]: Refreshing state... [id=arxiv-production/roles/cloudsql.client/serviceAccount:mod-notification-handler@arxiv-production.iam.gserviceaccount.com]
google_project_iam_member.job["roles/pubsub.subscriber"]: Refreshing state... [id=arxiv-production/roles/pubsub.subscriber/serviceAccount:mod-notification-handler@arxiv-production.iam.gserviceaccount.com]
google_cloud_run_v2_job.jobs["mod_actions"]: Refreshing state... [id=projects/arxiv-production/locations/us-central1/jobs/mod-notification-handler]
google_pubsub_subscription.mod_actions: Refreshing state... [id=projects/arxiv-production/subscriptions/mod-notification-handler]
google_cloud_scheduler_job.jobs["mod_actions"]: Refreshing state... [id=projects/arxiv-production/locations/us-central1/jobs/mod-notification-handler-scheduler-trigger]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # google_cloud_run_v2_job.jobs["daily_update"] will be created
  + resource "google_cloud_run_v2_job" "jobs" {
      + conditions               = (known after apply)
      + create_time              = (known after apply)
      + creator                  = (known after apply)
      + delete_time              = (known after apply)
      + deletion_policy          = "DELETE"
      + deletion_protection      = true
      + effective_annotations    = (known after apply)
      + effective_labels         = {
          + "arxiv-subsystem"            = "eust-modapi"
          + "arxiv-system"               = "eust"
          + "goog-terraform-provisioned" = "true"
        }
      + etag                     = (known after apply)
      + execution_count          = (known after apply)
      + expire_time              = (known after apply)
      + generation               = (known after apply)
      + id                       = (known after apply)
      + labels                   = {
          + "arxiv-subsystem" = "eust-modapi"
          + "arxiv-system"    = "eust"
        }
      + last_modifier            = (known after apply)
      + latest_created_execution = (known after apply)
      + launch_stage             = (known after apply)
      + location                 = "us-central1"
      + name                     = "mod-daily-digest"
      + observed_generation      = (known after apply)
      + project                  = "arxiv-production"
      + reconciling              = (known after apply)
      + terminal_condition       = (known after apply)
      + terraform_labels         = {
          + "arxiv-subsystem"            = "eust-modapi"
          + "arxiv-system"               = "eust"
          + "goog-terraform-provisioned" = "true"
        }
      + uid                      = (known after apply)
      + update_time              = (known after apply)

      + template {
          + labels      = {
              + "arxiv-subsystem" = "eust-modapi"
              + "arxiv-system"    = "eust"
            }
          + parallelism = 1
          + task_count  = 1

          + template {
              + execution_environment = "EXECUTION_ENVIRONMENT_GEN2"
              + max_retries           = 5
              + service_account       = "mod-notification-handler@arxiv-production.iam.gserviceaccount.com"
              + timeout               = "1200s"

              + containers {
                  + args    = [
                      + "-m",
                      + "app.daily_update.main",
                    ]
                  + command = [
                      + "python",
                    ]
                  + image   = "gcr.io/arxiv-production/mod-notification-handler:13cca50a72bebac8879cc757c8d3743f96c2abff"
                  + name    = "mod-daily-digest-1"

                  + env {
                      + name  = "ARCHIVAL_EMAIL"
                        # (1 unchanged attribute hidden)

                      + value_source {
                          + secret_key_ref {
                              + secret  = "mod-notification-archival-email"
                              + version = "latest"
                            }
                        }
                    }
                  + env {
                      + name  = "CLASSIC_DB_URI"
                        # (1 unchanged attribute hidden)

                      + value_source {
                          + secret_key_ref {
                              + secret  = "arxiv-production-rep11-db-readonly_URI"
                              + version = "latest"
                            }
                        }
                    }
                  + env {
                      + name  = "ENV"
                      + value = "PRODUCTION"
                    }
                  + env {
                      + name  = "GCP_PROJECT_ID"
                      + value = "arxiv-production"
                    }
                  + env {
                      + name  = "HALON_CREDS"
                        # (1 unchanged attribute hidden)

                      + value_source {
                          + secret_key_ref {
                              + secret  = "HALON_CREDS"
                              + version = "latest"
                            }
                        }
                    }
                  + env {
                      + name  = "MOD_REPLY_TO"
                        # (1 unchanged attribute hidden)

                      + value_source {
                          + secret_key_ref {
                              + secret  = "mod-notification-mod-reply-to"
                              + version = "latest"
                            }
                        }
                    }
                  + env {
                      + name  = "REDIRECT_EMAILS"
                      + value = "True"
                    }
                  + env {
                      + name  = "REDIRECT_RECIPIENT"
                        # (1 unchanged attribute hidden)

                      + value_source {
                          + secret_key_ref {
                              + secret  = "test-email-group-address"
                              + version = "latest"
                            }
                        }
                    }
                  + env {
                      + name  = "SEND_EMAILS"
                      + value = "True"
                    }

                  + resources {
                      + limits = {
                          + "cpu"    = "1000m"
                          + "memory" = "512Mi"
                        }
                    }

                  + startup_probe (known after apply)

                  + volume_mounts {
                      + mount_path = "/cloudsql"
                      + name       = "cloudsql"
                    }
                }

              + volumes {
                  + name = "cloudsql"

                  + cloud_sql_instance {
                      + instances = [
                          + "arxiv-production:us-central1:arxiv-production-rep11",
                        ]
                    }
                }
            }
        }
    }

  # google_cloud_scheduler_job.jobs["daily_update"] will be created
  + resource "google_cloud_scheduler_job" "jobs" {
      + deletion_policy = "DELETE"
      + description     = "Runs the mod-daily-digest Cloud Run job."
      + id              = (known after apply)
      + name            = "mod-daily-digest-scheduler-trigger"
      + paused          = (known after apply)
      + project         = "arxiv-production"
      + region          = "us-central1"
      + schedule        = "20 14 * * 1-5"
      + state           = (known after apply)
      + time_zone       = "America/New_York"

      + http_target {
          + http_method = "POST"
          + uri         = "https://us-central1-run.googleapis.com/apis/run.googleapis.com/v1/namespaces/arxiv-production/jobs/mod-daily-digest:run"

          + oauth_token {
              + scope                 = "https://www.googleapis.com/auth/cloud-platform"
              + service_account_email = "mod-notification-handler@arxiv-production.iam.gserviceaccount.com"
            }
        }

      + retry_config {
          + max_backoff_duration = "3600s"
          + max_doublings        = 5
          + max_retry_duration   = "0s"
          + min_backoff_duration = "5s"
          + retry_count          = (known after apply)
        }
    }

Plan: 2 to add, 0 to change, 0 to destroy.

─────────────────────────────────────────────────────────────────────────────

Note: You didn't use the -out option to save this plan, so Terraform can't
guarantee to take exactly these actions if you run "terraform apply" now.

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

Terraform plan · development

No changes. Your infrastructure matches the configuration.

Show full plan
google_service_account.job: Refreshing state... [id=projects/arxiv-development/serviceAccounts/mod-notification-handler@arxiv-development.iam.gserviceaccount.com]
google_pubsub_topic.mod_notify: Refreshing state... [id=projects/arxiv-development/topics/mod-notify]
google_pubsub_subscription.mod_actions: Refreshing state... [id=projects/arxiv-development/subscriptions/mod-notification-handler]
google_project_iam_member.job["roles/run.invoker"]: Refreshing state... [id=arxiv-development/roles/run.invoker/serviceAccount:mod-notification-handler@arxiv-development.iam.gserviceaccount.com]
google_project_iam_member.job["roles/pubsub.subscriber"]: Refreshing state... [id=arxiv-development/roles/pubsub.subscriber/serviceAccount:mod-notification-handler@arxiv-development.iam.gserviceaccount.com]
google_project_iam_member.job["roles/cloudsql.client"]: Refreshing state... [id=arxiv-development/roles/cloudsql.client/serviceAccount:mod-notification-handler@arxiv-development.iam.gserviceaccount.com]
google_project_iam_member.job["roles/secretmanager.secretAccessor"]: Refreshing state... [id=arxiv-development/roles/secretmanager.secretAccessor/serviceAccount:mod-notification-handler@arxiv-development.iam.gserviceaccount.com]
google_cloud_run_v2_job.jobs["mod_actions"]: Refreshing state... [id=projects/arxiv-development/locations/us-central1/jobs/mod-notification-handler]
google_cloud_run_v2_job.jobs["daily_update"]: Refreshing state... [id=projects/arxiv-development/locations/us-central1/jobs/mod-daily-digest]
google_cloud_scheduler_job.jobs["mod_actions"]: Refreshing state... [id=projects/arxiv-development/locations/us-central1/jobs/mod-notification-handler-scheduler-trigger]
google_cloud_scheduler_job.jobs["daily_update"]: Refreshing state... [id=projects/arxiv-development/locations/us-central1/jobs/mod-daily-digest-scheduler-trigger]

No changes. Your infrastructure matches the configuration.

Terraform has compared your real infrastructure against your configuration
and found no differences, so no changes are needed.

@kyokukou
kyokukou requested a review from bdc34 September 9, 2026 14:47
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.

1 participant