Repository: ansible-collections/community.aws

Issue:
Add version_description to ec2_launch_template 
### Summary

I found that `ec2_launch_template` does not expose `VersionDescription` from `create_launch_template_version`.

- [create_launch_template_version](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ec2/client/create_launch_template_version.html)

### Issue Type

Feature Idea

### Component Name

ec2_launch_template

### Additional Information

<!--- Paste example playbooks or commands between quotes below -->
```yaml (paste below)

```


### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct


Discussion:
@squirrel532 do you have time to contribute this feature?
Sure. Let me create a PR for this.

Resolving patch:
diff --git a/plugins/modules/ec2_launch_template.py b/plugins/modules/ec2_launch_template.py
--- a/plugins/modules/ec2_launch_template.py
+++ b/plugins/modules/ec2_launch_template.py
@@ -43,6 +43,12 @@
     - Which version should be the default when users spin up new instances based on this template? By default, the latest version will be made the default.
     type: str
     default: latest
+  version_description:
+    version_added: 5.5.0
+    description:
+    - The description of a launch template version.
+    default: ""
+    type: str
   state:
     description:
     - Whether the launch template should exist or not.
@@ -573,8 +579,10 @@ def create_or_update(module, template_options):
         template, template_versions = existing_templates(module)
         out['changed'] = True
     elif template and template_versions:
-        most_recent = sorted(template_versions, key=lambda x: x['VersionNumber'])[-1]
-        if lt_data == most_recent['LaunchTemplateData']:
+        most_recent = sorted(template_versions, key=lambda x: x["VersionNumber"])[-1]
+        if lt_data == most_recent["LaunchTemplateData"] and module.params["version_description"] == most_recent.get(
+            "VersionDescription", ""
+        ):
             out['changed'] = False
             return out
         try:
@@ -583,6 +591,7 @@ def create_or_update(module, template_options):
                     LaunchTemplateId=template['LaunchTemplateId'],
                     LaunchTemplateData=lt_data,
                     ClientToken=uuid4().hex,
+                    VersionDescription=str(module.params["version_description"]),
                     aws_retry=True,
                 )
             elif module.params.get('source_version') == 'latest':
@@ -590,7 +599,8 @@ def create_or_update(module, template_options):
                     LaunchTemplateId=template['LaunchTemplateId'],
                     LaunchTemplateData=lt_data,
                     ClientToken=uuid4().hex,
-                    SourceVersion=str(most_recent['VersionNumber']),
+                    SourceVersion=str(most_recent["VersionNumber"]),
+                    VersionDescription=str(module.params["version_description"]),
                     aws_retry=True,
                 )
             else:
@@ -606,7 +616,8 @@ def create_or_update(module, template_options):
                     LaunchTemplateId=template['LaunchTemplateId'],
                     LaunchTemplateData=lt_data,
                     ClientToken=uuid4().hex,
-                    SourceVersion=str(source_version['VersionNumber']),
+                    SourceVersion=str(source_version["VersionNumber"]),
+                    VersionDescription=str(module.params["version_description"]),
                     aws_retry=True,
                 )
 
@@ -779,11 +790,12 @@ def main():
     )
 
     arg_spec = dict(
-        state=dict(choices=['present', 'absent'], default='present'),
-        template_name=dict(aliases=['name']),
-        template_id=dict(aliases=['id']),
-        default_version=dict(default='latest'),
-        source_version=dict(default='latest')
+        state=dict(choices=["present", "absent"], default="present"),
+        template_name=dict(aliases=["name"]),
+        template_id=dict(aliases=["id"]),
+        default_version=dict(default="latest"),
+        source_version=dict(default="latest"),
+        version_description=dict(default=""),
     )
 
     arg_spec.update(template_options)


Test patch:
diff --git a/tests/integration/targets/ec2_launch_template/tasks/versions.yml b/tests/integration/targets/ec2_launch_template/tasks/versions.yml
--- a/tests/integration/targets/ec2_launch_template/tasks/versions.yml
+++ b/tests/integration/targets/ec2_launch_template/tasks/versions.yml
@@ -69,6 +69,21 @@
         - lt.latest_version == 4
         - lt.latest_template.launch_template_data.instance_type == "c4.large"
 
+  - name: update simple instance template
+    ec2_launch_template:
+      name: "{{ resource_prefix }}-simple"
+      version_description: "Fix something."
+    register: lt
+
+  - name: instance with cpu_options created with the right options
+    assert:
+      that:
+        - lt is success
+        - lt is changed
+        - lt.default_version == 5
+        - lt.latest_version == 5
+        - lt.latest_template.version_description == "Fix something."
+
   always:
   - name: delete the template
     ec2_launch_template: