-
Notifications
You must be signed in to change notification settings - Fork 302
feat(slurm): add startup_script support to slurm login nodes #5800
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
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -63,6 +63,11 @@ locals { | |
| scopes = var.service_account_scopes | ||
| } | ||
|
|
||
| ghpc_startup_script = [{ | ||
| filename = "ghpc_login_startup.sh" | ||
| content = var.startup_script | ||
| }] | ||
|
Comment on lines
+66
to
+69
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If To prevent this, instead of overriding the user's explicit References
|
||
|
|
||
| # lower, replace `_` with `-`, and remove any non-alphanumeric characters | ||
| group_name = replace( | ||
| replace( | ||
|
|
@@ -114,6 +119,8 @@ locals { | |
| static_ips = var.static_ips | ||
| bandwidth_tier = var.bandwidth_tier | ||
|
|
||
| startup_script = local.ghpc_startup_script | ||
|
|
||
| subnetwork = var.subnetwork_self_link | ||
| tags = var.tags | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If
each.value.startup_scriptis explicitly set tonullor is missing, theconcatfunction will fail at plan-time because it expects all arguments to be lists.To prevent plan-time crashes and safely handle
nullor missing values (in alignment with the general rule of keeping variables nullable and using safe fallbacks), use atry()block to safely access the attribute and default to an empty list[]if it isnullor missing.References
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you please check if this is required to be addressed or not