Skip to content

Commit

Permalink
imdssupport should be lower case
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaps committed Oct 10, 2024
1 parent 4a59e11 commit 750eba3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/modules/ec2_ami.py
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ def set_imdsv2(connection, image, imdsv2_enable):

try:
modify_image_attribute(
connection, image_id=image["imageId"], Attribute="ImdsSupport", ImdsSupport={"Value": "v2.0"}
connection, image_id=image["imageId"], Attribute="imdsSupport", ImdsSupport={"Value": "v2.0"}
)
return True
except AnsibleEC2Error as e:
Expand Down Expand Up @@ -876,7 +876,7 @@ def set_launch_permissions(connection, launch_permissions, image_id):
def set_imdsv2(connection, image_id):
try:
modify_image_attribute(
connection, image_id=image_id, Attribute="ImdsSupport", ImdsSupport={"Value": "v2.0"}
connection, image_id=image_id, Attribute="imdsSupport", ImdsSupport={"Value": "v2.0"}
)
except AnsibleEC2Error as e:
raise Ec2AmiFailure(f"Error setting IMDS Support to v2 for image {image_id}", e)
Expand Down

0 comments on commit 750eba3

Please sign in to comment.