Skip to content

Commit

Permalink
Merge branch 'main' into aman/issue_99
Browse files Browse the repository at this point in the history
  • Loading branch information
amanpruthi authored Mar 26, 2024
2 parents 70ddfc6 + 2508f13 commit 5591cd4
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 2 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

All notable changes to this project will be documented in this file.

### [3.0.1](https://github.com/wandb/terraform-google-wandb/compare/v3.0.0...v3.0.1) (2024-03-22)


### Bug Fixes

* **dev:** Add passthrough for env vars ([#112](https://github.com/wandb/terraform-google-wandb/issues/112)) ([02278b0](https://github.com/wandb/terraform-google-wandb/commit/02278b0772337dbad615be13a67caf96d67ac2b3))

## [3.0.0](https://github.com/wandb/terraform-google-wandb/compare/v2.0.1...v3.0.0) (2024-03-15)


Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ No resources.
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_allowed_inbound_cidrs"></a> [allowed\_inbound\_cidrs](#input\_allowed\_inbound\_cidrs) | Which IPv4 addresses/ranges to allow access. This must be explicitly provided, and by default is set to ["*"] | `list(string)` | <pre>[<br> "*"<br>]</pre> | no |
| <a name="input_app_wandb_env"></a> [app\_wandb\_env](#input\_app\_wandb\_env) | Extra environment variables for W&B | `map(string)` | `{}` | no |
| <a name="input_bucket_name"></a> [bucket\_name](#input\_bucket\_name) | Use an existing bucket. | `string` | `""` | no |
| <a name="input_create_redis"></a> [create\_redis](#input\_create\_redis) | Boolean indicating whether to provision an redis instance (true) or not (false). | `bool` | `false` | no |
| <a name="input_create_workload_identity"></a> [create\_workload\_identity](#input\_create\_workload\_identity) | Flag to indicate whether to create a workload identity for the service account. | `bool` | `true` | no |
Expand All @@ -116,6 +117,7 @@ No resources.
| <a name="input_oidc_issuer"></a> [oidc\_issuer](#input\_oidc\_issuer) | A url to your Open ID Connect identity provider, i.e. https://cognito-idp.us-east-1.amazonaws.com/us-east-1_uiIFNdacd | `string` | `""` | no |
| <a name="input_oidc_secret"></a> [oidc\_secret](#input\_oidc\_secret) | The Client secret of application in your identity provider | `string` | `""` | no |
| <a name="input_other_wandb_env"></a> [other\_wandb\_env](#input\_other\_wandb\_env) | Extra environment variables for W&B | `map(string)` | `{}` | no |
| <a name="input_parquet_wandb_env"></a> [parquet\_wandb\_env](#input\_parquet\_wandb\_env) | Extra environment variables for W&B | `map(string)` | `{}` | no |
| <a name="input_redis_reserved_ip_range"></a> [redis\_reserved\_ip\_range](#input\_redis\_reserved\_ip\_range) | Reserved IP range for REDIS peering connection | `string` | `"10.30.0.0/16"` | no |
| <a name="input_redis_tier"></a> [redis\_tier](#input\_redis\_tier) | Specifies the tier for this Redis instance | `string` | `"STANDARD_HA"` | no |
| <a name="input_resource_limits"></a> [resource\_limits](#input\_resource\_limits) | Specifies the resource limits for the wandb deployment | `map(string)` | <pre>{<br> "cpu": null,<br> "memory": null<br>}</pre> | no |
Expand All @@ -129,6 +131,7 @@ No resources.
| <a name="input_wandb_image"></a> [wandb\_image](#input\_wandb\_image) | Docker repository of to pull the wandb image from. | `string` | `"wandb/local"` | no |
| <a name="input_wandb_version"></a> [wandb\_version](#input\_wandb\_version) | The version of Weights & Biases local to deploy. | `string` | `"latest"` | no |
| <a name="input_workload_account_id"></a> [workload\_account\_id](#input\_workload\_account\_id) | n/a | `string` | `"workload-identity"` | no |
| <a name="input_weave_wandb_env"></a> [weave\_wandb\_env](#input\_weave\_wandb\_env) | Extra environment variables for W&B | `map(string)` | `{}` | no |

## Outputs

Expand Down
20 changes: 19 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,19 @@ module "gke_app" {
oidc_auth_method = var.oidc_auth_method
oidc_secret = var.oidc_secret
local_restore = var.local_restore

other_wandb_env = merge({
"GORILLA_DISABLE_CODE_SAVING" = var.disable_code_saving,
"GORILLA_CUSTOMER_SECRET_STORE_SOURCE" = local.secret_store_source,
"GORILLA_GLUE_LIST" = true
}, var.other_wandb_env)

weave_wandb_env = var.weave_wandb_env

app_wandb_env = var.app_wandb_env

parquet_wandb_env = var.parquet_wandb_env

wandb_image = var.wandb_image
wandb_version = var.wandb_version
wandb_replicas = 0
Expand Down Expand Up @@ -231,6 +238,10 @@ module "wandb" {
} : null
}

app = {
extraEnvs = var.app_wandb_env
}

ingress = {
nameOverride = var.namespace
annotations = {
Expand All @@ -242,7 +253,14 @@ module "wandb" {

redis = { install = false }
mysql = { install = false }
# weave = { install = false }

weave = {
extraEnvs = var.weave_wandb_env
}

parquet = {
extraEnvs = var.parquet_wandb_env
}
}
}

Expand Down
17 changes: 16 additions & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ variable "size" {
default = null
}


variable "create_workload_identity" {
description = "Flag to indicate whether to create a workload identity for the service account."
type = bool
Expand All @@ -253,4 +252,20 @@ variable "service_account_name" {
default = "workload-identity-sa"
}

variable "weave_wandb_env" {
type = map(string)
description = "Extra environment variables for W&B"
default = {}
}

variable "app_wandb_env" {
type = map(string)
description = "Extra environment variables for W&B"
default = {}
}

variable "parquet_wandb_env" {
type = map(string)
description = "Extra environment variables for W&B"
default = {}
}

0 comments on commit 5591cd4

Please sign in to comment.