ansible-collections / ansible-collections/google.cloud

gcp_dns_ resource_record_set invalid value for parameter name

Open
#232 2 comments 0 reactions 0 assignees View on GitHub
stale
Dominant language
Python
Stars
105
Forks
144
Avg merge
5d 10h
Merged PRs (30d)
4

Description

##### ISSUE TYPE
- Bug Report

##### COMPONENT NAME
gcp_dns_ resource_record_set

##### ANSIBLE VERSION
tried with older versions as well got the same issue i.e 2.8 2.7

```
ansible 2.9.9
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/home/nepallink/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/dist-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.17 (default, Apr 15 2020, 17:20:14) [GCC 7.5.0]

```

##### CONFIGURATION

```
- name: creating/adding a cname record
gcp_dns_resource_record_set:
name: "example.com."
managed_zone:
name: "{{ lookup('env','ZONE_NAME') }}"
dnsName: "{{ lookup('env','DNS_NAME') }}"
type: CNAME
ttl: 300
target:
- "{{ lookup('env','CNAME_VALUE') }}"
project: "{{ lookup('env','GCP_PROJECT') }}"
auth_kind: serviceaccount
service_account_file: "{{ credentials_file }}"
state: present
```

##### OS / ENVIRONMENT
```
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.4 LTS"
```

##### EXPECTED RESULTS
DNS CNAME record created

##### ACTUAL RESULTS

```
PLAY [localhost] ************************************************************************************************************************************

TASK [Gathering Facts] ******************************************************************************************************************************
ok: [localhost]

TASK [zeroonedns : creating/adding a cname record] **************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "GCP returned error: {u'error': {u'message': u\"Invalid value for 'parameters.name': ''\", u'code': 400, u'errors': [{u'reason': u'invalid', u'message': u\"Invalid value for 'parameters.name': ''\", u'domain': u'global'}]}}"}

PLAY RECAP ******************************************************************************************************************************************
localhost : ok=1 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0

```

Contributor guide

Open the contributing guide

Research direction

Start with the gcp_dns_resource_record_set module and run the supplied playbook configuration against the reported environment to reproduce the invalid parameters.name error. Trace the resource-record-set request from that entry point, then verify the CNAME record is created successfully without the GCP validation failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
gcp, python
Domain
cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.