Skip to content
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

Updated terraform configuration to initialize empty input and ouput directories #4843

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

dwnoble
Copy link
Contributor

@dwnoble dwnoble commented Jan 15, 2025

New variables:

gcs_data_bucket_output_folder = "output"
gcs_data_bucket_input_folder = "input"

Renamed dc_gcs_data_bucket_path_override to gcs_data_bucket_name
Renamed dc_gcs_data_bucket_location to gcs_data_bucket_location

@dwnoble dwnoble requested review from keyurva and kmoscoe January 15, 2025 00:44
@@ -73,6 +73,18 @@ variable "dc_gcs_data_bucket_path_override" {
default = ""
}

variable "dc_gcs_data_bucket_input_folder" {
Copy link
Contributor

@kmoscoe kmoscoe Jan 15, 2025

Choose a reason for hiding this comment

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

This is great! I wonder if we need the "dc" prefix, since we don't use it for other services. Also, is it possible to remove "path" from the previous option? It's kind of misleading since it's only the bucket name. Can we also remove the "override"? We don't name any other optional variables that way, so it seems weird here. I would just call it "gcs_data_bucket_name".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call. Removed dc_ prefix to all of the bucket variables, and renamed the bucket name to gcs_data_bucket_name

@@ -360,7 +374,7 @@ resource "google_cloud_run_v2_job" "dc_data_job" {

env {
name = "INPUT_DIR"
value = "gs://${local.dc_gcs_data_bucket_path}/input"
value = "gs://${local.dc_gcs_data_bucket_path}/${var.dc_gcs_data_bucket_input_folder}"
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we also need one for OUTPUT_DIR, since we're giving them that variable too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Already added that! dc_gcs_data_bucket_output_folder

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