Commit 07ee324
committed
Fix application credential support in env.rc
This allows users to utilise authentication via application
credentials again rather than expecting them to use passwords.
Specifically, users that use a cloud.conf with application credentials
would run into an error such as:
```
$ source ./templates/env.rc ~/.config/openstack/clouds.yaml example
Error: Value for env variable 'PASSWORD' not provided in env()
```
with the resulting `CAPO_OPENSTACK_CLOUD_YAML_SELECTED_CLOUD_B64`
environment variable containing content similar to:
```
clouds:
example:
```
This commit only includes the password if it does indeed have a value,
to ensure that the cloud config file can be rendered correctly.1 parent a296ebf commit 07ee324
1 file changed
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
110 | 114 | | |
111 | | - | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
112 | 120 | | |
113 | 121 | | |
114 | 122 | | |
| |||
0 commit comments