unable to attach the dataDisk in the azure-arm

19 views
Skip to first unread message

Shashank Sharma

unread,
Jun 7, 2020, 4:51:59 PM6/7/20
to Packer
I have been trying to create a managed image w/ one data disk using packer Azure-arm. I am seeing the same packer is passing for the data disk name is w/ -1 as it's the first data disk.  here the build fails because - is not a supported name for Azure. below is the error I am seeing. 

==> azure-arm: Code="DeploymentFailed" Message="At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details." Details=[{"code":"BadRequest","message":"{\r\n  \"error\": {\r\n    \"code\": \"InvalidParameter\",\r\n    \"message\": \"The entity name 'dataDisk.name' is invalid according to its validation rule: ^[^_\\\\W][\\\\w-._]{0,79}(?\u003c![-.])$.\",\r\n    \"target\": \"dataDisk.name\"\r\n  }\r\n}"}]

below is my code snippet.

            "image_name": "Centos-7",
            "image_version": "1.3438.20200526"
          },
        "vm_size": "Standard_B1s",
        "disk_additional_size": [128],
        "managed_image_name": "RHEL7.7Image",
        "managed_image_resource_group_name": "hpp-eastus2-poc-web-rg-001",
        "location": "East US2",
        "temp_resource_group_name": "packer_rg",

I have tried to execute this in the debug mode. but I am seeing the incorrect name is getting passed for the disk, is it possible to pass a  disk name instead of packer passing it. 

Thanks,
-Shashank

Reply all
Reply to author
Forward
0 new messages