简体   繁体   中英

Launching AWS reserved Instances with Terraform

I want to create reserved instances for long periods of time like eg with one year run time. Does anybody know if Terraform allows to create such reserved instances in AWS?

I could now find anything in the Terraform documentation.

Reserved instances in AWS work on a first come first served basis. If you create any on demand instance that happens to match the criteria of your reserved instance then it will use your reserved instance quota first.

The AWS docs also explain this:

Reserved Instances are automatically applied to running On-Demand Instances provided that the specifications match. If you have no running On-Demand Instances that match the specifications of your Reserved Instance, the Reserved Instance is unused until you launch an instance with the required specifications.

If you're launching an instance to take advantage of the billing benefit of a Reserved Instance, ensure that you specify the following information during launch:

  • Platform: You must choose an Amazon Machine Image (AMI) that matches the platform (product description) of your Reserved Instance. For example, if you specified Linux/UNIX, you can launch an instance from an Amazon Linux AMI.

  • Instance type: Specify the same instance type as your Reserved Instance; for example, t2.large.

  • Availability Zone: If you purchased a Reserved Instance for a specific Availability Zone, you must launch the instance into the same Availability Zone. If you purchased a regional Reserved Instance, you can launch your instance into any Availability Zone.

  • Tenancy: The tenancy of your instance must match the tenancy of the Reserved Instance; for example, dedicated or shared. For more information, see Dedicated Instances.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM