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 Feb 10, 2022
1 parent 720d91d commit b52571f
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 @@ -225,6 +225,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 @@ -619,7 +628,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 Down Expand Up @@ -46,6 +49,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 @@ -54,6 +58,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 b52571f

Please sign in to comment.