Skip to content

Commit

Permalink
Increase Disk Size
Browse files Browse the repository at this point in the history
  • Loading branch information
P4T12ICK committed Jun 29, 2023
1 parent c417bec commit 8464d49
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions terraform/aws/modules/windows/resources.tf
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,19 @@ sc.exe config winrm start=auto
net start winrm
Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server' -name "fDenyTSConnections" -value 0
Enable-PSRemoting -SkipNetworkProfileCheck -Force
# Variable specifying the drive you want to extend
$drive_letter = "C"
# Script to get the partition sizes and then resize the volume
$size = (Get-PartitionSupportedSize -DriveLetter $drive_letter)
Resize-Partition -DriveLetter $drive_letter -Size $size.SizeMax
</powershell>
EOF

root_block_device {
delete_on_termination = true
volume_size = 50
}

provisioner "remote-exec" {
inline = [
"echo booted"
Expand Down

0 comments on commit 8464d49

Please sign in to comment.