Closed priyadarshu closed 2 years ago
Files identified in the description: None
If these files are inaccurate, please update the component name
section of the description or use the !component
bot command.
Hi @priyadarshu, thank you for tasing this. According to the ec2_instance
module documentation, you should specify either image
(which is a dictionary, see here https://github.com/ansible-collections/amazon.aws/blob/main/plugins/modules/ec2_instance.py#L108) or image_id
(which is a string). I would probably suggest replacing image
with image_id
in your task, and that should do the job. Let us know if this solves your issue.
Hey @alinabuzachis , thanks for letting me know, it's working now. I had changed the module name to the newest version but not the key value pairs.
Thanks again, close this issue.
Summary
EC2 instance is getting created using amazon.aws.ec2 but its been DEPRECATED
Hence the latest version is amazon.aws.ec2_instance
When I use the latest version i.e amazon.aws.ec2_instance, I'm getting the below error
Playbook Code:
Issue Type
Bug Report
Component Name
amazon.aws.ec2_instance
Ansible Version
Collection Versions
AWS SDK versions
Configuration
Playbook
OS / Environment
Ubuntu
Steps to Reproduce
Expected Results
I expect it to create an AWS EC2 instance but it didn't create it
Actual Results
Code of Conduct