openstackpulumiinfrastructure-as-codepulumi-python

OpenStack Pulumi integration - Cannot connect due to apparently lacking parameter in YAML file


I am dealing with a strange situation in configuring a Pulumi deployment in order to maintain a IaC for an OpenStack environment.

The deployment is very simple as below, I started from Python:

import pulumi
from pulumi_openstack import compute

instance = compute.Instance('VMTEST', flavor_id='small', image_name='image-in-openstack')

The YAML file is apparently set up correctly:

config:
  openstack:authUrl: https://10.1.1.10:5000/v3/auth
  openstack:domainName: Customer001
  openstack:userName: user001
  openstack:password:
    secure: AAAB********** OMISSIS ***********eTrT
  openstack:insecure: true
  pulumi:template: openstack-python

When I run the Pulumi environment, it gives me this message:

openstack:compute:Instance (test):
    error: 1 error occurred:
        * Error creating OpenStack compute client: You must provide exactly one of DomainID or DomainName to authenticate by Username

even though the DomainName parameter is at least present in YAML file.

Even trying to set up the DomainId parameter, the behaviour is the same.

Searching through the Openstack provider documentation for Pulumi, there is no evidence of any kind of related additional configurations to be done.


Solution

  • After searching through the web and trying against the YAML configuration combinations, I realized there were two kinds of problems:

    1. YAML parameters

    Firstly, domainName parameter had to be projectDomainName instead. Secondly, the tenantName parameter must be set up.

    Here is the working YAML used:

    config:
      openstack:authUrl: https://10.1.1.10:5000/v3/auth
      openstack:insecure: true
      openstack:password:
        secure: AAAB ********* OMISSIS *********** 5jF7
      openstack:projectDomainName: Default
      openstack:tenantName: Test
      openstack:userName: test
      pulumi:template: openstack-python
    

    2. OpenStack account with special-characters password

    As absurd as it may sound, the OpenStack account's password had special characters (@ or &) that did not allow Pulumi to authenticate correctly.

    Trying with a different brand-new account with alphanumeric password, authentication passed.