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

[mac1.metal][auto scaling] support launching mac1 ec2 instance through Launch Template Host Resource Group #19134

Closed
ghost opened this issue Apr 28, 2021 · 6 comments
Labels
enhancement Requests to existing resources that expand the functionality or scope.

Comments

@ghost
Copy link

ghost commented Apr 28, 2021

This issue was originally opened by @OliverKoo as hashicorp/terraform#28531. It was migrated here as a result of the provider split. The original body of the issue is below.


Current Terraform Version

0.14.6

Use-cases

mac1.metal instance requires running on a dedicated host. My org wants to create an Auto Scaling Group for mac1.metal instances. ASG requires a launch template, when creating Launch Templates one would have to specify tenancy (Advance Detail -> Tenancy) as "Dedicated Host" then specify the either "tenancy host ID" or "tenancy Host Resource Group" (create under License Manager).

"Tenancy host ID" would map existing dedicated host to a to be launched instance. Which is not workable for auto scaling.
Hence using "Tenancy host resource group" is necessary for auto scaling as it would dynamically create dedicated host for you and when launching instance .

from AWS autoscaling userguide

For Tenancy host resource group, you can specify a host resource group for a BYOL AMI to
use on Dedicated Hosts. You do not have to have already allocated Dedicated Hosts in your
account before you use this feature. Your instances will automatically launch onto Dedicated
Hosts regardless.
(I also manually created a launch template with host resource group and tested it 👍 )

Issue

I don't think terraform currently support "tenancy Host Resource Group" nor "Dedicated Host" tenancy on Launch Template. Would be great if it does, I think this is the last piece needed to auto scale mac instances

Terraform also doesn't support Host Resource Group under License Manager (but this is not much of an issue since I think 90% of use cases doesn't require update on LM, so if this resource is created manually and not managed by terraform is not a big deal)

Things I have tried

  1. using cloudformation_stack suggested by @vasylenko and terraform-aws-dedicated-host module. While these solutions are great at creating dedicated host that can be allocated to mac1 instance, it does not dynamically allocate dedicated host for mac1 instances.

  2. looked into using placement group as alternative but its not supported by AWS

dedicated hosts cannot be launch into Placement Group

You cannot launch Dedicated Hosts in placement groups.

@ghost ghost added enhancement Requests to existing resources that expand the functionality or scope. new labels Apr 28, 2021
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Apr 28, 2021
@OliverKoo
Copy link

after a little digging, I think this commit by @DrFaust92 solves this issue! 🙏 💯

It is in the latest aws terrraform provider 3.37.0. Will give it a try

@OliverKoo
Copy link

actually host_resource_group_arn was dropped #11655 (comment)

@bflad
Copy link
Contributor

bflad commented Apr 28, 2021

Hi @OliverKoo 👋 Thank you for submitting this issue. It appears that this will be covered by the previously existing #15784 and #15785, so to consolidate discussions and efforts on those I'm going to close this. I'm hoping to merge this support in shortly, but also feel free to 👍 react and subscribe to those for further updates.

@bflad bflad closed this as completed Apr 28, 2021
@OliverKoo
Copy link

hey Thanks @bflad . saw you just merged the feature 🥳

Is there a timeline when 3.38.0 is coming out?

@bflad
Copy link
Contributor

bflad commented Apr 28, 2021

Hoping for tomorrow. 😄 We typically release every Thursday, although last week we didn't for reasons outlined in this security notice.

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 29, 2021
@breathingdust breathingdust removed the needs-triage Waiting for first response or review from a maintainer. label Sep 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope.
Projects
None yet
Development

No branches or pull requests

3 participants