Skip to content

Commit

Permalink
1594_ec2_instance_key_name_is_not_an_error
Browse files Browse the repository at this point in the history
  • Loading branch information
nesies authored and nesies committed Jun 5, 2023
1 parent ee68be3 commit a80a2c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/modules/ec2_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -1260,7 +1260,7 @@ def build_top_level_options(params):
msg="You must include an image_id or image.id parameter to create an instance, or use a launch_template."
)

if params.get("key_name") is not None:
if params.get("key_name") not in (None, ""):
spec["KeyName"] = params.get("key_name")

spec.update(build_userdata(params))
Expand Down

0 comments on commit a80a2c8

Please sign in to comment.