Skip to content

Instantly share code, notes, and snippets.

View rahmancloud's full-sized avatar
🌴
having fun

Rahman rahmancloud

🌴
having fun
View GitHub Profile
@rahmancloud
rahmancloud / upload-size-bytes.md
Last active February 21, 2025 17:46
The upload size in bytes # - 512 bytes for the VHD footer (# in this case) must be a multiple of MiB.
$ wc -c os_disk.vhdx
5272240128 os_disk.vhdx

The vhd file size needs to be a number divisible by 1024.

5272240128 / 1025 / 1024 / 1024 = 4.91015625

4.91015625 is not divisible by 1024. We are going to round the number to 5.

@rahmancloud
rahmancloud / azure-terraform-role-definition.md
Created December 22, 2019 04:29
Azure Terraform Role Definition

For security purpose, we tend to create service principal that can performs Terraform operations only within a specific resource group without able modify resource outside the resource group within the same subscription.

Reality is we still need to allow the service principal to run few actions within the scope of the subscription.

Therefore here is the role definition with actions required that Terraform operations need to execute successfully.

{
    "Name": "Terraform",
    "Description": "As Subscription Reader but able to be Contributor of resource group",