CPU core count for t2.large, t3.large, t3a.large and m5.xlarge instances

by Shishir   Last Updated September 12, 2019 04:01 AM

I was using Terraform to get back CPU core count of the EC2 instance that it would create.

When I spin up t2.large, t3.large, t3a.large, and m5.xlarge, which should have 2 vCPUs, I get instance_cpu_core_count = 1.

Again, When I spin up t2.xlarge I get back exact 4 CPU core count.

I am kind of confused with the CPU core count being returned for t2.large, t3.large, t3a.large, and m5.xlarge.

This is the line of Terraform template that gets the CPU count,

output "instance_cpu_core_count" { description = "number of cpus" value = aws_instance.example.cpu_core_count }



Related Questions


terraform aws security groups

Updated July 04, 2019 11:01 AM