From 115a4753f19e08a337b31c4a1eb612e9b5430bb7 Mon Sep 17 00:00:00 2001 From: Calvin Chan Date: Mon, 11 Apr 2022 11:45:49 -0700 Subject: [PATCH] Fixes --- src/containerapp/azext_containerapp/_help.py | 6 ------ src/containerapp/azext_containerapp/_utils.py | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/containerapp/azext_containerapp/_help.py b/src/containerapp/azext_containerapp/_help.py index c6809690a73..0d6a2ae001f 100644 --- a/src/containerapp/azext_containerapp/_help.py +++ b/src/containerapp/azext_containerapp/_help.py @@ -29,12 +29,6 @@ --image nginx --environment MyContainerappEnv \\ --cpu 0.5 --memory 1.0Gi \\ --min-replicas 4 --max-replicas 8 - - name: Create a container app with secrets and environment variables. - text: | - az containerapp create -n MyContainerapp -g MyResourceGroup \\ - --image my-app:v1.0 --environment MyContainerappEnv \\ - --secrets mysecret=secretvalue1 anothersecret="secret value 2" \\ - --env-vars GREETING="Hello, world" SECRETENV=secretref:anothersecret - name: Create a container app using a YAML configuration. Example YAML configuration - https://aka.ms/azure-container-apps-yaml text: | az containerapp create -n MyContainerapp -g MyResourceGroup \\ diff --git a/src/containerapp/azext_containerapp/_utils.py b/src/containerapp/azext_containerapp/_utils.py index 0be73b8e767..39ccef52633 100644 --- a/src/containerapp/azext_containerapp/_utils.py +++ b/src/containerapp/azext_containerapp/_utils.py @@ -293,7 +293,7 @@ def _generate_log_analytics_if_not_provided(cmd, logs_customer_id, logs_key, loc def _get_existing_secrets(cmd, resource_group_name, name, containerapp_def): - if "secrets" not in containerapp_def["properties"]["configuration"] or not containerapp_def["properties"]["configuration"]["secrets"]: + if "secrets" not in containerapp_def["properties"]["configuration"]: containerapp_def["properties"]["configuration"]["secrets"] = [] else: secrets = []