Skip to content

Commit

Permalink
fixing null issue
Browse files Browse the repository at this point in the history
  • Loading branch information
deeksha345 committed Aug 6, 2024
1 parent 9fc7d35 commit 7fba1f4
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/connectedk8s/azext_connectedk8s/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -954,15 +954,13 @@ def generate_request_payload(location, public_key, tags, kubernetes_distro, kube

if enable_private_link is not None or distribution_version is not None or azure_hybrid_benefit is not None or enable_oidc_issuer or enable_workload_identity or gateway is not None or arc_agentry_configurations is not None or arc_agent_profile is not None:
# Set additional parameters
private_link_state = None
private_link_state, oidc_issuer, security_profile = None, None, None
if enable_private_link is not None:
private_link_state = "Enabled" if enable_private_link is True else "Disabled"

# Set OIDC and Security profile
if enable_oidc_issuer:
oidc_issuer = set_oidc_issuer_profile(enable_oidc_issuer, self_hosted_issuer)
if enable_workload_identity:
security = set_security_profile(enable_workload_identity)
security_profile = set_security_profile(enable_workload_identity)

cc = ConnectedCluster2024_07_01_Preview(
location=location,
Expand All @@ -979,7 +977,7 @@ def generate_request_payload(location, public_key, tags, kubernetes_distro, kube
gateway=gateway,
arc_agentry_configurations=arc_agentry_configurations,
oidc_issuer_profile=oidc_issuer,
security_profile=security
security_profile=security_profile
)

return cc
Expand Down

0 comments on commit 7fba1f4

Please sign in to comment.