Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flex CLI deployment config changes. #22

Merged
merged 4 commits into from
Feb 16, 2024

Conversation

khkh-ms
Copy link

@khkh-ms khkh-ms commented Feb 16, 2024

Related command

Description

Testing Guide

History Notes

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change
[Component Name 2] az command b: Add some customer-facing feature


This checklist is used to make sure that common guidelines for a pull request are followed.

functionapp = client.web_apps.get(resource_group_name, name)
if deployment_storage_auth_type == 'UserAssignedIdentity':
assign_identity(cmd, resource_group_name, name, assign_identities)
if (_has_deployment_storage_role_assignment_on_resource(cmd.cli_ctx, deployment_storage,
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the create flow may also need this check.

@@ -793,6 +793,12 @@ def load_arguments(self, _):
c.argument('deployment_storage_container_name', help="The deployment storage account container name.", is_preview=True)
c.argument('deployment_storage_auth_type', arg_type=get_enum_type(DEPLOYMENT_STORAGE_AUTH_TYPES), help="The deployment storage account authentication type.", is_preview=True)
c.argument('deployment_storage_auth_value', help="The deployment storage account authentication value. This is only applicable for the user-assigned managed identity authentication type.", is_preview=True)

with self.argument_context('az functionapp deployment config set') as c:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove az - not necessary

deployment_storage_container_name = deployment_storage_container.name
deployment_config_storage_value = getattr(deployment_storage.primary_endpoints, 'blob') + deployment_storage_container_name
functionapp_deployment_storage["value"] = deployment_config_storage_value
functionapp_deployment_storage["type"] = "blobContainer"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need this line to set the type since we will always have this 'blobContainer' type. I would just remove it.

functionapp_deployment_storage["authentication"]["userAssignedIdentityResourceId"] = None
functionapp_deployment_storage["authentication"]["storageAccountConnectionStringName"] = None
elif deployment_storage_auth_type == 'UserAssignedIdentity':
assign_identities = [deployment_storage_auth_value]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would remove this line since L1651 already sets this variable after the user assigned identity is validated

@kamperiadis kamperiadis merged commit 82622ef into kamperiadis:flexeapp Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants