ansible-collections / ansible-collections/google.cloud
Exception in `gcp_sql_user`
- Dominant language
- Python
- Stars
- 105
- Forks
- 144
- Avg merge
- 5d 10h
- Merged PRs (30d)
- 4
Description
##### SUMMARY
Instance of gcp_sql_user fails with an exception: `'NoneType' object has no attribute 'update'`
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
gcp_sql_user
##### ANSIBLE VERSION
```
ansible 2.10.10
config file = /home/sleising/repos/scion/ansible/ansible.cfg
configured module search path = ['/home/sleising/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/sleising/.local/lib/python3.6/site-packages/ansible
executable location = /home/sleising/.local/bin/ansible
python version = 3.6.9 (default, Jun 29 2022, 11:45:57) [GCC 8.4.0]
```
##### COLLECTION VERSION
```
# /home/sleising/.local/lib/python3.6/site-packages/ansible_collections
Collection Version
------------ -------
google.cloud 1.0.2
# /home/sleising/.ansible/collections/ansible_collections
Collection Version
------------ -------
google.cloud 1.0.2
```
##### CONFIGURATION
No
##### OS / ENVIRONMENT
Linux Ubuntu 18.04
##### STEPS TO REPRODUCE
```yaml
- name: Create cloud SQL user
google.cloud.gcp_sql_user:
host: "{{ cloud_sql_ip }}"
instance:
name:
name: "newuser"
password: "test-pw"
auth_kind: serviceaccount
project:
service_account_file: ~/.credentials/service-account.json
state: present
```
##### EXPECTED RESULTS
User being created or a sensible error message
##### ACTUAL RESULTS
Error with NoneType object has no attribute update.
```
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: AttributeError: 'NoneType' object has no attribute 'update'
fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n File \"master:/home/sleising/repos/scion/ansible/plugins/mitogen-0.3.0/ansible_mitogen/runner.py\", line 975, in _run\n self._run_code(code, mod)\n File \"master:/home/sleising/repos/scion/ansible/plugins/mitogen-0.3.0/ansible_mitogen/runner.py\", line 939, in _run_code\n exec(code, vars(mod))\n File \"master:/home/sleising/.ansible/collections/ansible_collections/google/cloud/plugins/modules/gcp_sql_user.py\", line 392, in \n File \"master:/home/sleising/.ansible/collections/ansible_collections/google/cloud/plugins/modules/gcp_sql_user.py\", line 223, in main\nAttributeError: 'NoneType' object has no attribute 'update'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
```
Contributor guide
Assessment
This issue has not been assessed yet.