Skip to content

Commit

Permalink
add new paramter to enable AAD profile
Browse files Browse the repository at this point in the history
  • Loading branch information
Fred-sun committed Oct 14, 2021
1 parent a82f68c commit 575e7a1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
13 changes: 12 additions & 1 deletion plugins/modules/azure_rm_aks.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,15 @@
description:
- The AAD tenant ID to use for authentication.
- If not specified, will use the tenant of the deployment subscription.
managed:
description:
- Whether to enable manged AAD.
type: bool
default: false
admin_group_object_ids:
description:
- AAD group object IDs that will have admin role of the cluster.
type: str
addon:
description:
- Profile of managed cluster add-on.
Expand Down Expand Up @@ -561,7 +570,9 @@ def create_addon_profiles_spec():
client_app_id=dict(type='str'),
server_app_id=dict(type='str'),
server_app_secret=dict(type='str', no_log=True),
tenant_id=dict(type='str')
tenant_id=dict(type='str'),
managed=dict(type='bool', default='false'),
admin_group_object_ids=dict(type='str')
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
resource_group: "{{ resource_group }}"
kubernetes_version: "{{ versions.azure_aks_versions[0] }}"
dns_prefix: "aks{{ rpfx }}"
enable_rbac: true
aad_profile:
managed: true
agent_pool_profiles:
- name: default
count: 1
Expand All @@ -37,6 +40,7 @@
that:
- "fact.aks | length == 1"
- fact.aks[0].id == output.id
- fact.aks[0].properties.aadProfile.managed == true

- name: Use minimal parameters and system-assigned identity (idempotent)
azure_rm_aks:
Expand All @@ -45,6 +49,9 @@
resource_group: "{{ resource_group }}"
kubernetes_version: "{{ versions.azure_aks_versions[0] }}"
dns_prefix: "aks{{ rpfx }}"
enable_rbac: true
aad_profile:
managed: true
agent_pool_profiles:
- name: default
count: 1
Expand Down

0 comments on commit 575e7a1

Please sign in to comment.