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

Support t2.unlimited #2491

Closed
zegl opened this issue Nov 30, 2017 · 13 comments
Closed

Support t2.unlimited #2491

zegl opened this issue Nov 30, 2017 · 13 comments
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/ec2 Issues and PRs that pertain to the ec2 service.
Milestone

Comments

@zegl
Copy link

zegl commented Nov 30, 2017

Amazon recently announced a new flag for t2 instances.

http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/t2-unlimited.html

Terraform Version

Terraform v0.11.0

Affected Resource(s)

  • aws_instance
@luhn
Copy link

luhn commented Dec 8, 2017

This option should also be implemented on aws_launch_configuration. See http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/t2-unlimited.html#t2-auto-scaling-grp

@andyspiers
Copy link

The doc you have linked to says how to specify T2 unlimited using a launch-template (which is a brand new EC2 API construct) but it doesn't seem to be possible at all using launch-configurations (the thing that has been possible for years in the autoscaling API)

So to get T2 unlimited on autoscaled instances Terraform would need to support launch-templates, which has been requested in #2505

@radeksimko radeksimko added the enhancement Requests to existing resources that expand the functionality or scope. label Dec 11, 2017
@mrubin
Copy link

mrubin commented Jan 3, 2018

How about support on plain old standalone ec2 instances (not part of an autoscaling group)? Is it possible to get that as a first pass?

@kylelaverty
Copy link

@mrubin That change is in this PR: #2619

@mrubin
Copy link

mrubin commented Jan 3, 2018

@kylelaverty Thanks!

@radeksimko radeksimko added the service/ec2 Issues and PRs that pertain to the ec2 service. label Jan 28, 2018
@bflad bflad added this to the v1.16.0 milestone Apr 20, 2018
@bflad
Copy link
Contributor

bflad commented Apr 20, 2018

Support for the aws_instance resource credit_specification argument has been merged into master and will release with v1.16.0 of the AWS provider, likely mid next week. Support for the new aws_launch_template resource (also supporting credit_specification) was released in v1.15.0 of the AWS provider. 🎉

@bflad bflad closed this as completed Apr 20, 2018
@bflad
Copy link
Contributor

bflad commented Apr 25, 2018

This has been released in version 1.16.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@repl-mike-roest
Copy link

repl-mike-roest commented May 1, 2018

@bflad I'm trying to make a module that supports t2.unlimited with a t2 class instance an also supports non t2 instances. Making the specfication of cpu_credits to standard on a non t2 class instance_type doesn't work. It seems right now to not be possible to have a module that creates an instance with t2.unlimited on when a t2 is requested and supports non t2 class instances. Error is
aws_instance.instance-rabbitmq.0: Error launching source instance: InstanceCreditSpecification.NotSupported: The m5.large instance type does not support T2 Unlimited.

It seems like this section needs to be filtered out if a non-t2 class instance is requested.

Example of the config section:
credit_specification {
cpu_credits = "${substr(upper(var.cluster_instance_type),0,2) == "T2" ? "unlimited" : "standard"}"
}

@jayudhandha
Copy link

As per docs, To enable T2 unlimited using aws_instance resource of terraform we can do below things. (Correct me if i am wrong)

credit_specification {
cpu_credits = "unlimited"
}

But how to enable T2 unlimited using aws_launch_configuration resoure of terraform?

@kylelaverty
Copy link

@jayudhandha Currently AWS does not support the unlimited flag for launch configurations so there is no way for terraform to implement this.

@andyspiers
Copy link

@jayudhandha - kylelaverty is correct in that AWS does not support T2.unlimited using Launch Configurations, however you can use Launch Templates instead. These were implemented in #2505 which is now merged and released. See https://www.terraform.io/docs/providers/aws/r/launch_template.html

@jayudhandha
Copy link

@andyspiers Thanks!

@ghost
Copy link

ghost commented Apr 6, 2020

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 6, 2020
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. service/ec2 Issues and PRs that pertain to the ec2 service.
Projects
None yet
Development

No branches or pull requests

9 participants