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

This is an unknown and unexpected object with azure.azcollection.azure_rm_managementgroup_info #1240

Closed
NoodleOps opened this issue Aug 9, 2023 · 1 comment · Fixed by #1252

Comments

@NoodleOps
Copy link

SUMMARY

I am trying to get the information of the management groups in Azure, but everytime I run the task, I get the result : This is an unknown and unexpected object.

The Task :
'- name: Evaluate the subscription level with the root management group
azure.azcollection.azure_rm_managementgroup_info:'

ISSUE TYPE
  • Bug Report
COMPONENT NAME

azure.azcollection.azure_rm_managementgroup_info

ANSIBLE VERSION
ansible [core 2.15.2]
  config file = None
  python version = 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0] (/usr/bin/python3)
  jinja version = 3.1.2
  libyaml = True
COLLECTION VERSION
Collection         Version
------------------ -------
azure.azcollection 1.16.0
CONFIGURATION
CONFIG_FILE() = None
OS / ENVIRONMENT
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.2 LTS
Release:        22.04
Codename:       jammy
STEPS TO REPRODUCE
Following this doc : https://docs.ansible.com/ansible/latest/collections/azure/azcollection/azure_rm_managementgroup_module.html#ansible-collections-azure-azcollection-azure-rm-managementgroup-module gives you the error below.

    - name: Evaluate the subscription level with the root management group
      azure.azcollection.azure_rm_managementgroup_info:
EXPECTED RESULTS

The result expected is a JSON with the management group infos.

ACTUAL RESULTS

When I run the task with any parameters this is the output. The task is able to fetch the management group choosen, but return "This is an unknown and unexpected object.

    "invocation": {
        "module_args": {
            "ad_user": null,
            "adfs_authority_url": null,
            "api_profile": "latest",
            "auth_source": "auto",
            "cert_validation_mode": null,
            "children": false,
            "client_id": null,
            "cloud_environment": "AzureCloud",
            "flatten": false,
            "id": "DEV",
            "log_mode": null,
            "log_path": null,
            "name": null,
            "password": null,
            "profile": null,
            "recurse": false,
            "secret": null,
            "subscription_id": null,
            "tenant": null,
            "thumbprint": null,
            "x509_certificate_path": null
        }
    },
    "management_groups": [
        {
            "state": "This is an unknown and unexpected object. You should report this as a bug to the ansible-collection/azcollection project on github. Please include the object type in your issue report, and @ the authors of this module. ",
            "tenant_id": "---",
            "type": "Microsoft.Management/managementGroups"
        }
    ]
}

@kmj251
Copy link
Contributor

kmj251 commented Aug 29, 2023

This is a regression from v1.15.0, I hope we can have a bug fix release immediately to fix this problem.

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 a pull request may close this issue.

2 participants