chaostoolkit-incubator / chaostoolkit-azure

Chaos Toolkit Extension for Azure
https://chaostoolkit.org/
Apache License 2.0
22 stars 28 forks source link

The subscription_id section in the configuration is wrong #91

Closed Lawouach closed 4 years ago

Lawouach commented 4 years ago

Currently, we expect this:

subscription_id = configuration['azure']['subscription_id']

in https://github.com/chaostoolkit-incubator/chaostoolkit-azure/blob/master/chaosazure/__init__.py#L122

with the config as follows:

"configuration": {
    "azure": {
      "subscription_id": "xxx"
    }
  },

But that means, the key cannot be interpolated from the environment variable. It should have been like this:

subscription_id = configuration['azure_subscription_id']

with the config as follows:

"configuration": {
    "azure_subscription_id": {
           "type" : "env",
           "key": "SUBSCRIPTION_ID"
    }
  },

so that the value is read from the environment variable.

Configurations are flat by default not nested as the readme suggests.