How can I get gs_secret_key and gs_access_key to use gc_storage module in Ansible?

I would need to create a directory in a Google Cloud Bucket using Ansible. I would like to know where I can find the values to complete “gs_secret_key” and “gs_access_key” to use “gc_storage” module in Ansible.

`

- name: Create a bucket with key as directory
  become: no
  gc_storage:
    bucket: "my-bucket-name"
    mode: "create"
    region: "US-EAST1"
    object: "/test_directory/"
    gs_access_key: "012345678901-compute@developer.gserviceaccount.com"
    gs_secret_key: "-----BEGIN PRIVATE KEY-----\nMIIblashblah...blahblahmow=\n-----END PRIVATE KEY-----\n"
    gs_access_key: "e6ablahblah...blahblahfc0"

`

I’m not sure about the values that I set in the Ansible script. With the current values I get an error message saying:

GSResponseError: 403 Forbidden\nSignatureDoesNotMatchThe request signature we calculated does not match the signature you provided. Check your Google secret key and signing method.PUT\n\n\nWed, 10 Oct 2018 16:26:00 GMT\n/my-bucket-name/

thank you!

Hi,
Issue got fixed ? am getting below error

he full traceback is:
Traceback (most recent call last):
File “/home/ansible/.ansible/tmp/ansible-tmp-1557917701.18-170733216464166/AnsiballZ_gc_storage.py”, line 113, in
_ansiballz_main()
File “/home/ansible/.ansible/tmp/ansible-tmp-1557917701.18-170733216464166/AnsiballZ_gc_storage.py”, line 105, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File “/home/ansible/.ansible/tmp/ansible-tmp-1557917701.18-170733216464166/AnsiballZ_gc_storage.py”, line 48, in invoke_module
imp.load_module(‘main’, mod, module, MOD_DESC)
File “/tmp/ansible_gc_storage_payload_kwkWnD/main.py”, line 491, in
File “/tmp/ansible_gc_storage_payload_kwkWnD/main.py”, line 461, in main
File “/tmp/ansible_gc_storage_payload_kwkWnD/main.py”, line 344, in handle_put
File “/tmp/ansible_gc_storage_payload_kwkWnD/main.py”, line 186, in key_check
AttributeError: ‘NoneType’ object has no attribute ‘get_key’

fatal: [localhost]: FAILED! => {
“changed”: false,
“module_stderr”: “Traceback (most recent call last):\n File "/home/ansible/.ansible/tmp/ansible-tmp-1557917701.18-170733216464166/AnsiballZ_gc_storage.py", line 113, in \n _ansiballz_main()\n File "/home/ansible/.ansible/tmp/ansible-tmp-1557917701.18-170733216464166/AnsiballZ_gc_storage.py", line 105, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File "/home/ansible/.ansible/tmp/ansible-tmp-1557917701.18-170733216464166/AnsiballZ_gc_storage.py", line 48, in invoke_module\n imp.load_module(‘main’, mod, module, MOD_DESC)\n File "/tmp/ansible_gc_storage_payload_kwkWnD/main.py", line 491, in \n File "/tmp/ansible_gc_storage_payload_kwkWnD/main.py", line 461, in main\n File "/tmp/ansible_gc_storage_payload_kwkWnD/main.py", line 344, in handle_put\n File "/tmp/ansible_gc_storage_payload_kwkWnD/main.py", line 186, in key_check\nAttributeError: ‘NoneType’ object has no attribute ‘get_key’\n”,
“module_stdout”: “”,
“msg”: “MODULE FAILURE\nSee stdout/stderr for the exact error”,
“rc”: 1
}