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

az containerapp env create: Fix bug with --internal-only #130

Merged
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions src/containerapp/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Release History

0.3.7
++++++
* 'az containerapp env create': fixed bug where "--internal-only" didn't work

0.3.6
++++++
Expand Down
3 changes: 1 addition & 2 deletions src/containerapp/azext_containerapp/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,6 @@ def create_managed_environment(cmd,

managed_env_def = ManagedEnvironmentModel
managed_env_def["location"] = location
managed_env_def["properties"]["internalLoadBalancerEnabled"] = False
managed_env_def["properties"]["appLogsConfiguration"] = app_logs_config_def
managed_env_def["tags"] = tags
managed_env_def["properties"]["zoneRedundant"] = zone_redundant
Expand Down Expand Up @@ -835,7 +834,7 @@ def create_managed_environment(cmd,
if internal_only:
if not infrastructure_subnet_resource_id:
raise ValidationError('Infrastructure subnet resource ID needs to be supplied for internal only environments.')
managed_env_def["properties"]["internalLoadBalancerEnabled"] = True
managed_env_def["properties"]["vnetConfiguration"]["internal"] = True

try:
r = ManagedEnvironmentClient.create(
Expand Down