Deployment manager Disk DeviceName not working

Hello
I have the following template for deployment manager, as highlighted, I set a custom name for the disk tat will created for the instance called 'the-first-vm', this is how it is done using the dashboard, you edit the 'Device Name' field on disk section

a5cb68cd-f727-417d-89fc-619aae5cc94d.png

 

however after deploying the stack with the following command:

$ gcloud deployment-manager deployments create teststack2 --config gcp-template.yml

the disk name is not testdisk but 'my-first-vm', so it just followed the instance name and did not take into account the name I told it to use in the template, see the picture below

Screenshot from 2024-05-19 11-02-58.png

Has anyone encountered this or knows how to solve it? We have 'enhanced support' gcp support plan, but they refuse to help on this.

1 1 33
1 REPLY 1

Hello @Developer31  ,Welcome on Google Cloud Community.

resources:
- name: vm-created-by-deployment-manager
  type: compute.v1.instance
  properties:
    zone: us-central1-a
    machineType: zones/us-central1-a/machineTypes/n1-standard-1
    disks:
    - deviceName: my-test
      type: PERSISTENT
      boot: true
      autoDelete: true
      initializeParams:
        sourceImage: projects/debian-cloud/global/images/family/debian-11
    networkInterfaces:
    - network: global/networks/default

 

Code pasted above will work. Additionally I have also code written in JINJA scheme. 

--
cheers,
DamianS
LinkedIn medium.com Cloudskillsboost