Skip to content

Commit

Permalink
credit_specification triggers panic in aws provider
Browse files Browse the repository at this point in the history
This is a workaround for terraform-aws-modules#128 and related upstream provider issue, [terraform-aws-provider#10203](hashicorp/terraform-provider-aws#10203).
  • Loading branch information
dekimsey authored Sep 23, 2019
1 parent d09fcfd commit 2d06eb6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,11 @@ resource "aws_instance" "this" {
var.volume_tags,
)

credit_specification {
cpu_credits = local.is_t_instance_type ? var.cpu_credits : null
dynamic "credit_specification" {
for_each = local.is_t_instance_type ? [var.cpu_credits] : []

content {
cpu_credits = credit_specification.value
}
}
}

0 comments on commit 2d06eb6

Please sign in to comment.