I have a Windows and a Linux AWS instance that are started in a near-identical way:
resource "aws_instance" "test-instance" {
key_name = var.key_name
subnet_id = var.subnet_id
instance_type = var.instance_type
security_groups = var.security_groups
associate_public_ip_address = "true"
disable_api_termination = "false"
monitoring = "false"
tags = {
Name = "test-instance-linux-${local.timestamp}"
}
root_block_device {
volume_size = var.root_volume_size
}
lifecycle {
ignore_changes = [
tags.Name
]
}
}
* test-instance-linux-${local.timestamp} for the Linux instance
* test-instance-windows-${local.timestamp} for the Windows instance
* var.root_volume_size equals '200' (GiB).
When I use this, then I see in the AWS console that both instances, Windows and Linux, have a 200 GiB volume as device /dev/sda1. Great.
However, while the Linux instance uses the entire 200 GiB, on Windows I only have 30 GiB available, which is probably the size of the original Windows_Server-2019-English-Full-Base-... AMI I started from (customized with Packer).
How do I tell the Windows instance to use the entire disk?