Skip to content
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/containerapp/azext_containerapp/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -2366,10 +2366,13 @@ def enable_dapr(cmd, name, resource_group_name,
if 'configuration' not in containerapp_def['properties']:
containerapp_def['properties']['configuration'] = {}

if 'dapr' not in containerapp_def['properties']['configuration']:
containerapp_def['properties']['configuration']['dapr'] = {}
if not safe_get(containerapp_def, "properties", "configuration", "dapr"):
if "dapr" not in containerapp_def['properties']['configuration']:
safe_get(containerapp_def, "properties", "configuration", "dapr", default=[])

if dapr_app_id:
if not safe_get(containerapp_def, "properties", "configuration", "dapr", "appId"):
if dapr_app_id not in safe_get(containerapp_def['properties']['configuration']['dapr'], default=[]):
containerapp_def['properties']['configuration']['dapr']['appId'] = {}
containerapp_def['properties']['configuration']['dapr']['appId'] = dapr_app_id

if dapr_app_port:
Expand Down