From 763e05973b80492e39abbe95c4f0021e4196c62b Mon Sep 17 00:00:00 2001 From: Venkata Date: Fri, 21 Oct 2022 09:10:34 -0700 Subject: [PATCH 1/5] Revert "feat: Add storage account creds" This reverts commit 2d543bea5562e28591da6e49fa57e98d83d2fa92. --- main.tf | 15 +++++++++++++++ outputs.tf | 8 ++++++++ variables.tf | 5 ++++- 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/main.tf b/main.tf index 2caf863..ff9c6a6 100644 --- a/main.tf +++ b/main.tf @@ -39,7 +39,10 @@ module "database" { } module "storage" { +<<<<<<< HEAD count = (var.blob_container == "" && var.external_bucket == "") ? 1 : 0 +======= +>>>>>>> 630ce59 (Revert "feat: Add storage account creds") source = "./modules/storage" namespace = var.namespace resource_group_name = azurerm_resource_group.default.name @@ -76,6 +79,7 @@ module "app_aks" { locals { +<<<<<<< HEAD container_name = try(module.storage[0].container.name, "") account_name = try(module.storage[0].account.name, "") access_key = try(module.storage[0].account.primary_access_key, "") @@ -85,6 +89,10 @@ locals { storage_key = var.external_bucket != "" ? "" : coalesce(var.storage_key, local.access_key, "") bucket = var.external_bucket != "" ? var.external_bucket : "az://${local.storage_account}/${local.blob_container}" queue = (var.use_internal_queue || var.blob_container == "" || var.external_bucket == "") ? "internal://" : "az://${local.account_name}/${local.queue_name}" +======= + blob_container = local.create_blob_container ? "${module.storage.account.name}/${module.storage.container.name}" : var.blob_container + queue = var.use_internal_queue ? "internal://" : "az://${module.storage.account.name}/${module.storage.queue.name}" +>>>>>>> 630ce59 (Revert "feat: Add storage account creds") } module "aks_app" { @@ -109,10 +117,17 @@ module "aks_app" { wandb_image = var.wandb_image wandb_version = var.wandb_version +<<<<<<< HEAD other_wandb_env = merge(var.other_wandb_env, { "AZURE_STORAGE_KEY" = local.storage_key "AZURE_STORAGE_ACCOUNT" = local.storage_account }) +======= + other_wandb_env = { + "AZURE_STORAGE_KEY" = module.storage.account.primary_access_key, + "AZURE_STORAGE_ACCOUNT" = module.storage.account.name, + } +>>>>>>> 630ce59 (Revert "feat: Add storage account creds") # If we dont wait, tf will start trying to deploy while the work group is # still spinning up diff --git a/outputs.tf b/outputs.tf index d3afc96..83b3dff 100644 --- a/outputs.tf +++ b/outputs.tf @@ -30,6 +30,7 @@ output "cluster_ca_certificate" { } output "storage_account" { +<<<<<<< HEAD value = var.external_bucket != "" ? "" : coalesce(var.storage_account, local.account_name, "") } @@ -39,4 +40,11 @@ output "storage_container" { output "external_bucket" { value = var.external_bucket != "" ? var.external_bucket : "" +======= + value = module.storage.account +} + +output "storage_container" { + value = module.storage.container +>>>>>>> 630ce59 (Revert "feat: Add storage account creds") } diff --git a/variables.tf b/variables.tf index e1d84a2..775cbb0 100644 --- a/variables.tf +++ b/variables.tf @@ -139,7 +139,7 @@ variable "create_redis" { ########################################## # External Bucket # ########################################## -# Most users will not need these settings. They are meant for users who want a +# Most users will not need these settings. They are ment for users who want a # bucket in a different account. variable "blob_container" { @@ -147,6 +147,7 @@ variable "blob_container" { description = "Use an existing bucket." default = "" } +<<<<<<< HEAD variable "storage_account" { type = string @@ -171,3 +172,5 @@ variable "external_bucket_region" { type = string default = "" } +======= +>>>>>>> 630ce59 (Revert "feat: Add storage account creds") From 1637a3daaa2d4d0416437666a5c0b558921f1960 Mon Sep 17 00:00:00 2001 From: Venkata Date: Wed, 3 May 2023 16:32:31 -0700 Subject: [PATCH 2/5] feat: Update kube tf version and add var --- main.tf | 17 +---------------- outputs.tf | 8 -------- variables.tf | 9 ++++++--- 3 files changed, 7 insertions(+), 27 deletions(-) diff --git a/main.tf b/main.tf index ff9c6a6..0f9301b 100644 --- a/main.tf +++ b/main.tf @@ -39,10 +39,7 @@ module "database" { } module "storage" { -<<<<<<< HEAD count = (var.blob_container == "" && var.external_bucket == "") ? 1 : 0 -======= ->>>>>>> 630ce59 (Revert "feat: Add storage account creds") source = "./modules/storage" namespace = var.namespace resource_group_name = azurerm_resource_group.default.name @@ -79,7 +76,6 @@ module "app_aks" { locals { -<<<<<<< HEAD container_name = try(module.storage[0].container.name, "") account_name = try(module.storage[0].account.name, "") access_key = try(module.storage[0].account.primary_access_key, "") @@ -89,15 +85,11 @@ locals { storage_key = var.external_bucket != "" ? "" : coalesce(var.storage_key, local.access_key, "") bucket = var.external_bucket != "" ? var.external_bucket : "az://${local.storage_account}/${local.blob_container}" queue = (var.use_internal_queue || var.blob_container == "" || var.external_bucket == "") ? "internal://" : "az://${local.account_name}/${local.queue_name}" -======= - blob_container = local.create_blob_container ? "${module.storage.account.name}/${module.storage.container.name}" : var.blob_container - queue = var.use_internal_queue ? "internal://" : "az://${module.storage.account.name}/${module.storage.queue.name}" ->>>>>>> 630ce59 (Revert "feat: Add storage account creds") } module "aks_app" { source = "wandb/wandb/kubernetes" - version = "1.6.0" + version = var.kube_tf_version license = var.license @@ -117,17 +109,10 @@ module "aks_app" { wandb_image = var.wandb_image wandb_version = var.wandb_version -<<<<<<< HEAD other_wandb_env = merge(var.other_wandb_env, { "AZURE_STORAGE_KEY" = local.storage_key "AZURE_STORAGE_ACCOUNT" = local.storage_account }) -======= - other_wandb_env = { - "AZURE_STORAGE_KEY" = module.storage.account.primary_access_key, - "AZURE_STORAGE_ACCOUNT" = module.storage.account.name, - } ->>>>>>> 630ce59 (Revert "feat: Add storage account creds") # If we dont wait, tf will start trying to deploy while the work group is # still spinning up diff --git a/outputs.tf b/outputs.tf index 83b3dff..d3afc96 100644 --- a/outputs.tf +++ b/outputs.tf @@ -30,7 +30,6 @@ output "cluster_ca_certificate" { } output "storage_account" { -<<<<<<< HEAD value = var.external_bucket != "" ? "" : coalesce(var.storage_account, local.account_name, "") } @@ -40,11 +39,4 @@ output "storage_container" { output "external_bucket" { value = var.external_bucket != "" ? var.external_bucket : "" -======= - value = module.storage.account -} - -output "storage_container" { - value = module.storage.container ->>>>>>> 630ce59 (Revert "feat: Add storage account creds") } diff --git a/variables.tf b/variables.tf index 775cbb0..ba633fa 100644 --- a/variables.tf +++ b/variables.tf @@ -147,7 +147,6 @@ variable "blob_container" { description = "Use an existing bucket." default = "" } -<<<<<<< HEAD variable "storage_account" { type = string @@ -172,5 +171,9 @@ variable "external_bucket_region" { type = string default = "" } -======= ->>>>>>> 630ce59 (Revert "feat: Add storage account creds") + +variable "kube_tf_version" { + type = string + description = "Kubernetes terraform version to use" + default = "1.7.0" +} From bbe6837eba65240b3892db090ea58c606d138e49 Mon Sep 17 00:00:00 2001 From: Venkata Date: Wed, 3 May 2023 16:34:21 -0700 Subject: [PATCH 3/5] update --- variables.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/variables.tf b/variables.tf index ba633fa..aa8e520 100644 --- a/variables.tf +++ b/variables.tf @@ -139,7 +139,7 @@ variable "create_redis" { ########################################## # External Bucket # ########################################## -# Most users will not need these settings. They are ment for users who want a +# Most users will not need these settings. They are meant for users who want a # bucket in a different account. variable "blob_container" { From 6a6f1de69312f031e90a0dbc5b229b4530b6bd5d Mon Sep 17 00:00:00 2001 From: Venkata Date: Wed, 3 May 2023 23:14:37 -0700 Subject: [PATCH 4/5] fix --- main.tf | 2 +- variables.tf | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/main.tf b/main.tf index 0f9301b..8f78fb1 100644 --- a/main.tf +++ b/main.tf @@ -89,7 +89,7 @@ locals { module "aks_app" { source = "wandb/wandb/kubernetes" - version = var.kube_tf_version + version = "1.7.0" license = var.license diff --git a/variables.tf b/variables.tf index aa8e520..e1d84a2 100644 --- a/variables.tf +++ b/variables.tf @@ -171,9 +171,3 @@ variable "external_bucket_region" { type = string default = "" } - -variable "kube_tf_version" { - type = string - description = "Kubernetes terraform version to use" - default = "1.7.0" -} From 9402aed6f31c9a6768d8ad12c783bf2a5c61585c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 4 May 2023 06:14:59 +0000 Subject: [PATCH 5/5] terraform-docs: automated action --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index df9ba37..1ce17da 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ resources that lack official modules. | Name | Source | Version | |------|--------|---------| -| [aks\_app](#module\_aks\_app) | wandb/wandb/kubernetes | 1.6.0 | +| [aks\_app](#module\_aks\_app) | wandb/wandb/kubernetes | 1.7.0 | | [app\_aks](#module\_app\_aks) | ./modules/app_aks | n/a | | [app\_ingress](#module\_app\_ingress) | ./modules/app_ingress | n/a | | [app\_lb](#module\_app\_lb) | ./modules/app_lb | n/a |