opentelekomcloud / ansible-collection-cloud

Ansible modules for using with OTC (addition to the native OpenStack modules)
Apache License 2.0
21 stars 14 forks source link

opentelekomcloud.cloud.rds_instance is not accepting other regions #180

Closed hadoopch closed 2 years ago

hadoopch commented 2 years ago

Hi all,

to day i tried to use opentelekomcloud.cloud.rds_instance. rds_instance has a default value for region which is eu-de. To overwrite this default i set region: "eu-ch2" (because clouds.yaml seems to be ignored) in my playbook. After setting the value i got the following error:

fatal: [localhost]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "availability_zone": "eu-ch2a",
            "datastore_type": "postgresql",
            "datastore_version": "10",
            "flavor": "rds.pg.s3.large.2",
            "interface": "public",
            "name": "pgdb.customer1",
            "network": "78893352-4656-43f2-961a-150d58d9f93e",
            "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "region": "eu-ch2",
            "security_group": "customer1-SG-database",
            "state": "present",
            "timeout": 600,
            "validate_certs": false,
            "volume_size": 40,
            "volume_type": "common",
            "wait": true
        }
    },
    "msg": "value of region must be one of: eu-de, got: eu-ch2"
}
- name: "{{_action}} DB instance"
  opentelekomcloud.cloud.rds_instance:
    name: "{{ db.name }}"
    datastore_type: "{{db.datastore_type}}"
    datastore_version: "{{db.datastore_version}}"
    flavor: "{{ db.flavor }}"
    network: "{{ network}}"
    security_group: "{{db.security_group}}"
    volume_type: "{{db.volume_type}}"
    volume_size: "{{db.volume_size}}"
    password: "{{db.password}}"
    availability_zone: "{{db.availability_zone}}"
    region: "eu-ch2"
  tags:
   - DB

Could you please check.

Best regards Uli

vladimirvshivkov commented 2 years ago

Hi, @hadoopch Thanks, will check.

vladimirvshivkov commented 2 years ago

Working on a fix for that issue

hadoopch commented 2 years ago

Thanks a lot

vladimirvshivkov commented 2 years ago

Fixed in version 0.12.2 https://github.com/opentelekomcloud/ansible-collection-cloud/releases/tag/0.12.2 Try it and let us know, please. Thanks!

hadoopch commented 2 years ago

Hi enrrou,

thanks a lot. I was able to create a database instance.

Maybe you can add additional parameters.

Both features are available in the GUI

Thanks in advance

Best regards Uli

vladimirvshivkov commented 2 years ago

Hi Uli, Thanks for your feedback! It's nice to hear you succeded with RDS deploy. According to OTC documentation, The API does not provide the ability to pass IP or Timezone parameters. I will let you know as soon as we will figure out how to manage this options.

hadoopch commented 2 years ago

Thanks a lot for your support