From e7cd6b6ae08f8113182da5f9a246fce1a057a18e Mon Sep 17 00:00:00 2001 From: michaeljguarino Date: Wed, 13 Aug 2025 12:43:15 -0400 Subject: [PATCH] Fix dedicated stack provisioning Handling of network/oidc settings had these misconfigure the env vars needed --- apps/core/lib/core/services/cloud/configuration.ex | 4 ++-- apps/core/test/services/cloud/workflow_test.exs | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/core/lib/core/services/cloud/configuration.ex b/apps/core/lib/core/services/cloud/configuration.ex index aae1d2772..9290dc763 100644 --- a/apps/core/lib/core/services/cloud/configuration.ex +++ b/apps/core/lib/core/services/cloud/configuration.ex @@ -85,7 +85,7 @@ defmodule Core.Services.Cloud.Configuration do defp add_network(env, %ConsoleInstance{network: %ConsoleInstance.Network{allowed_cidrs: [_ | _] = cidrs}}) do env ++ [network_allowd_cidrs: Jason.encode!(cidrs)] end - defp add_network(_, _), do: [] + defp add_network(env, _), do: env defp add_oidc(env, %ConsoleInstance{oidc: %ConsoleInstance.OIDC{issuer: issuer, client_id: client_id, client_secret: client_secret}}) when is_binary(issuer) and is_binary(client_id) and is_binary(client_secret) do @@ -95,7 +95,7 @@ defmodule Core.Services.Cloud.Configuration do oidc_client_secret: client_secret ] end - defp add_oidc(_, _), do: [] + defp add_oidc(env, _), do: env # defp certificate(%ConsoleInstance{postgres: %PostgresCluster{certificate: cert}}), do: cert diff --git a/apps/core/test/services/cloud/workflow_test.exs b/apps/core/test/services/cloud/workflow_test.exs index 47aad7f14..19b6a0525 100644 --- a/apps/core/test/services/cloud/workflow_test.exs +++ b/apps/core/test/services/cloud/workflow_test.exs @@ -99,6 +99,7 @@ defmodule Core.Services.Cloud.WorkflowTest do assert attrs.repository_id == "repo-id" assert attrs.git.ref == "main" assert attrs.git.folder == "terraform/modules/dedicated/aws" + refute Enum.empty?(attrs.environment) del_q = Console.queries(:stack_delete) expect(Req, :post, fn _, [graphql: {^del_q, %{id: ^stack_id}}] ->