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 }

closed as off-topic by music2myear, Rajesh S, Seth, Mokubai Sep 12 at 5:59

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question is not about computer hardware or software, within the scope defined in the help center." – music2myear, Rajesh S, Seth, Mokubai
If this question can be reworded to fit the rules in the help center, please edit the question.