ansible-collections / ansible-collections/google.cloud

Error in documentation for gcp_resourcemanager_project_info

Open Beginner friendly
#474 1 comment 0 reactions 0 assignees View on GitHub
stale
Dominant language
Python
Stars
105
Forks
144
Avg merge
5d 10h
Merged PRs (30d)
4

Description

##### SUMMARY
Incorrect return attributes documented for gcp_resourcemanager_project_info.
Documentation says the returned dictionary should contain an `id` attribute and an `number` attribute, but in fact it contains a `projectId` attribute and a `projectNumber` attribute.

##### ISSUE TYPE
- Bug Report

##### COMPONENT NAME
gcp_resourcemanager_project_info

##### ANSIBLE VERSION
```paste below
ansible [core 2.12.1]
config file = /Users/onnd/repos/cloud-assetcount/iac/ansible.cfg
configured module search path = ['/Users/onnd/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/Cellar/ansible/5.1.0/libexec/lib/python3.10/site-packages/ansible
ansible collection location = /Users/onnd/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/local/bin/ansible
python version = 3.10.1 (main, Dec 6 2021, 23:19:43) [Clang 12.0.0 (clang-1200.0.32.29)]
jinja version = 3.0.3
libyaml = True
```

##### COLLECTION VERSION
```paste below
# /usr/local/Cellar/ansible/5.1.0/libexec/lib/python3.10/site-packages/ansible_collections
Collection Version
------------ -------
community.general 4.2.0
google.cloud 1.0.2
```

##### CONFIGURATION
```paste below
DEFAULT_HOST_LIST(/Users/onnd/repos/cloud-assetcount/iac/ansible.cfg) = ['/Users/onnd/repos/cloud-assetcount/iac/ansible_hosts']
LOCALHOST_WARNING(/Users/onnd/repos/cloud-assetcount/iac/ansible.cfg) = False
```

##### OS / ENVIRONMENT
MacOS

##### STEPS TO REPRODUCE
f you run the below playbook snippet you can see that the returned resources list contains a dictionary with projectId and projectNumber attributes, not id and number as the documentation says.

```yaml
- gcp_resourcemanager_project_info:
auth_kind: "{{ auth_kind }}"
project: "{{ project }}"
register: project_info
- debug:
msg: "{{ project_info }}"
```

##### EXPECTED RESULTS
Either the documentation should be changed to reflect the object that is returned or the object should be changed to reflect the documentation.

##### ACTUAL RESULTS
```paste below
ok: [localhost] => {
"msg": {
"changed": false,
"failed": false,
"resources": [
{
"createTime": "2021-02-08T11:02:43.550Z",
"lifecycleState": "ACTIVE",
"name": "Test",
"parent": {
"id": "",
"type": "organization"
},
"projectId": "",
"projectNumber": ""
}
]
}
}

```

Contributor guide

Open the contributing guide

Research direction

Start with the gcp_resourcemanager_project_info documentation and compare its documented return attributes with the resources output shown in the reproduction. Run the supplied playbook snippet if access to GCP is available, then update the documentation so the returned attributes are accurately described; completion means the documented names match the observed result.

Written by the indexing model from the issue text.

Assessment

Tech stack
gcp, python
Domain
cloud, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.