Skip to content

Commit

Permalink
add support for host option in placement.tenancy (ansible-collections…
Browse files Browse the repository at this point in the history
…#2026)

add support for host option in placement.tenancy

SUMMARY

Add host option in tenancy under placement.
Resolves ansible-collections#1990

ISSUE TYPE


Feature Pull Request

COMPONENT NAME

ec2_instance
ADDITIONAL INFORMATION


https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ec2/client/run_instances.html
The host tenancy is not supported for ImportInstance or for T3 instances that are configured for the unlimited CPU credit option.

Reviewed-by: Alina Buzachis
Reviewed-by: Helen Bailey <hebailey@redhat.com>
Reviewed-by: Mandar Kulkarni <mandar242@gmail.com>
Reviewed-by: Mark Chappell
  • Loading branch information
mandar242 committed Apr 22, 2024
1 parent 99e13ae commit 096b026
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
minor_changes:
- ec2_instance - add support for ``host`` option in placement.tenancy (https://github.com/ansible-collections/amazon.aws/pull/2026).
8 changes: 5 additions & 3 deletions plugins/modules/ec2_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,10 +359,12 @@
type: int
required: false
tenancy:
description: Type of tenancy to allow an instance to use. Default is shared tenancy. Dedicated tenancy will incur additional charges.
description:
- Type of tenancy to allow an instance to use. Default is shared tenancy. Dedicated tenancy will incur additional charges.
- Support for I(tenancy=host) was added in amazon.aws 7.6.0.
type: str
required: false
choices: ['dedicated', 'default']
choices: ['dedicated', 'default', 'host']
license_specifications:
description:
- The license specifications to be used for the instance.
Expand Down Expand Up @@ -2304,7 +2306,7 @@ def main():
host_id=dict(type="str"),
host_resource_group_arn=dict(type="str"),
partition_number=dict(type="int"),
tenancy=dict(type="str", choices=["dedicated", "default"]),
tenancy=dict(type="str", choices=["dedicated", "default", "host"]),
),
),
instance_initiated_shutdown_behavior=dict(type="str", choices=["stop", "terminate"]),
Expand Down

0 comments on commit 096b026

Please sign in to comment.