Skip to content

Commit

Permalink
Add cpu credits (#35)
Browse files Browse the repository at this point in the history
* Add cpu credits

* Add cpu credits

* Change to CPU credit block

* Change to CPU credit block
  • Loading branch information
reyntjensw authored Oct 24, 2018
1 parent 16541b7 commit 180b431
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions instance/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ resource "aws_instance" "instance" {
lifecycle {
ignore_changes = ["key_name", "user_data"]
}

credit_specification {
cpu_credits = "${var.cpu_credits}"
}
}

resource "aws_instance" "instance_no_ebs" {
Expand Down
5 changes: 5 additions & 0 deletions instance/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,8 @@ variable "tags" {
type = "map"
default = {}
}
variable "cpu_credits" {
type = "string"
description = "The type of cpu credits to use"
default = "standard"
}

0 comments on commit 180b431

Please sign in to comment.