Skip to content

Commit

Permalink
Added show_secrets to show. (Azure#142)
Browse files Browse the repository at this point in the history
Co-authored-by: Haroon Feisal <haroonfeisal@microsoft.com>
  • Loading branch information
runefa and Haroon Feisal authored Aug 9, 2022
1 parent 9618daa commit d289220
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/containerapp/azext_containerapp/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ def load_arguments(self, _):
with self.argument_context('containerapp create', arg_group='Container') as c:
c.argument('image', options_list=['--image', '-i'], help="Container image, e.g. publisher/image-name:tag.")

with self.argument_context('containerapp show') as c:
c.argument('show_secrets', help="Show Containerapp secrets.")

with self.argument_context('containerapp update', arg_group='Container') as c:
c.argument('image', options_list=['--image', '-i'], help="Container image, e.g. publisher/image-name:tag.")

Expand Down
7 changes: 5 additions & 2 deletions src/containerapp/azext_containerapp/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -813,11 +813,14 @@ def update_containerapp(cmd,
no_wait)


def show_containerapp(cmd, name, resource_group_name):
def show_containerapp(cmd, name, resource_group_name, show_secrets=False):
_validate_subscription_registered(cmd, CONTAINER_APPS_RP)

try:
return ContainerAppClient.show(cmd=cmd, resource_group_name=resource_group_name, name=name)
r = ContainerAppClient.show(cmd=cmd, resource_group_name=resource_group_name, name=name)
if show_secrets:
_get_existing_secrets(cmd, resource_group_name, name, r)
return r
except CLIError as e:
handle_raw_exception(e)

Expand Down

0 comments on commit d289220

Please sign in to comment.