diff --git a/changelogs/fragments/adhoc_role_name_object_diff.yml b/changelogs/fragments/adhoc_role_name_object_diff.yml new file mode 100644 index 000000000..7df31e9ed --- /dev/null +++ b/changelogs/fragments/adhoc_role_name_object_diff.yml @@ -0,0 +1,4 @@ +--- +bugfixes: + - Fix "adhoc" role permission name in object diff. +... diff --git a/plugins/lookup/controller_object_diff.py b/plugins/lookup/controller_object_diff.py index 7babf5e0b..5b168bd3c 100644 --- a/plugins/lookup/controller_object_diff.py +++ b/plugins/lookup/controller_object_diff.py @@ -230,7 +230,7 @@ def run(self, terms, variables=None, **kwargs): item.update({"organizations": [item[item["resource_type"]]]}) if item["resource_type"] == "instance_group": item.update({"instance_groups": [item[item["resource_type"]]]}) - item.update({"role": item["name"].lower().replace(" ", "_")}) + item.update({"role": item["name"].lower().replace(" ", "_").replace("ad_hoc", "adhoc")}) # Remove the extra fields item.pop("users") item.pop("teams")