Missed VersionLabel key #47
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I am creating my cloud infrastructure in AWS with terraform and deploying the applications with ansible.
Terraform allows me to create an environment without any version associated. Consequently, the VersionLabel key does not exist in Boto response.
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: KeyError: 'VersionLabel' fatal: [127.0.0.1 -> localhost]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n File \"/tmp/ansible_HYWzTw/ansible_module_elasticbeanstalk_env.py\", line 411, in <module>\n main()\n File \"/tmp/ansible_HYWzTw/ansible_module_elasticbeanstalk_env.py\", line 375, in main\n updates = update_required(ebs, env, module.params)\n File \"/tmp/ansible_HYWzTw/ansible_module_elasticbeanstalk_env.py\", line 218, in update_required\n if params[\"version_label\"] and env[\"VersionLabel\"] != params[\"version_label\"]:\nKeyError: 'VersionLabel'\n", "module_stdout": "", "msg": "MODULE FAILURE", "rc": 1}
The small changes I made prevent me from the error above and to deploy my first version in beanstalk.