Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PR #1828/e02fb78a backport][stable-7] ec2_instance - Support AdditionalInfo option. #1880

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions changelogs/fragments/1828-ec2_instance_additional_info.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
minor_changes:
- modules/ec2_instance - add support for AdditionalInfo option when creating an instance (https://github.com/ansible-collections/amazon.aws/pull/1828).
14 changes: 14 additions & 0 deletions plugins/modules/ec2_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,11 @@
description: The Amazon Resource Name (ARN) of the license configuration.
type: str
required: true
additional_info:
description:
- Reserved for Amazon's internal use.
type: str
version_added: 7.1.0
metadata_options:
description:
- Modify the metadata options for the instance.
Expand Down Expand Up @@ -948,6 +953,12 @@
returned: always
type: str
sample: default
additional_info:
description: Reserved for Amazon's internal use.
returned: always
type: str
version_added: 7.1.0
sample:
private_dns_name:
description: The private DNS name.
returned: always
Expand Down Expand Up @@ -1436,6 +1447,8 @@ def build_top_level_options(params):
)
spec["MetadataOptions"]["HttpProtocolIpv6"] = params.get("metadata_options").get("http_protocol_ipv6")
spec["MetadataOptions"]["InstanceMetadataTags"] = params.get("metadata_options").get("instance_metadata_tags")
if params.get("additional_info"):
spec["AdditionalInfo"] = params.get("additional_info")
if params.get("license_specifications"):
spec["LicenseSpecifications"] = []
for license_configuration in params.get("license_specifications"):
Expand Down Expand Up @@ -2271,6 +2284,7 @@ def main():
instance_metadata_tags=dict(choices=["disabled", "enabled"], default="disabled"),
),
),
additional_info=dict(type="str"),
)
# running/present are synonyms
# as are terminated/absent
Expand Down
Loading